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

Issue 597021: Simple type tracking in the fast code generator. (Closed)

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

Description

Simple type tracking in the fast code generator. Initial implementation of ad hoc must-be-smi tracking in the fast code generator. Type information is used to avoid the write barrier for smi property stores and to avoid the smi check for the inputs/output of bitwise OR. Committed: http://code.google.com/p/v8/source/detail?r=3833

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -81 lines) Patch
M src/arm/fast-codegen-arm.cc View 3 chunks +49 lines, -19 lines 0 comments Download
M src/fast-codegen.h View 2 chunks +7 lines, -0 lines 4 comments Download
M src/ia32/fast-codegen-ia32.cc View 3 chunks +64 lines, -31 lines 2 comments Download
M src/x64/fast-codegen-x64.cc View 4 chunks +67 lines, -31 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
10 years, 10 months ago (2010-02-10 14:11:14 UTC) #1
fschneider
http://codereview.chromium.org/597021/diff/1/3 File src/fast-codegen.h (right): http://codereview.chromium.org/597021/diff/1/3#newcode102 src/fast-codegen.h:102: bool is_smi(Register reg) { return (smi_bits_ & reg.bit()) != ...
10 years, 10 months ago (2010-02-10 15:14:33 UTC) #2
Kevin Millikin (Chromium)
10 years, 10 months ago (2010-02-11 08:30:09 UTC) #3
http://codereview.chromium.org/597021/diff/1/3
File src/fast-codegen.h (right):

http://codereview.chromium.org/597021/diff/1/3#newcode102
src/fast-codegen.h:102: bool is_smi(Register reg) { return (smi_bits_ &
reg.bit()) != 0; }
On 2010/02/10 15:14:33, fschneider wrote:
> What happens if reg == no_reg? Maybe we should 
> ASSERT(reg != noreg) here, since reg.bit() of no_reg is -1.

Done.

http://codereview.chromium.org/597021/diff/1/3#newcode138
src/fast-codegen.h:138: uint32_t smi_bits_;
On 2010/02/10 15:14:33, fschneider wrote:
> smi_bits_ should be initialized to 0?

Done.

http://codereview.chromium.org/597021/diff/1/4
File src/ia32/fast-codegen-ia32.cc (right):

http://codereview.chromium.org/597021/diff/1/4#newcode115
src/ia32/fast-codegen-ia32.cc:115: if (is_smi(accumulator0())) {
On 2010/02/10 15:14:33, fschneider wrote:
> This condition should be always true, since there is no write barrier
generated,
> right?

Good catch.  I was trying to be too general and not assume that
needs_write_barrier was a synonym for !is_smi.  I'll change it.

Powered by Google App Engine
This is Rietveld 408576698