Author: fperrad Date: Wed Feb 28 15:58:21 2007 New Revision: 17220 Modified: trunk/languages/lua/lib/luabasic.pir trunk/languages/lua/lib/luaio.pir trunk/languages/lua/lib/luastring.pir
Log: [Lua] - use specialized array instead of the base Array Modified: trunk/languages/lua/lib/luabasic.pir ============================================================================== --- trunk/languages/lua/lib/luabasic.pir (original) +++ trunk/languages/lua/lib/luabasic.pir Wed Feb 28 15:58:21 2007 @@ -248,7 +248,7 @@ .param pmc opt :optional .param pmc arg :optional .local pmc ret - new $P0, .Array + new $P0, .FixedStringArray set $P0, 7 $P0[0] = 'stop' $P0[1] = 'restart' @@ -278,7 +278,7 @@ .sub 'gc' :anon .param string what .param int data - .local num res + .local float res res = 0 L_stop: unless what == 'stop' goto L_restart @@ -743,8 +743,8 @@ argerror("index out of range") L4: $I0 = n - i - new ret, .Array - ret = $I0 + new ret, .FixedPMCArray + set ret, $I0 $I1 = 0 dec i L5: @@ -920,7 +920,7 @@ e = optint(j, $I0) n = e - $I1 inc n - new ret, .Array + new ret, .FixedPMCArray set ret, n new index, .LuaNumber set index, $I1 Modified: trunk/languages/lua/lib/luaio.pir ============================================================================== --- trunk/languages/lua/lib/luaio.pir (original) +++ trunk/languages/lua/lib/luaio.pir Wed Feb 28 15:58:21 2007 @@ -804,7 +804,7 @@ .local int i .local pmc format narg = formats - new ret, .Array + new ret, .FixedPMCArray set ret, narg i = 0 L2: @@ -895,7 +895,7 @@ .local pmc f .local pmc ret tofile(self) - new modenames, .Array + new modenames, .FixedStringArray set modenames, 3 modenames[0] = 'set' modenames[1] = 'cur' @@ -949,7 +949,7 @@ .local pmc f .local pmc ret tofile(self) - new modenames, .Array + new modenames, .FixedStringArray set modenames, 3 modenames[0] = 'no' modenames[1] = 'full' @@ -957,7 +957,7 @@ $S1 = checkstring(mode) $I1 = checkoption($S1, modenames) $I2 = optint(size, 512) # LUAL_BUFFERSIZE - new mode, .Array + new mode, .FixedIntegerArray set mode, 3 mode[0] = 0 # PIO_NONBUF mode[1] = 2 # PIO_FULLBUF Modified: trunk/languages/lua/lib/luastring.pir ============================================================================== --- trunk/languages/lua/lib/luastring.pir (original) +++ trunk/languages/lua/lib/luastring.pir Wed Feb 28 15:58:21 2007 @@ -166,7 +166,7 @@ n = pose - posi inc n .local pmc ret - new ret, .Array + new ret, .FixedPMCArray set ret, n .local int i i = 0 @@ -349,7 +349,7 @@ .param pmc match .param int whole .local pmc ret - new ret, .Array + new ret, .FixedPMCArray .local pmc capts capts = match.'get_array'() if null capts goto L1 @@ -415,7 +415,7 @@ $I1 = length strfrmt b = '' arg = 0 - new $P1, .Array + new $P1, .FixedPMCArray set $P1, 1 idx = 0 L1: