| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 6de90deb5b3309ff9069abff3f85af5951deaf8f..4bc8c613f34d2ec8003d25e88038585fdeb40259 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -2484,12 +2484,10 @@ class HCallNew: public HBinaryCall {
|
| class HCallNewArray: public HCallNew {
|
| public:
|
| HCallNewArray(HValue* context, HValue* constructor, int argument_count,
|
| - Handle<Cell> type_cell)
|
| + Handle<Cell> type_cell, ElementsKind elements_kind)
|
| : HCallNew(context, constructor, argument_count),
|
| - type_cell_(type_cell) {
|
| - elements_kind_ = static_cast<ElementsKind>(
|
| - Smi::cast(type_cell->value())->value());
|
| - }
|
| + elements_kind_(elements_kind),
|
| + type_cell_(type_cell) {}
|
|
|
| Handle<Cell> property_cell() const {
|
| return type_cell_;
|
| @@ -3311,6 +3309,10 @@ class HConstant: public HTemplateInstruction<0> {
|
| unique_id_ == UniqueValueId(heap->empty_string());
|
| }
|
|
|
| + bool IsCell() const {
|
| + return is_cell_;
|
| + }
|
| +
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::None();
|
| }
|
| @@ -3322,7 +3324,7 @@ class HConstant: public HTemplateInstruction<0> {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual bool EmitAtUses() { return !representation().IsDouble(); }
|
| + virtual bool EmitAtUses();
|
| virtual void PrintDataTo(StringStream* stream);
|
| virtual HType CalculateInferredType();
|
| bool IsInteger() { return handle()->IsSmi(); }
|
| @@ -3437,6 +3439,7 @@ class HConstant: public HTemplateInstruction<0> {
|
| bool has_double_value_ : 1;
|
| bool is_internalized_string_ : 1; // TODO(yangguo): make this part of HType.
|
| bool is_not_in_new_space_ : 1;
|
| + bool is_cell_ : 1;
|
| bool boolean_value_ : 1;
|
| int32_t int32_value_;
|
| double double_value_;
|
| @@ -5089,6 +5092,9 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object,
|
| HInnerAllocatedObject::cast(object)->base_object(),
|
| new_space_dominator);
|
| }
|
| + if (object->IsConstant() && HConstant::cast(object)->IsCell()) {
|
| + return false;
|
| + }
|
| if (object != new_space_dominator) return true;
|
| if (object->IsAllocateObject()) return false;
|
| if (object->IsAllocate()) {
|
| @@ -5350,6 +5356,9 @@ class HObjectAccess {
|
| static HObjectAccess ForField(Handle<Map> map,
|
| LookupResult *lookup, Handle<String> name = Handle<String>::null());
|
|
|
| + // Create an access for the payload of a Cell or JSGlobalPropertyCell.
|
| + static HObjectAccess ForCellPayload(Isolate* isolate);
|
| +
|
| void PrintTo(StringStream* stream);
|
|
|
| inline bool Equals(HObjectAccess that) const {
|
|
|