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

Issue 10534006: Remove TLS access for current Zone. (Closed)

Created:
8 years, 6 months ago by sanjoy
Modified:
8 years, 6 months ago
Reviewers:
danno
CC:
v8-dev
Visibility:
Public.

Description

Remove TLS access for current Zone. By passing around a Zone object explicitly we no longer need to do a TLS access at the sites that allocate memory from the current Zone. BUG= TEST= Committed: https://code.google.com/p/v8/source/detail?r=11761

Patch Set 1 #

Total comments: 34

Patch Set 2 : Review. #

Total comments: 2

Patch Set 3 : Store zone in SplayTree and VariableMap. Remove `explicit` from constructors where it isn't needed. #

Total comments: 6

Patch Set 4 : Address review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1501 lines, -1225 lines) Patch
M src/arm/assembler-arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/arm/full-codegen-arm.cc View 4 chunks +8 lines, -7 lines 0 comments Download
M src/arm/lithium-arm.h View 1 2 chunks +7 lines, -3 lines 0 comments Download
M src/arm/lithium-arm.cc View 9 chunks +21 lines, -17 lines 0 comments Download
M src/arm/lithium-codegen-arm.h View 3 chunks +9 lines, -9 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 16 chunks +18 lines, -17 lines 0 comments Download
M src/arm/lithium-gap-resolver-arm.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/regexp-macro-assembler-arm.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/regexp-macro-assembler-arm.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M src/assembler.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M src/assembler.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M src/ast.h View 18 chunks +35 lines, -31 lines 0 comments Download
M src/ast.cc View 1 9 chunks +29 lines, -21 lines 0 comments Download
M src/compiler.cc View 7 chunks +11 lines, -8 lines 0 comments Download
M src/deoptimizer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/frames.h View 1 chunk +1 line, -1 line 0 comments Download
M src/frames.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M src/full-codegen.h View 1 5 chunks +13 lines, -7 lines 0 comments Download
M src/full-codegen.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/func-name-inferrer.h View 1 5 chunks +5 lines, -3 lines 0 comments Download
M src/func-name-inferrer.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M src/hashmap.h View 2 chunks +4 lines, -3 lines 0 comments Download
M src/hydrogen.h View 1 17 chunks +34 lines, -27 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 95 chunks +185 lines, -167 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 13 chunks +34 lines, -28 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 2 3 8 chunks +18 lines, -16 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/full-codegen-ia32.cc View 4 chunks +7 lines, -7 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 3 chunks +8 lines, -8 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 14 chunks +15 lines, -14 lines 0 comments Download
M src/ia32/lithium-gap-resolver-ia32.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 4 chunks +11 lines, -7 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 6 chunks +13 lines, -12 lines 0 comments Download
M src/ia32/regexp-macro-assembler-ia32.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/regexp-macro-assembler-ia32.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M src/interface.h View 1 2 3 4 chunks +11 lines, -10 lines 0 comments Download
M src/interface.cc View 1 2 3 8 chunks +19 lines, -13 lines 0 comments Download
M src/isolate.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/isolate.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/json-parser.h View 5 chunks +10 lines, -6 lines 0 comments Download
M src/jsregexp.h View 1 2 17 chunks +43 lines, -28 lines 0 comments Download
M src/jsregexp.cc View 1 2 67 chunks +193 lines, -149 lines 0 comments Download
M src/list-inl.h View 1 chunk +5 lines, -1 line 0 comments Download
M src/lithium.h View 1 12 chunks +23 lines, -23 lines 0 comments Download
M src/lithium.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M src/lithium-allocator.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/lithium-allocator.cc View 1 27 chunks +44 lines, -43 lines 0 comments Download
M src/liveedit.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/liveedit.cc View 10 chunks +26 lines, -17 lines 0 comments Download
M src/objects.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M src/parser.h View 1 6 chunks +10 lines, -10 lines 0 comments Download
M src/parser.cc View 1 2 3 72 chunks +132 lines, -115 lines 0 comments Download
M src/regexp-macro-assembler.h View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M src/regexp-macro-assembler.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M src/regexp-macro-assembler-tracer.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/rewriter.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 1 2 31 chunks +82 lines, -51 lines 0 comments Download
M src/safepoint-table.h View 1 chunk +1 line, -1 line 0 comments Download
M src/safepoint-table.cc View 1 4 chunks +12 lines, -9 lines 0 comments Download
M src/scopeinfo.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/scopes.h View 1 2 3 8 chunks +25 lines, -9 lines 0 comments Download
M src/scopes.cc View 1 2 3 18 chunks +81 lines, -73 lines 0 comments Download
M src/small-pointer-list.h View 2 chunks +11 lines, -11 lines 0 comments Download
M src/splay-tree.h View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M src/splay-tree-inl.h View 1 2 3 chunks +8 lines, -10 lines 0 comments Download
M src/stub-cache.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M src/stub-cache.cc View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M src/type-info.h View 3 chunks +5 lines, -1 line 0 comments Download
M src/type-info.cc View 6 chunks +11 lines, -8 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/full-codegen-x64.cc View 4 chunks +8 lines, -7 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 3 chunks +9 lines, -9 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 13 chunks +15 lines, -14 lines 0 comments Download
M src/x64/lithium-gap-resolver-x64.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.h View 1 3 chunks +12 lines, -7 lines 0 comments Download
M src/x64/lithium-x64.cc View 6 chunks +13 lines, -12 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M src/zone.h View 1 2 5 chunks +12 lines, -14 lines 0 comments Download
M src/zone-inl.h View 1 chunk +2 lines, -18 lines 0 comments Download
M test/cctest/test-dataflow.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-liveedit.cc View 1 chunk +2 lines, -1 line 0 comments Download
M test/cctest/test-regexp.cc View 1 2 27 chunks +90 lines, -64 lines 0 comments Download
M test/cctest/test-strings.cc View 1 2 4 chunks +9 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
sanjoy
http://codereview.chromium.org/10534006/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/10534006/diff/1/src/hydrogen.cc#newcode6926 src/hydrogen.cc:6926: AddInstruction(global); This needs to be done so that the ...
8 years, 6 months ago (2012-06-05 13:02:49 UTC) #1
danno
Mostly nits, but a few real issues to address. http://codereview.chromium.org/10534006/diff/1/src/ast.cc File src/ast.cc (right): http://codereview.chromium.org/10534006/diff/1/src/ast.cc#newcode248 src/ast.cc:248: ...
8 years, 6 months ago (2012-06-05 13:42:33 UTC) #2
sanjoy
http://codereview.chromium.org/10534006/diff/1/src/ast.cc File src/ast.cc (right): http://codereview.chromium.org/10534006/diff/1/src/ast.cc#newcode248 src/ast.cc:248: ZoneHashMap table(Literal::Match, 8, allocator); On 2012/06/05 13:42:35, danno wrote: ...
8 years, 6 months ago (2012-06-05 14:21:39 UTC) #3
danno
More comments. https://chromiumcodereview.appspot.com/10534006/diff/1/src/scopes.h File src/scopes.h (right): https://chromiumcodereview.appspot.com/10534006/diff/1/src/scopes.h#newcode43 src/scopes.h:43: explicit VariableMap(Zone* zone); This is probably cleaner ...
8 years, 6 months ago (2012-06-06 10:59:53 UTC) #4
sanjoy
http://codereview.chromium.org/10534006/diff/10001/src/splay-tree-inl.h File src/splay-tree-inl.h (right): http://codereview.chromium.org/10534006/diff/10001/src/splay-tree-inl.h#newcode49 src/splay-tree-inl.h:49: } On 2012/06/06 10:59:53, danno wrote: > Store the ...
8 years, 6 months ago (2012-06-06 11:43:54 UTC) #5
danno
http://codereview.chromium.org/10534006/diff/3003/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/10534006/diff/3003/src/hydrogen.cc#newcode6958 src/hydrogen.cc:6958: AddInstruction(global_object); This is an unrelated change, can you please ...
8 years, 6 months ago (2012-06-11 12:11:45 UTC) #6
danno
lgtm
8 years, 6 months ago (2012-06-11 12:37:50 UTC) #7
sanjoy
8 years, 6 months ago (2012-06-11 12:37:56 UTC) #8
http://codereview.chromium.org/10534006/diff/3003/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/10534006/diff/3003/src/hydrogen.cc#newcode6958
src/hydrogen.cc:6958: AddInstruction(global_object);
On 2012/06/11 12:11:45, danno wrote:
> This is an unrelated change, can you please remove it from this patch?

This change is required since the HGlobalReceiver constructor reads the zone
from the HBasicBlock in the HValue.  Unless we add the instruction to the basic
block before constructing the HGlobalReceiver, the HGlobalReceiver constructor
sees a NULL HBasicBlock and segfaults.

http://codereview.chromium.org/10534006/diff/3003/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/10534006/diff/3003/src/parser.cc#newcode1557
src/parser.cc:1557: interface->Add(names[i], inner, ok, zone());
On 2012/06/11 12:11:45, danno wrote:
> Move zone() to be the third parameter so that the CHECK_OK parameter still
> works.

Fixed.

http://codereview.chromium.org/10534006/diff/3003/src/scopes.h
File src/scopes.h (right):

http://codereview.chromium.org/10534006/diff/3003/src/scopes.h#newcode72
src/scopes.h:72: maps_[i] = new VariableMap(zone);
On 2012/06/11 12:11:45, danno wrote:
> Where does this allocation come from? It looks like it's from the malloc heap,
> that doesn't seem right.

Changed to allocate from the zone.  VariableMap isn't a ZoneObject, so I had to
explicitly allocate the memory from the zone.

Powered by Google App Engine
This is Rietveld 408576698