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

Issue 334006: Simple toplevel code generator support for short-circuited boolean OR... (Closed)

Created:
11 years, 2 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Simple toplevel code generator support for short-circuited boolean OR in a non-test (ie, value or effect) context. (It is implicitly not in a test context because the code generator does not support expressions in a test context yet.) Compilation is essentially the same as in the optimized code generator. The expression (e0 || e1) is compiled as if it were (let (temp = e0) temp ? temp : e1). On ia32 and x64 a single shared ToBoolean stub is used to convert a value to a flag. The inlined checks assumed by the stub are reordered to compare to undefined (the common case in toplevel code?) first. On ARM a call to the runtime is used. In the interest of code size no checks are yet inlined on ARM. Committed: http://code.google.com/p/v8/source/detail?r=3118

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -30 lines) Patch
M src/arm/fast-codegen-arm.cc View 1 1 chunk +57 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 chunk +10 lines, -1 line 0 comments Download
M src/fast-codegen.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 chunk +12 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 1 chunk +82 lines, -0 lines 1 comment Download
M src/x64/codegen-x64.h View 1 chunk +12 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 1 chunk +83 lines, -0 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
11 years, 2 months ago (2009-10-23 05:31:49 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/334006/diff/4001/5005 File src/x64/fast-codegen-x64.cc (right): http://codereview.chromium.org/334006/diff/4001/5005#newcode515 Line 515: } Should "Load a Location into rax ...
11 years, 2 months ago (2009-10-23 07:20:04 UTC) #2
fschneider
11 years, 2 months ago (2009-10-23 08:41:37 UTC) #3
LGTM.

http://codereview.chromium.org/334006/diff/4001/5001
File src/ia32/fast-codegen-ia32.cc (right):

http://codereview.chromium.org/334006/diff/4001/5001#newcode518
Line 518: 
Idea: I don't know how relevant these expressions are for top-level code. But we
may want to consider not inlining all 5 checks here to conserve code size.

Powered by Google App Engine
This is Rietveld 408576698