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

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed)

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

Description

[Isolates] Avoid dereferencing Isolate::Current() to check oddball identities. - Added a kind field and accessors to JS Oddball objects. - IsTrue/IsFalse/IsBoolean/IsTheHole/IsNull/IsUndefined now look like [IsOddball() && Oddball::cast(this)->kind() == Oddball::kUndefined;] - Some checks of the form [if (foo == HEAP->an_oddball_value())] were updated (in such a way that they are resistant to foo being null and to the oddballs changing locations after a GC.) - Removed THIS from heap.cc. Committed: http://code.google.com/p/v8/source/detail?r=5191

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 4

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -171 lines) Patch
M src/accessors.cc View 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/ast.h View 2 3 4 5 6 1 chunk +10 lines, -3 lines 0 comments Download
M src/builtins.cc View 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M src/debug.cc View 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M src/disassembler.cc View 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M src/handles.h View 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/handles.cc View 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/heap.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/heap.cc View 1 2 3 4 5 6 47 chunks +102 lines, -99 lines 0 comments Download
M src/heap-inl.h View 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/isolate.h View 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 6 2 chunks +14 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 19 chunks +31 lines, -19 lines 0 comments Download
M src/objects-debug.cc View 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 5 chunks +18 lines, -8 lines 0 comments Download
M src/prettyprinter.cc View 2 3 4 5 6 1 chunk +4 lines, -4 lines 0 comments Download
M src/runtime.cc View 2 3 4 5 6 6 chunks +16 lines, -8 lines 0 comments Download
M src/string-stream.cc View 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M src/stub-cache.cc View 2 3 4 5 6 3 chunks +8 lines, -6 lines 0 comments Download
M src/x64/codegen-x64.cc View 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
zarko
Thanks Luke
10 years, 5 months ago (2010-07-16 20:22:17 UTC) #1
zarko
On 2010/07/16 20:22:17, zarko wrote: > Thanks > Luke It turns out that the Is{True,False,...} ...
10 years, 5 months ago (2010-07-19 21:02:17 UTC) #2
Vitaly Repeshko
LG with the comparison issue addressed. -- Vitaly http://codereview.chromium.org/3031005/diff/52001/53001 File src/accessors.cc (right): http://codereview.chromium.org/3031005/diff/52001/53001#newcode44 src/accessors.cc:44: if ...
10 years, 4 months ago (2010-08-02 12:49:47 UTC) #3
zarko
10 years, 4 months ago (2010-08-05 20:38:39 UTC) #4
http://codereview.chromium.org/3031005/diff/52001/53001
File src/accessors.cc (right):

http://codereview.chromium.org/3031005/diff/52001/53001#newcode44
src/accessors.cc:44: if (obj == heap->null_value()) return NULL;
On 2010/08/02 12:49:47, Vitaly wrote:
> Here and in lots of other places you're still using comparison to
> heap->null_value(). Even if there are no other heap usages around. Why can't
> these comparisons be replaced with obj->IsNull()?

It's likely cheaper to go through this sort of comparison in a loop as it would
involve a smaller net number of indirections.

Powered by Google App Engine
This is Rietveld 408576698