LGTM. As we discussed, it would be nice to start moving this tricky code out of
the codegen files and add some abstractions that makes it easier to generate
(even) more specialized stub variants.


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

http://codereview.chromium.org/2843049/diff/1/2#newcode7838
src/arm/codegen-arm.cc:7838: if (generate_code_to_calculate_answer ||
slow_reverse.is_linked()) {
Maybe just move the if (lhs.is(r0)) code into the next then-part that's
guarded by if (generate_code...)?

http://codereview.chromium.org/2843049/diff/1/2#newcode7849
src/arm/codegen-arm.cc:7849: if (generate_code_to_calculate_answer ||
slow.is_linked()) {
I would consider negating the condition and returning at this point.

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

http://codereview.chromium.org/2843049/diff/1/3#newcode10233
src/ia32/codegen-ia32.cc:10233: // Patch the caller to an appropriate
specialized stub and return the
I guess it doesn't really return anymore? Does it?

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

http://codereview.chromium.org/2843049/diff/1/5#newcode5580
src/runtime.cc:5580: return Heap::NumberFromDouble(x + y);
No more AllocateHeapNumber left in runtime.cc?

http://codereview.chromium.org/2843049/diff/1/8
File test/mjsunit/value-of.js (right):

http://codereview.chromium.org/2843049/diff/1/8#newcode33
test/mjsunit/value-of.js:33: assertThrows(function() {o + 1; },
MyException);
{o + 1; } => { o + 1 }

http://codereview.chromium.org/2843049/show

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

Reply via email to