lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


VirusCamp wrote:
a,b,c = ...
; source chunk: (interactive mode)
; x86 standard (32-bit, little endian, doubles)

; function [0] definition (level 1)
; 0 upvalues, 0 params, 3 stacks
.function  0 0 2 3
.const  "a"  ; 0
.const  "b"  ; 1
.const  "c"  ; 2
[1] vararg      0   4
[2] setglobal   2   2        ; c := R2
[3] setglobal   1   1        ; b := R1
[4] setglobal   0   0        ; a := R0
[5] return      0   1
; end of function

  So in VARARG, A=0, B =4 ,is that right ?
  R(A),....R(A+B-1) = ...
can be translated to
  R0,R1,R2,R3 = ...

Yep, I guess I should have taken my own advice and tested it with some actual values and actual code ;-)

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia