Hi Johnny,

See my comments.

Feng


http://codereview.chromium.org/99352/diff/1/2
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/99352/diff/1/2#newcode653
Line 653: //
http://www.mozilla.org/js/language/js20-2002-04/core/operators.html#operator-overriding
How about (typeof Document.load == 'function')? __toBoolean__ may not be
exact the same as undetectable document.all. You can 'grep Undetectable
ia32/*' to find other cases handling document.all. Some of operations
are inlined.

http://codereview.chromium.org/99352/diff/1/4
File src/runtime.cc (right):

http://codereview.chromium.org/99352/diff/1/4#newcode2993
Line 2993: if (rv && rv->IsJSFunction())
rv cannot be null, rv->IsJSFunction() is good enough.

Heap::null_value() is a value, you can check it by rv->IsNull(), but it
is unnecessary if checking IsJSFunction() here.

http://codereview.chromium.org/99352/diff/1/3
File src/runtime.js (right):

http://codereview.chromium.org/99352/diff/1/3#newcode396
Line 396: var that = %GetToBooleanOperator(this);
Why need %GetToBooleanOperator(this)? I think you can just use pure
JavaScript code here:

var that = this.__toBoolean__;
if (IS_FUNCTION(that))
     return that();

http://codereview.chromium.org/99352

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

Reply via email to