comparison runtime/integer.c @ 9:52d9948def24

Limit stack use in Int32 in prep for stack unwind changes
author Mike Pavone <pavone@retrodev.com>
date Sat, 16 May 2009 23:22:45 -0400
parents 8d74ef7fa357
children 3021dac0d8f5
comparison
equal deleted inserted replaced
8:8d74ef7fa357 9:52d9948def24
1 #include "integer.h" 1 #include "integer.h"
2 #include "builtin.h" 2 #include "builtin.h"
3 #include "context.h" 3 #include "context.h"
4 4
5 Method(_PL_,Int32,2, 5 #define left ((_t_Int32 *)cdata->params[0])
6 _t_Int32 * left; _t_Int32 * right) 6 #define right ((_t_Int32 *)cdata->params[1])
7
8 MethodNoLocals(_PL_,Int32,2)
7 call = alloc_cdata(cdata->ct, 1); 9 call = alloc_cdata(cdata->ct, 1);
8 CopiedParam(0, left, Int32, TYPE_INT32) 10 CopiedParam(0, left, Int32, TYPE_INT32)
9 Param(1, right, Int32, TYPE_INT32) 11 Param(1, right, Int32, TYPE_INT32)
10 12
11 left->num += right->num; 13 left->num += right->num;
12 14
13 release_ref((object *)right); 15 release_ref((object *)right);
14 EndFunc 16 EndFunc
15 17
16 Method(_MN_,Int32,2, 18 MethodNoLocals(_MN_,Int32,2)
17 _t_Int32 * left; _t_Int32 * right)
18 call = alloc_cdata(cdata->ct, 1); 19 call = alloc_cdata(cdata->ct, 1);
19 CopiedParam(0, left, Int32, TYPE_INT32) 20 CopiedParam(0, left, Int32, TYPE_INT32)
20 Param(1, right, Int32, TYPE_INT32) 21 Param(1, right, Int32, TYPE_INT32)
21 22
22 left->num -= right->num; 23 left->num -= right->num;