From: Jakub Trzebiatowski Date: 2015-03-12T11:15:38+01:00 Subject: [ruby-core:68506] Seven stacks (and two questions) --Apple-Mail=_9DAD779C-AD46-4BF2-8300-B1187F1ED752 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The Ruby Hacking Guide says that Ruby has=E2=80=A6 seven stacks. Is it = an implementation choice (and it could be implemented with one stack), = or is there really a need for seven logical stacks? For example, Lua has = one stack, and still closures with upvalues are totally possible (it=E2=80= =99s like Ruby=E2=80=99s blocks that can reference local variables of = their enclosing method, but it works for any function with any = upvalues).=20 1. Is there any Ruby feature that I=E2=80=99m not aware of, and it = justifies the need of seven stacks? 2. When does Ruby generate `getdynamic` YARV opcode? Could you provide = me with an example source code? (I really tried to make Ruby generate = it. No results.) --- Jakub Trzebiatowski Computer science student Gda=C5=84sk University of Technology --Apple-Mail=_9DAD779C-AD46-4BF2-8300-B1187F1ED752 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
The Ruby Hacking Guide says that Ruby has=E2=80= =A6 seven stacks. Is it an implementation choice (and it could be = implemented with one stack), or is there really a need for seven logical = stacks? For example, Lua has one stack, and still closures with upvalues = are totally possible (it=E2=80=99s like Ruby=E2=80=99s blocks that can = reference local variables of their enclosing method, but it works for = any function with any upvalues). 

1. Is there any Ruby feature that I=E2=80= =99m not aware of, and it justifies the need of seven stacks?

2. When does Ruby = generate `getdynamic` YARV opcode? Could you provide me with an example = source code? (I really tried to make Ruby generate it. No = results.)

---
Jakub = Trzebiatowski
Computer science student
Gda=C5=84sk University of Technology



= --Apple-Mail=_9DAD779C-AD46-4BF2-8300-B1187F1ED752--