1.1 --- a/jitcraft/Scopes.cpp Mon Jul 09 22:25:52 2012 -0700
1.2 +++ b/jitcraft/Scopes.cpp Tue Jul 10 02:11:13 2012 -0700
1.3 @@ -29,6 +29,7 @@
1.4 locals_(0),
1.5 maxContainedLocals_(0),
1.6 numFunctions_(0),
1.7 + numNatives_(0),
1.8 lifoSlot_(NULL),
1.9 kind_(kind),
1.10 enclosing_(enclosing)
1.11 @@ -155,7 +156,10 @@
1.12
1.13 if (name->kind() == BoundName::FUNCTION) {
1.14 NamedFunction *fun = name->toNamedFunction();
1.15 - fun->allocate(numFunctions_++);
1.16 + if (fun->isNative())
1.17 + fun->allocate(numNatives_++);
1.18 + else
1.19 + fun->allocate(numFunctions_++);
1.20 }
1.21 }
1.22 }