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

Issue 316009: Support for object literals in fast compiler.... (Closed)

Created:
11 years, 2 months ago by fschneider
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Support for object literals in fast compiler. I also added more unit tests for literals. Right now, the fast compiler produces code very similar to the existing code generator. We may consider different ways to further compact the generated code for top-level code. ARM always goes through a runtime function to initialize computed properties in an object literal whereas IA32 and x64 use StoreIC. Committed: http://code.google.com/p/v8/source/detail?r=3129

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 35

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -6 lines) Patch
M src/arm/fast-codegen-arm.cc View 3 4 1 chunk +92 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 chunk +7 lines, -1 line 0 comments Download
M src/fast-codegen.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 1 2 3 4 1 chunk +102 lines, -0 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 3 4 1 chunk +98 lines, -0 lines 0 comments Download
M test/mjsunit/compiler/literals-assignment.js View 1 2 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
fschneider
This is the IA32 part.
11 years, 2 months ago (2009-10-22 14:31:12 UTC) #1
Kevin Millikin (Chromium)
Initial ideas. http://codereview.chromium.org/316009/diff/1001/11 File src/ia32/fast-codegen-ia32.cc (right): http://codereview.chromium.org/316009/diff/1001/11#newcode247 Line 247: switch (property->kind()) { You could avoid ...
11 years, 2 months ago (2009-10-22 15:13:15 UTC) #2
fschneider
Added ARM and x64 support. I did a few changes and cleanup to simplify the ...
11 years, 2 months ago (2009-10-23 13:13:46 UTC) #3
Kevin Millikin (Chromium)
I like the cleanup/simplification of ia32 and x64. They look good. I think the ARM ...
11 years, 2 months ago (2009-10-24 07:30:08 UTC) #4
fschneider
Another round of cleanup: - Fixes on ARM - Fixed indentation. - Removed unnecessary {}-blocks. ...
11 years, 1 month ago (2009-10-26 12:17:33 UTC) #5
Kevin Millikin (Chromium)
11 years, 1 month ago (2009-10-26 13:00:52 UTC) #6
LGTM.

http://codereview.chromium.org/316009/diff/7002/7008
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/316009/diff/7002/7008#newcode277
Line 277: __ ldr(r0, MemOperand(sp));
On 2009/10/26 12:17:33, fschneider wrote:
> On 2009/10/24 07:30:08, Kevin Millikin wrote:
> > The value restored to r0 from the stack is the same as the one already in r0
> > returned by the runtime.
> 
> Done. SetProperty return the value not the receiver in r0. So we have to save
r0
> in this case. I fixed this also on ia32 and x64.

Good catch.

Powered by Google App Engine
This is Rietveld 408576698