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

Issue 7598030: Implement Harmony semantics for typeof null (behind a flag). (Closed)

Created:
9 years, 4 months ago by rossberg
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement Harmony semantics for typeof null (behind a flag). Harmony is intended to make typeof null === "null". This may break existing programs. Implementing it will allow us to run some tests on the actual web. R=kmillikin@chromium.org BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=8876

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -13 lines) Patch
M src/arm/full-codegen-arm.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/heap.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 chunk +2 lines, -1 line 2 comments Download
M src/x64/full-codegen-x64.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 2 chunks +8 lines, -2 lines 0 comments Download
A test/mjsunit/harmony/typeof.js View 1 chunk +35 lines, -0 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
rossberg
9 years, 4 months ago (2011-08-09 10:50:03 UTC) #1
Jakob Kummerow
(fixed typo in Kevin's email address.)
9 years, 4 months ago (2011-08-09 11:14:43 UTC) #2
Kevin Millikin (Chromium)
LGTM. http://codereview.chromium.org/7598030/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/7598030/diff/1/src/runtime.cc#newcode4857 src/runtime.cc:4857: : isolate->heap()->object_symbol(); Normal V8 style seems to be ...
9 years, 4 months ago (2011-08-10 09:52:21 UTC) #3
rossberg
9 years, 4 months ago (2011-08-10 12:01:35 UTC) #4
http://codereview.chromium.org/7598030/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/7598030/diff/1/src/runtime.cc#newcode4857
src/runtime.cc:4857: : isolate->heap()->object_symbol();
On 2011/08/10 09:52:21, Kevin Millikin wrote:
> Normal V8 style seems to be to break like this:
> 
> return FLAG_harmony_typeof
>     ? isolate->heap()->null_symbol()
>     : isolate->heap()->object_symbol();
> 
> Avoids running away to the right at the cost of one more line.

Done.

http://codereview.chromium.org/7598030/diff/1/test/mjsunit/harmony/typeof.js
File test/mjsunit/harmony/typeof.js (right):

http://codereview.chromium.org/7598030/diff/1/test/mjsunit/harmony/typeof.js#...
test/mjsunit/harmony/typeof.js:1: // Flags: --harmony-typeof
On 2011/08/10 09:52:21, Kevin Millikin wrote:
> We usually put the flags below the copyright notice.
> 
> And update the year in the copyright notice :)

Done.

Powered by Google App Engine
This is Rietveld 408576698