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

Issue 2715004: [Isolates]... (Closed)

Created:
10 years, 6 months ago by zarko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

[Isolates] Stack guards - static. - Begin removing static state from stack guards. - Split default isolate initialization into two phases: * Allocate all previously static objects * Call initialize methods on those static objects This is necessary to preserve the old behavior of the API; without the change some tests fail (where the failures cannot be solved by a call to V8::Initialize). Committed: http://code.google.com/p/v8/source/detail?r=4832

Patch Set 1 #

Patch Set 2 : --send_mail #

Patch Set 3 : check StackGuard::ThreadLocal ctor semantics + fix some build issues #

Patch Set 4 : merge latest commits #

Patch Set 5 : Isolate::State enum; will add asserts + revert tests in future CLs #

Total comments: 10

Patch Set 6 : Address comments/make StackGuard::ThreadLocal::Initialize/Clear side-effects visible #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -173 lines) Patch
M src/api.cc View 2 3 4 chunks +9 lines, -5 lines 0 comments Download
M src/arm/regexp-macro-assembler-arm.cc View 3 1 chunk +1 line, -1 line 0 comments Download
M src/assembler.cc View 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M src/debug.h View 2 3 4 5 3 chunks +9 lines, -5 lines 0 comments Download
M src/debug.cc View 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/execution.h View 1 2 3 4 5 4 chunks +45 lines, -76 lines 1 comment Download
M src/execution.cc View 1 2 3 4 5 11 chunks +69 lines, -31 lines 3 comments Download
M src/heap.h View 2 3 3 chunks +6 lines, -1 line 0 comments Download
M src/heap.cc View 2 3 4 5 3 chunks +5 lines, -3 lines 0 comments Download
M src/ia32/regexp-macro-assembler-ia32.cc View 2 3 1 chunk +2 lines, -1 line 0 comments Download
M src/isolate.h View 1 2 3 4 5 5 chunks +59 lines, -4 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 7 chunks +52 lines, -12 lines 0 comments Download
M src/runtime.cc View 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M src/top.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M src/top.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M src/v8.cc View 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/v8threads.cc View 2 3 9 chunks +11 lines, -10 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.cc View 3 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M test/cctest/test-debug.cc View 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M test/cctest/test-regexp.cc View 2 3 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
zarko
10 years, 6 months ago (2010-06-08 15:55:50 UTC) #1
zarko
10 years, 6 months ago (2010-06-09 01:07:39 UTC) #2
zarko
From initial feedback, I had: 1. make StackGuard a real object. 2. SetResourceConstraints should be ...
10 years, 6 months ago (2010-06-09 01:08:23 UTC) #3
zarko
10 years, 6 months ago (2010-06-09 17:58:55 UTC) #4
Vitaly Repeshko
LG except for the way StackGuard sets limits on Heap. -- Vitaly http://codereview.chromium.org/2715004/diff/36002/42005 File src/debug.h ...
10 years, 6 months ago (2010-06-09 18:48:54 UTC) #5
zarko
Revisions applied. Thanks for the feedback. http://codereview.chromium.org/2715004/diff/36002/42006 File src/execution.cc (right): http://codereview.chromium.org/2715004/diff/36002/42006#newcode46 src/execution.cc:46: // ClearThreadLocal(&thread_local_) is ...
10 years, 6 months ago (2010-06-09 20:30:05 UTC) #6
Vitaly Repeshko
10 years, 6 months ago (2010-06-09 21:22:37 UTC) #7
LGTM. Thanks for doing the refactoring work.


-- Vitaly

http://codereview.chromium.org/2715004/diff/38002/40007
File src/execution.cc (right):

http://codereview.chromium.org/2715004/diff/38002/40007#newcode350
src/execution.cc:350: ThreadLocal blank;
Can we make its constructor call Clear()?

http://codereview.chromium.org/2715004/diff/38002/40007#newcode426
src/execution.cc:426: if (thread_local_.Initialize()) {
isolate_->heap()->SetStackLimits(); }
nit: No {} for one-line ifs.

http://codereview.chromium.org/2715004/diff/38002/40007#newcode624
src/execution.cc:624: // Perform preemption.
Unrelated to your change, but this looks like a race when debugger support is
not enabled. We read the undefined value before unlocker is destructed. Please
put it in a {} block.

http://codereview.chromium.org/2715004/diff/38002/40008
File src/execution.h (right):

http://codereview.chromium.org/2715004/diff/38002/40008#newcode204
src/execution.h:204: Isolate* isolate_; // TODO(isolates): Technically this
could be calculated
The comment was formatted correctly. I meant that the field itself (and its
comment) should be moved to be next to other fields of this class (to line 270).

Powered by Google App Engine
This is Rietveld 408576698