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

Issue 9370019: Implement inlined object allocation in Crankshaft. (Closed)

Created:
8 years, 10 months ago by Michael Starzinger
Modified:
8 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement inlined object allocation in Crankshaft. Generates inlined code for object allocation specific to the initial map of the given constructor function. Also forces completion of inobject slack tracking while crankshafting to finalize instance size of these objects. R=vegorov@chromium.org TEST=mjsunit/compiler/alloc-object Committed: https://code.google.com/p/v8/source/detail?r=10881

Patch Set 1 #

Patch Set 2 : Rebased. #

Patch Set 3 : Simplified implementation and added test case. #

Patch Set 4 : Ported to x64 and ARM. #

Total comments: 6

Patch Set 5 : Addressed comments by Vyacheslav Egorov. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+569 lines, -16 lines) Patch
M src/arm/lithium-arm.h View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M src/arm/lithium-arm.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 1 chunk +39 lines, -3 lines 0 comments Download
M src/hydrogen.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 1 chunk +54 lines, -3 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 1 chunk +54 lines, -3 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A test/mjsunit/compiler/alloc-object.js View 1 2 3 1 chunk +90 lines, -0 lines 0 comments Download
A test/mjsunit/compiler/alloc-object-huge.js View 1 2 3 4 1 chunk +308 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Michael Starzinger
Depends on https://chromiumcodereview.appspot.com/9304001/.
8 years, 10 months ago (2012-02-09 14:12:12 UTC) #1
Michael Starzinger
Rebased. Added new patch set.
8 years, 9 months ago (2012-02-28 11:27:52 UTC) #2
Vyacheslav Egorov (Chromium)
lgtm with test case that covers all cases (in object/out of object properties, slack tracking ...
8 years, 9 months ago (2012-02-28 18:00:32 UTC) #3
Michael Starzinger
Added new patch set.
8 years, 9 months ago (2012-02-29 17:35:08 UTC) #4
Michael Starzinger
Added new patch set.
8 years, 9 months ago (2012-03-01 09:15:54 UTC) #5
Vyacheslav Egorov (Chromium)
LGTM with additional test case that tests case when constructor is marked with ForbidInlineConstructor. (e.g. ...
8 years, 9 months ago (2012-03-01 10:34:28 UTC) #6
Michael Starzinger
8 years, 9 months ago (2012-03-01 11:11:24 UTC) #7
Addressed comments. Added new patch set. Rebased. Landed.

https://chromiumcodereview.appspot.com/9370019/diff/9001/src/arm/lithium-code...
File src/arm/lithium-codegen-arm.cc (right):

https://chromiumcodereview.appspot.com/9370019/diff/9001/src/arm/lithium-code...
src/arm/lithium-codegen-arm.cc:4381: for (int i = 0; i <
initial_map->inobject_properties(); i++) {
On 2012/03/01 10:34:28, Vyacheslav Egorov wrote:
> move this loop into the if. it's correct but a bit confusing when it's
outside.

Done.

https://chromiumcodereview.appspot.com/9370019/diff/9001/src/ia32/lithium-cod...
File src/ia32/lithium-codegen-ia32.cc (right):

https://chromiumcodereview.appspot.com/9370019/diff/9001/src/ia32/lithium-cod...
src/ia32/lithium-codegen-ia32.cc:4268: __ mov(FieldOperand(result,
property_offset), undefined);
On 2012/03/01 10:34:28, Vyacheslav Egorov wrote:
> I't might be better to load undefined into a register (we have scratch?)

Done.

https://chromiumcodereview.appspot.com/9370019/diff/9001/src/x64/lithium-code...
File src/x64/lithium-codegen-x64.cc (right):

https://chromiumcodereview.appspot.com/9370019/diff/9001/src/x64/lithium-code...
src/x64/lithium-codegen-x64.cc:3999: __ Move(FieldOperand(result,
property_offset), undefined);
On 2012/03/01 10:34:28, Vyacheslav Egorov wrote:
> consider pre loading undefined into a register (it's a huge 64-bit constant).

Done.

Powered by Google App Engine
This is Rietveld 408576698