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

Issue 7992002: Improve Hydrogen code for accessing undefined/null/Infinity. (Closed)

Created:
9 years, 3 months ago by Sven Panne
Modified:
9 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Improve Hydrogen code for accessing undefined/null/Infinity. In some special (but probably very common) cases we can do better than loading from a global cell for these global properties by emitting the corresponding constant directly. This opens up opportunities for further improvements, coming in a separate CL...

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -13 lines) Patch
M src/factory.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M src/heap.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M src/heap.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 2 4 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
9 years, 3 months ago (2011-09-22 12:46:43 UTC) #1
Steven
LGTM. http://codereview.chromium.org/7992002/diff/7/src/factory.h File src/factory.h (right): http://codereview.chromium.org/7992002/diff/7/src/factory.h#newcode448 src/factory.h:448: // a null handle when the given name ...
9 years, 3 months ago (2011-09-22 13:57:23 UTC) #2
Sven Panne
9 years, 3 months ago (2011-09-23 07:59:48 UTC) #3
http://codereview.chromium.org/7992002/diff/7/src/factory.h
File src/factory.h (right):

http://codereview.chromium.org/7992002/diff/7/src/factory.h#newcode448
src/factory.h:448: // a null handle when the given name is unknown.
On 2011/09/22 13:57:23, Steven wrote:
> Add a comment that those properties of the global object are not
'configurable'
> and not 'writable', i.e. they are really global constants.

Done.

http://codereview.chromium.org/7992002/diff/7/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/7992002/diff/7/src/heap.h#newcode234
src/heap.h:234: V(infinity_symbol, "Infinity")
On 2011/09/22 13:57:23, Steven wrote:
> The runtime functions contain multiple calls of the form
> isolate->heap()->
>   AllocateStringFromAscii(CStrVector("Infinity"));
> Can you replace them by using the infinity_symbol instead? Same for NaN and
> -Infinity for which you would have to introduce another symbol.

Done. And I've just seen that the related Ctrl-C/Ctrl-V-generated parts of
runtime.cc *really* need a cleanup, but not in this CL...

Powered by Google App Engine
This is Rietveld 408576698