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

Issue 3792003: Optimizing HandleScope. Also fixed HandleScope destruction when API getter th... (Closed)

Created:
10 years, 2 months ago by SeRya
Modified:
9 years, 7 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Optimizing HandleScope. Also fixed HandleScope destruction when API getter throws an exception. Committed: http://code.google.com/p/v8/source/detail?r=5689

Patch Set 1 #

Total comments: 22

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 7

Patch Set 5 : '' #

Total comments: 2

Patch Set 6 : '' #

Total comments: 27

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -323 lines) Patch
M include/v8.h View 1 2 3 4 5 6 1 chunk +8 lines, -3 lines 0 comments Download
M src/api.h View 1 2 3 4 5 6 2 chunks +19 lines, -16 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 2 chunks +22 lines, -4 lines 0 comments Download
M src/assembler.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 2 chunks +8 lines, -2 lines 0 comments Download
M src/handles.h View 3 4 5 6 4 chunks +15 lines, -26 lines 0 comments Download
M src/handles.cc View 1 2 3 4 5 6 5 chunks +8 lines, -9 lines 0 comments Download
M src/handles-inl.h View 3 4 5 6 1 chunk +7 lines, -3 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -67 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -8 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 7 8 1 chunk +98 lines, -48 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 4 5 6 2 chunks +0 lines, -12 lines 0 comments Download
M src/runtime.h View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 1 chunk +0 lines, -7 lines 0 comments Download
M src/serialize.cc View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -34 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -10 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 6 7 8 1 chunk +71 lines, -58 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 4 5 6 2 chunks +0 lines, -12 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
SeRya
10 years, 2 months ago (2010-10-14 11:18:16 UTC) #1
SeRya
Generated code simplified a bit by moving exception handling above handle dereferencing and HandleScope destruction.
10 years, 2 months ago (2010-10-14 11:59:08 UTC) #2
antonm
My main complaint is inlining of of handle scope handling macros. If you restore them ...
10 years, 2 months ago (2010-10-14 12:03:21 UTC) #3
SeRya
http://codereview.chromium.org/3792003/diff/1/3 File src/api.cc (right): http://codereview.chromium.org/3792003/diff/1/3#newcode461 src/api.cc:461: : prev_next_(i::HandleScope::current_.next) On 2010/10/14 12:03:21, antonm wrote: > nit: ...
10 years, 2 months ago (2010-10-15 13:31:33 UTC) #4
antonm
LGTM. Q: do you have most fresh numbers for performance impact? As a thought: if ...
10 years, 2 months ago (2010-10-18 12:45:29 UTC) #5
SeRya
I measured small boost (about 2.5% on DOM queries that is bigger than variations ~0.45% ...
10 years, 2 months ago (2010-10-20 11:10:27 UTC) #6
antonm
http://codereview.chromium.org/3792003/diff/78001/79011 File src/ia32/macro-assembler-ia32.cc (right): http://codereview.chromium.org/3792003/diff/78001/79011#newcode1101 src/ia32/macro-assembler-ia32.cc:1101: mov(Operand(esp, 0 * kPointerSize), ebx); // name. I don't ...
10 years, 2 months ago (2010-10-20 11:17:13 UTC) #7
SeRya
TailCallApiFunction generalized, PrepareCallApiFunction added.
10 years, 2 months ago (2010-10-20 18:37:50 UTC) #8
antonm
Thanks a lot for refactoring API function invocation. http://codereview.chromium.org/3792003/diff/123001/80016 File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/3792003/diff/123001/80016#newcode3064 src/ia32/code-stubs-ia32.cc:3064: __ ...
10 years, 2 months ago (2010-10-21 11:52:37 UTC) #9
SeRya
http://codereview.chromium.org/3792003/diff/123001/80016 File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/3792003/diff/123001/80016#newcode3064 src/ia32/code-stubs-ia32.cc:3064: __ mov(Operand(esp, (MacroAssembler::kFistApiParameter + 0) * kPointerSize), On 2010/10/21 ...
10 years, 2 months ago (2010-10-21 13:04:06 UTC) #10
SeRya
TailCallApiFunction renamed to CallApiFunctionAndReturn
10 years, 2 months ago (2010-10-21 13:38:16 UTC) #11
antonm
10 years, 2 months ago (2010-10-21 13:53:45 UTC) #12
LGTM

http://codereview.chromium.org/3792003/diff/123001/80017
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/3792003/diff/123001/80017#newcode1121
src/ia32/macro-assembler-ia32.cc:1121: mov(Operand(esp, (argc + 1) *
kPointerSize), Immediate(0));  // out cell.
On 2010/10/21 13:04:06, SeRya wrote:
> On 2010/10/21 11:52:38, antonm wrote:
> > couldn't you use mov(Operand(eax, 0), Immediate(0));  instead?
> 
> Sure we could. It would save one byte of code but wouldn't it introduce data
> dependence?

Up to you.  Given you have eax dependency above and doing tons of additional
stuff below, I'd be surprised if it matters.

Powered by Google App Engine
This is Rietveld 408576698