http://codereview.chromium.org/661179/diff/2001/2002
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/661179/diff/2001/2002#newcode6081
src/ia32/codegen-ia32.cc:6081: frame_->Spill(result.reg());
frame()

http://codereview.chromium.org/661179/diff/2001/2002#newcode6105
src/ia32/codegen-ia32.cc:6105: Result scratch = allocator()->Allocate();
Allocating a register has a virtual frame effect so the cloned frame and
the frame actually reaching the call to AllocateHeapNumber are not
identical.

The register needs to be allocated before the frame is cloned.

http://codereview.chromium.org/661179/diff/2001/2002#newcode6117
src/ia32/codegen-ia32.cc:6117: result =
frame_->CallRuntime(Runtime::kMath_sqrt, 1);
frame()

http://codereview.chromium.org/661179/diff/2001/2002#newcode6120
src/ia32/codegen-ia32.cc:6120: frame_->Push(&result);
frame()

http://codereview.chromium.org/661179/diff/2001/2002#newcode6122
src/ia32/codegen-ia32.cc:6122: Result result =
frame()->CallRuntime(Runtime::kMath_sqrt, 1);
As before (though this one probably fits on a page), it might read a bit
better if the small branch of the if...else is first.

http://codereview.chromium.org/661179

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

Reply via email to