Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Issue 7737036: Reorganize object type enum, such that proxies are no longer in the middle (Closed)

Created:
9 years, 3 months ago by rossberg
Modified:
9 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Reorganize object type enum, such that proxies are no longer in the middle of the range of proper JS objects. Unfortunately, callable types no longer form a range now. However, there are only two anyway. We put them at either end of the range of JS object types so that certain compares can be combined. R=erik.corry@gmail.com,kmillikin@chromium.org BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=9370

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed Kevin's comments. #

Total comments: 6

Patch Set 3 : Addressed Erik's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -123 lines) Patch
M include/v8.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 2 chunks +20 lines, -14 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 2 chunks +27 lines, -17 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 2 chunks +20 lines, -13 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 2 chunks +28 lines, -18 lines 0 comments Download
M src/mark-compact.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/objects.h View 1 2 2 chunks +26 lines, -14 lines 0 comments Download
M src/objects-inl.h View 1 2 1 chunk +7 lines, -4 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 2 chunks +20 lines, -14 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 4 chunks +32 lines, -18 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
rossberg
9 years, 3 months ago (2011-09-06 14:21:19 UTC) #1
Kevin Millikin (Chromium)
Couple of small suggestions. http://codereview.chromium.org/7737036/diff/1/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right): http://codereview.chromium.org/7737036/diff/1/src/arm/lithium-codegen-arm.cc#newcode1922 src/arm/lithium-codegen-arm.cc:1922: ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); This could ...
9 years, 3 months ago (2011-09-07 10:13:12 UTC) #2
rossberg
http://codereview.chromium.org/7737036/diff/1/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right): http://codereview.chromium.org/7737036/diff/1/src/arm/lithium-codegen-arm.cc#newcode1922 src/arm/lithium-codegen-arm.cc:1922: ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); On 2011/09/07 10:13:12, Kevin Millikin wrote: ...
9 years, 3 months ago (2011-09-07 14:57:31 UTC) #3
Erik Corry
LGTM 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 ...
9 years, 3 months ago (2011-09-15 09:13:46 UTC) #4
Kevin Millikin (Chromium)
Also LGTM.
9 years, 3 months ago (2011-09-15 10:07:17 UTC) #5
rossberg
9 years, 3 months ago (2011-09-15 14:06:06 UTC) #6
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-ia3...
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/7737036/diff/3002/src/ia32/lithium-codegen-ia3...
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.

Powered by Google App Engine
This is Rietveld 408576698