PTAL, I implemented the more efficient test you suggested on all
architectures.
I did rebase my branch to address one of your comments, so unfortunately,
all
the relative diffs are useless now. Sorry. But the new changes for the
optimization are only in lithium-codegen-* and in lithium-x64.*, so you can
limit your 2nd look to those. :)
http://codereview.chromium.org/7737036/diff/3002/src/ia32/lithium-codegen-ia32.cc
File src/ia32/lithium-codegen-ia32.cc (right):
http://codereview.chromium.org/7737036/diff/3002/src/ia32/lithium-codegen-ia32.cc#newcode1749
src/ia32/lithium-codegen-ia32.cc:1749: // either "Object" or "Function",
only the branch conditions differ.
On 2011/09/15 09:13:46, Erik Corry wrote:
The test for Object involves two comparisons and two conditional
jumps, but I
think the range is contiguous. That means it could be done with a
subtract, a
compare and an unsigned conditional branch.
Done, here and in other backends.
http://codereview.chromium.org/7737036/diff/3002/src/macros.py
File src/macros.py (right):
http://codereview.chromium.org/7737036/diff/3002/src/macros.py#newcode119
src/macros.py:119: # This is the same as being either a function or an
object in V8 terminology.
On 2011/09/15 09:13:46, Erik Corry wrote:
Is this comment accurate and up to date? I think it covers
JSFunction, JSObject
and the new proxy types now, right?
No, a proper version is on HEAD already (from a different branch). I
rebased to make this change disappear.
http://codereview.chromium.org/7737036/diff/3002/src/objects-inl.h
File src/objects-inl.h (right):
http://codereview.chromium.org/7737036/diff/3002/src/objects-inl.h#newcode527
src/objects-inl.h:527: (HeapObject::cast(this)->map()->instance_type()
= FIRST_JS_PROXY_TYPE &&
On 2011/09/15 09:13:46, Erik Corry wrote:
This would be neater if you extract the instance type into a variable
first.
Done.
http://codereview.chromium.org/7737036/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev