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

Issue 5990005: Optimize instanceof further... (Closed)

Created:
10 years ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Optimize instanceof further If the instance of is performed against what is beliwed to be a constant global function inline the instance of check and have the call to the instanceof stub in deferred code. The inlined check will be patched by the instanceof stub when called from deferred code. This is indicated by the lithium instruction LInstanceOfKnownGlobal. To help the patching the delta from the return address to the patch site is placed just below the return address in the edi slot of the pushad/popad ares. This is safe because the edi register (which is pushed last) is a temporary for the lithium instruction. As the instanceof stub can call other JavaScript an additional marking for saving all double registers have been added. Also tweaked the instanceof stub to produce true/false objects instead of 0/1 for the case with deferred code. Committed: http://code.google.com/p/v8/source/detail?r=6173

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 40

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -58 lines) Patch
M src/code-stubs.h View 1 2 3 1 chunk +20 lines, -4 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 1 chunk +34 lines, -1 line 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 3 chunks +24 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 6 chunks +150 lines, -35 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 2 chunks +102 lines, -1 line 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 4 chunks +20 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 3 chunks +24 lines, -6 lines 0 comments Download
M src/lithium-allocator.h View 1 2 3 3 chunks +12 lines, -1 line 0 comments Download
M src/lithium-allocator.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M src/v8-counters.h View 1 2 3 1 chunk +1 line, -9 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Søren Thygesen Gjesse
10 years ago (2010-12-22 12:27:44 UTC) #1
Mads Ager (chromium)
Does it lint? ;) I'll perform a real review ASAP.
10 years ago (2010-12-22 13:38:17 UTC) #2
Mads Ager (chromium)
Hairy stuff. :) First round of comments. Once these are taken care of I would ...
9 years, 11 months ago (2011-01-04 17:25:58 UTC) #3
Søren Thygesen Gjesse
Addressed all the comments. Also changed the call site cache to use a near label, ...
9 years, 11 months ago (2011-01-05 09:28:00 UTC) #4
Mads Ager (chromium)
LGTM http://codereview.chromium.org/5990005/diff/29001/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/5990005/diff/29001/src/ia32/code-stubs-ia32.cc#newcode5009 src/ia32/code-stubs-ia32.cc:5009: static const int8_t kMovEaxImmediate = static_cast<int8_t>(0xb8); Add the ...
9 years, 11 months ago (2011-01-05 09:59:26 UTC) #5
Søren Thygesen Gjesse
9 years, 11 months ago (2011-01-05 11:11:01 UTC) #6
http://codereview.chromium.org/5990005/diff/29001/src/ia32/code-stubs-ia32.cc
File src/ia32/code-stubs-ia32.cc (right):

http://codereview.chromium.org/5990005/diff/29001/src/ia32/code-stubs-ia32.cc...
src/ia32/code-stubs-ia32.cc:5009: static const int8_t kMovEaxImmediate =
static_cast<int8_t>(0xb8);
On 2011/01/05 09:59:26, Mads Ager wrote:
> Add the 'Byte' suffix to this one as well?

Done.

http://codereview.chromium.org/5990005/diff/29001/src/ia32/lithium-codegen-ia...
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/5990005/diff/29001/src/ia32/lithium-codegen-ia...
src/ia32/lithium-codegen-ia32.cc:1811: InstanceofStub stub(flags);
On 2011/01/05 09:59:26, Mads Ager wrote:
> Can you move this declaration up to where the flags are defined to make it
clear
> what they are used for?

Done.

Powered by Google App Engine
This is Rietveld 408576698