https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc
File src/hydrogen.cc (right):
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode6200
src/hydrogen.cc:6200: new(zone()) HObjectLiteral(context,
nit: strange indenting?
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10200
src/hydrogen.cc:10200: HInstruction* boilerplate_elements =
From here....
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10208
src/hydrogen.cc:10208: true, JSObject::kElementsOffset));
... til here is not needed.
This is a FixedArray, it doesn't have a elements()
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10210
src/hydrogen.cc:10210:
ASSERT(kFixedArrayHeaderSize = 2 * kPointer);
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10212
src/hydrogen.cc:10212: AddInstruction(new(zone)
HFixedArrayBaseLength(boilerplate_elements));
You can replace this with a constant load, too.
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10279
src/hydrogen.cc:10279: HInstruction* value_instruction;
Maybe different names? elements?
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10284
src/hydrogen.cc:10284: header_field, Representation::None()));
Tagged
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10290
src/hydrogen.cc:10290: factory->empty_string(),
nit: indent
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10293
src/hydrogen.cc:10293: AddSimulate(id);
Make sure to set the kChangesElementsPointer GVN flag here
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10296
src/hydrogen.cc:10296: value_instruction = AddInstruction(new(zone)
HConstant(
properties
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10301
src/hydrogen.cc:10301: true, JSObject::kPropertiesOffset));
As discussed, perhaps you only want to do this in the cow case? The
allocation of the elements might better belong next to the code above
the initializes the elements header and then copies the elements.
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10312
src/hydrogen.cc:10312: factory->empty_string(),
length_field_string
https://codereview.chromium.org/12880017/diff/7001/src/hydrogen.cc#newcode10314
src/hydrogen.cc:10314: true, JSArray::kLengthOffset));
Make sure to set the kChangesArrayLengths GVN flag here.
https://codereview.chromium.org/12880017/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.