[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question regarding code generation
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 18 Dec 2015 09:16:38 -0200
> @number[] is a unary operator - the call to constructor may or may not
> happen inside the subexpr() that follows, so am not sure above is
> possible. But I do find that when the unary operator is processed, the
> current 'pc' is on OP_NEWTABLE instruction in the example above.
What does '@number[]' do?? Why does it need to access OP_NEWTABLE (given
that there may not exist one)?
> Is it always the case that a unary operator applies to the previous
> bytecode instruction?
No. Even the notion of "previous" is messy. What is previous to minus
in expression '-(a or b)'?
1 [1] TESTSET 2 0 1
2 [1] JMP 0 1 ; to 4
3 [1] MOVE 2 1
4 [1] UNM 2 2
-- Roberto