added some code to handle defclass
This commit is contained in:
16
lib/exec.c
16
lib/exec.c
@ -3729,15 +3729,22 @@ static int execute (hcl_t* hcl)
|
||||
|
||||
case HCL_CODE_MAKE_CLASS:
|
||||
{
|
||||
/* push nivars
|
||||
push ncvars
|
||||
push superclass
|
||||
//push ivarnames
|
||||
//push cvarnames
|
||||
make_classs
|
||||
*/
|
||||
hcl_oop_t t, sc, nivars, ncvars;
|
||||
|
||||
LOG_INST_0 (hcl, "make_class");
|
||||
|
||||
sc = HCL_STACK_GETTOP(hcl); HCL_STACK_POP(hcl);
|
||||
nivars = HCL_STACK_GETTOP(hcl); HCL_STACK_POP(hcl);
|
||||
ncvars = HCL_STACK_GETTOP(hcl); HCL_STACK_POP(hcl);
|
||||
HCL_ASSERT (hcl, HCL_OOP_IS_SMOOI(nivars));
|
||||
nivars = HCL_STACK_GETTOP(hcl); HCL_STACK_POP(hcl);
|
||||
HCL_ASSERT (hcl, HCL_OOP_IS_SMOOI(ncvars));
|
||||
HCL_ASSERT (hcl, HCL_OOP_IS_SMOOI(nivars));
|
||||
t = hcl_makeclass(hcl, sc, HCL_OOP_TO_SMOOI(nivars), HCL_OOP_TO_SMOOI(ncvars));
|
||||
|
||||
if (HCL_UNLIKELY(!t))
|
||||
@ -3749,6 +3756,11 @@ static int execute (hcl_t* hcl)
|
||||
HCL_STACK_PUSH (hcl, t); /* push the class created */
|
||||
break;
|
||||
}
|
||||
|
||||
/*case HCL_CODE_MAKE_METHOD:
|
||||
{
|
||||
}*/
|
||||
|
||||
/* -------------------------------------------------------- */
|
||||
|
||||
case HCL_CODE_DUP_STACKTOP:
|
||||
|
Reference in New Issue
Block a user