Whew.  OK, the only issue is Function.prototype.apply in the JS builtins.  I
think you'll need a runtime function to help with that one.


http://codereview.chromium.org/7623011/diff/6001/src/ia32/builtins-ia32.cc
File src/ia32/builtins-ia32.cc (right):

http://codereview.chromium.org/7623011/diff/6001/src/ia32/builtins-ia32.cc#newcode705
src/ia32/builtins-ia32.cc:705: __ pop(edx);
This is return address, right?  It needs a // return address. comment.

http://codereview.chromium.org/7623011/diff/6001/src/ia32/builtins-ia32.cc#newcode780
src/ia32/builtins-ia32.cc:780: __ mov(ebx, Operand(ebp, 3 *
kPointerSize));
I guess you should name '3' and '4' in this code since you're changing
it.

http://codereview.chromium.org/7623011/diff/6001/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/7623011/diff/6001/src/runtime.cc#newcode639
src/runtime.cc:639: ? isolate->heap()->true_value() :
isolate->heap()->false_value();
return isolate->heap()->ToBoolean(obj->IsJSFunctionProxy());

http://codereview.chromium.org/7623011/diff/6001/src/runtime.js
File src/runtime.js (right):

http://codereview.chromium.org/7623011/diff/6001/src/runtime.js#newcode408
src/runtime.js:408: if (%IsJSFunctionProxy(this)) {
Can we get into this case, where CALL_NON_FUNCTION is invoked on a
function proxy?  If so, another design is to have %GetFunctionDelegate
return the call trap.  I don't know if that makes things simpler, or
less simple, or about the same.

http://codereview.chromium.org/7623011/diff/6001/src/runtime.js#newcode433
src/runtime.js:433: var proxy = arguments[arity];  // The proxy comes in
as an additional arg.
You can also use %_Arguments(arity) to get the arguments without
allocating the arguments object.

http://codereview.chromium.org/7623011/diff/6001/src/runtime.js#newcode437
src/runtime.js:437: return global.Function.prototype.apply.call(
You can't, the JS builtins are called with the context of their caller
(and don't depend on it).  I think you'll have to implement a runtime
function to do some of the work here.

http://codereview.chromium.org/7623011/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to