Store offset between fixed typed array base and data start in object
authorjochen <jochen@chromium.org>
Wed, 22 Jul 2015 10:25:51 +0000 (03:25 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 22 Jul 2015 10:32:25 +0000 (10:32 +0000)
The layout of fixed typed array base is then capable of handling
external typed arrays as well. In a follow-up CL, I'll delete external
typed arrays, and use fixed typed array base instead

BUG=v8:3996
R=jarin@chromium.org,mstarzinger@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1248483007

Cr-Commit-Position: refs/heads/master@{#29786}

22 files changed:
src/arm/lithium-arm.cc
src/arm64/lithium-arm64.cc
src/arm64/lithium-codegen-arm64.cc
src/assembler.cc
src/assembler.h
src/elements-kind.cc
src/heap/heap.cc
src/hydrogen-instructions.h
src/hydrogen.cc
src/ia32/lithium-codegen-ia32.cc
src/ia32/lithium-ia32.cc
src/mips/lithium-mips.cc
src/mips64/lithium-mips64.cc
src/objects-inl.h
src/objects.h
src/ppc/lithium-ppc.cc
src/x64/lithium-codegen-x64.cc
src/x64/lithium-codegen-x64.h
src/x64/lithium-x64.cc
src/x87/lithium-codegen-x87.cc
src/x87/lithium-x87.cc
tools/external-reference-check.py

index bd46dd8f58c73d03d10d19e59241c1c2cad17d99..ad34013a2a92391aea36c4e2a1fd694bc3de698e 100644 (file)
@@ -2330,10 +2330,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
        !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
       (instr->value()->representation().IsDouble() &&
        IsDoubleOrFloatElementsKind(instr->elements_kind())));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
   LOperand* val = UseRegister(instr->value());
   LOperand* key = UseRegisterOrConstantAtStart(instr->key());
   LOperand* backing_store = UseRegister(instr->elements());
index f914551066411c49319d8a41899fd98ae2e028f8..e1119c2c678e4941ebb47e344ab5979dd9939a3c 100644 (file)
@@ -2388,10 +2388,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
             !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
            (instr->value()->representation().IsDouble() &&
             IsDoubleOrFloatElementsKind(instr->elements_kind())));
-    DCHECK((instr->is_fixed_typed_array() &&
-            instr->elements()->representation().IsTagged()) ||
-           (instr->is_external() &&
-            instr->elements()->representation().IsExternal()));
+    DCHECK(instr->elements()->representation().IsExternal());
     return new(zone()) LStoreKeyedExternal(elements, key, val, temp);
 
   } else if (instr->value()->representation().IsDouble()) {
index 66420f8d9d20e2664da39dd1f41ad5c483fad89f..836a0609b8642d2c48b7c73dcb24cc9854525ed9 100644 (file)
@@ -1476,9 +1476,14 @@ void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) {
 void LCodeGen::DoAddE(LAddE* instr) {
   Register result = ToRegister(instr->result());
   Register left = ToRegister(instr->left());
-  Operand right = (instr->right()->IsConstantOperand())
-      ? ToInteger32(LConstantOperand::cast(instr->right()))
-      : Operand(ToRegister32(instr->right()), SXTW);
+  Operand right = Operand(x0);  // Dummy initialization.
+  if (instr->hydrogen()->external_add_type() == AddOfExternalAndTagged) {
+    right = Operand(ToRegister(instr->right()));
+  } else if (instr->right()->IsConstantOperand()) {
+    right = ToInteger32(LConstantOperand::cast(instr->right()));
+  } else {
+    right = Operand(ToRegister32(instr->right()), SXTW);
+  }
 
   DCHECK(!instr->hydrogen()->CheckFlag(HValue::kCanOverflow));
   __ Add(result, left, right);
index 87afe8f6d8119159ff68f1c3d49e76ebce0dbc3b..afdddb52ba334cf798db40236e931dc65c6ac936 100644 (file)
@@ -1512,6 +1512,12 @@ ExternalReference ExternalReference::debug_step_in_fp_address(
 }
 
 
+ExternalReference ExternalReference::fixed_typed_array_base_data_offset() {
+  return ExternalReference(reinterpret_cast<void*>(
+      FixedTypedArrayBase::kDataOffset - kHeapObjectTag));
+}
+
+
 bool operator==(ExternalReference lhs, ExternalReference rhs) {
   return lhs.address() == rhs.address();
 }
index 50aec40014c40aa9225ae70400bb2804d6deb7f6..f53ecf6b15f065993bff6658005ec315a6a3718e 100644 (file)
@@ -1026,6 +1026,8 @@ class ExternalReference BASE_EMBEDDED {
 
   static ExternalReference stress_deopt_count(Isolate* isolate);
 
+  static ExternalReference fixed_typed_array_base_data_offset();
+
  private:
   explicit ExternalReference(void* address)
       : address_(address) {}
index 758b80ddbdeaaf3a86af3d5d632fbf50bb6cefca..07d2837bdc86ca747d1e4468887f6bfa6b049dfd 100644 (file)
@@ -53,13 +53,17 @@ int ElementsKindToShiftSize(ElementsKind elements_kind) {
 }
 
 
+static bool IsTypedArrayElementsKind(ElementsKind elements_kind) {
+  return IsFixedTypedArrayElementsKind(elements_kind) ||
+         IsExternalArrayElementsKind(elements_kind);
+}
+
+
 int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) {
   STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize);
 
-  if (IsExternalArrayElementsKind(elements_kind)) {
+  if (IsTypedArrayElementsKind(elements_kind)) {
     return 0;
-  } else if (IsFixedTypedArrayElementsKind(elements_kind)) {
-    return FixedTypedArrayBase::kDataOffset - kHeapObjectTag;
   } else {
     return FixedArray::kHeaderSize - kHeapObjectTag;
   }
@@ -135,12 +139,6 @@ ElementsKind GetNextTransitionElementsKind(ElementsKind kind) {
 }
 
 
-static bool IsTypedArrayElementsKind(ElementsKind elements_kind) {
-  return IsFixedTypedArrayElementsKind(elements_kind) ||
-      IsExternalArrayElementsKind(elements_kind);
-}
-
-
 static inline bool IsFastTransitionTarget(ElementsKind elements_kind) {
   return IsFastElementsKind(elements_kind) ||
       elements_kind == DICTIONARY_ELEMENTS;
index 04a580019e9cf5f1b97a9e52aed99abc91c74748..073bffcf897ea39ee19f19651f7382920f1def04 100644 (file)
@@ -4027,6 +4027,9 @@ AllocationResult Heap::AllocateFixedTypedArray(int length,
   object->set_map(MapForFixedTypedArray(array_type));
   FixedTypedArrayBase* elements = FixedTypedArrayBase::cast(object);
   elements->set_base_pointer(elements, SKIP_WRITE_BARRIER);
+  elements->set_external_pointer(
+      ExternalReference::fixed_typed_array_base_data_offset().address(),
+      SKIP_WRITE_BARRIER);
   elements->set_length(length);
   if (initialize) memset(elements->DataPtr(), 0, elements->DataSize());
   return elements;
index 9d95033080757ff489e43d7991e6a985995833f2..3d3c56cc4063d4ad4859b060a9509c92be84da58 100644 (file)
@@ -4895,6 +4895,8 @@ class HAdd final : public HArithmeticBinaryOperation {
              right()->representation().IsTagged()));
   }
 
+  ExternalAddType external_add_type() const { return external_add_type_; }
+
   DECLARE_CONCRETE_INSTRUCTION(Add)
 
  protected:
@@ -4913,6 +4915,8 @@ class HAdd final : public HArithmeticBinaryOperation {
         DCHECK(left->representation().IsExternal());
         DCHECK(right->representation().IsTagged());
         SetDependsOnFlag(kNewSpacePromotion);
+        ClearFlag(HValue::kCanOverflow);
+        SetFlag(kHasNoObservableSideEffects);
         break;
 
       case NoExternalAdd:
@@ -6028,6 +6032,12 @@ class HObjectAccess final {
                          Representation::Tagged());
   }
 
+  static HObjectAccess ForFixedTypedArrayBaseExternalPointer() {
+    return HObjectAccess::ForObservableJSObjectOffset(
+        FixedTypedArrayBase::kExternalPointerOffset,
+        Representation::External());
+  }
+
   static HObjectAccess ForStringHashField() {
     return HObjectAccess(kInobject,
                          String::kHashFieldOffset,
@@ -6648,11 +6658,11 @@ class HLoadKeyed final : public HTemplateInstruction<3>,
   Representation RequiredInputRepresentation(int index) override {
     // kind_fast:                 tagged[int32] (none)
     // kind_double:               tagged[int32] (none)
-    // kind_fixed_typed_array:    tagged[int32] (none)
+    // kind_fixed_typed_array:    external[int32] (none)
     // kind_external:             external[int32] (none)
     if (index == 0) {
-      return is_external() ? Representation::External()
-          : Representation::Tagged();
+      return is_typed_elements() ? Representation::External()
+                                 : Representation::Tagged();
     }
     if (index == 1) {
       return ArrayInstructionInterface::KeyedAccessIndexRequirement(
@@ -7113,8 +7123,8 @@ class HStoreKeyed final : public HTemplateInstruction<3>,
     // kind_fixed_typed_array:  tagged[int32] = (double | int32)
     // kind_external:           external[int32] = (double | int32)
     if (index == 0) {
-      return is_external() ? Representation::External()
-                           : Representation::Tagged();
+      return is_typed_elements() ? Representation::External()
+                                 : Representation::Tagged();
     } else if (index == 1) {
       return ArrayInstructionInterface::KeyedAccessIndexRequirement(
           OperandAt(1)->representation());
index 9cc27cade24ca991f7cccab7636bde204dce61eb..48d19995070f02b7067a0bbbfc30271e8c098577 100644 (file)
@@ -2458,7 +2458,14 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess(
       backing_store = Add<HLoadNamedField>(
           elements, nullptr, HObjectAccess::ForExternalArrayExternalPointer());
     } else {
-      backing_store = elements;
+      HValue* external_pointer = Add<HLoadNamedField>(
+          elements, nullptr,
+          HObjectAccess::ForFixedTypedArrayBaseExternalPointer());
+      HValue* base_pointer = Add<HLoadNamedField>(
+          elements, nullptr,
+          HObjectAccess::ForFixedTypedArrayBaseBasePointer());
+      backing_store = AddUncasted<HAdd>(external_pointer, base_pointer,
+                                        Strength::WEAK, AddOfExternalAndTagged);
     }
     if (store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS) {
       NoObservableSideEffectsScope no_effects(this);
@@ -10019,15 +10026,23 @@ HValue* HOptimizedGraphBuilder::BuildAllocateFixedTypedArray(
   Add<HStoreNamedField>(
       elements, HObjectAccess::ForFixedTypedArrayBaseBasePointer(), elements);
 
+  Add<HStoreNamedField>(
+      elements, HObjectAccess::ForFixedTypedArrayBaseExternalPointer(),
+      Add<HConstant>(ExternalReference::fixed_typed_array_base_data_offset()));
+
   HValue* filler = Add<HConstant>(static_cast<int32_t>(0));
 
   if (initialize) {
     LoopBuilder builder(this, context(), LoopBuilder::kPostIncrement);
 
+    HValue* backing_store = AddUncasted<HAdd>(
+        Add<HConstant>(ExternalReference::fixed_typed_array_base_data_offset()),
+        elements, Strength::WEAK, AddOfExternalAndTagged);
+
     HValue* key = builder.BeginBody(
         Add<HConstant>(static_cast<int32_t>(0)),
         length, Token::LT);
-    Add<HStoreKeyed>(elements, key, filler, fixed_elements_kind);
+    Add<HStoreKeyed>(backing_store, key, filler, fixed_elements_kind);
 
     builder.EndBody();
   }
index fb3c05ebab4f956655196bc728be25ef3d9038ea..4bed05280847f04382459659658edd0af8970004 100644 (file)
@@ -541,6 +541,10 @@ int32_t LCodeGen::ToInteger32(LConstantOperand* op) const {
 int32_t LCodeGen::ToRepresentation(LConstantOperand* op,
                                    const Representation& r) const {
   HConstant* constant = chunk_->LookupConstant(op);
+  if (r.IsExternal()) {
+    return reinterpret_cast<int32_t>(
+        constant->ExternalReferenceValue().address());
+  }
   int32_t value = constant->Integer32Value();
   if (r.IsInteger32()) return value;
   DCHECK(r.IsSmiOrTagged());
@@ -4087,7 +4091,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
     if (operand_value->IsRegister()) {
       Register value = ToRegister(operand_value);
       __ Store(value, operand, representation);
-    } else if (representation.IsInteger32()) {
+    } else if (representation.IsInteger32() || representation.IsExternal()) {
       Immediate immediate = ToImmediate(operand_value, representation);
       DCHECK(!instr->hydrogen()->NeedsWriteBarrier());
       __ mov(operand, immediate);
index b94020cbea70c3e4f4f7d431ab07add4d96ab3ae..eeccdd0502478b7d5f6eb9fba1b6b698330fab31 100644 (file)
@@ -2346,10 +2346,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
        !IsDoubleOrFloatElementsKind(elements_kind)) ||
       (instr->value()->representation().IsDouble() &&
        IsDoubleOrFloatElementsKind(elements_kind)));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
 
   LOperand* backing_store = UseRegister(instr->elements());
   LOperand* val = GetStoreKeyedValueOperand(instr);
index 733866572fb97c585e098747b38a2e522fe5151a..550610902f53bcbc9e838ce403f021b590993a18 100644 (file)
@@ -2277,10 +2277,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
        !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
       (instr->value()->representation().IsDouble() &&
        IsDoubleOrFloatElementsKind(instr->elements_kind())));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
   LOperand* val = UseRegister(instr->value());
   LOperand* key = UseRegisterOrConstantAtStart(instr->key());
   LOperand* backing_store = UseRegister(instr->elements());
index 7d06ec747fda8e2c58c23c2878b8e2220c7e4867..060582585d744e953f32c7cdcdd0e396a33e87bb 100644 (file)
@@ -2282,10 +2282,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
        !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
       (instr->value()->representation().IsDouble() &&
        IsDoubleOrFloatElementsKind(instr->elements_kind())));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
   LOperand* val = UseRegister(instr->value());
   LOperand* key = UseRegisterOrConstantAtStart(instr->key());
   LOperand* backing_store = UseRegister(instr->elements());
index c5f6486331fd0b849776d9bc5598a236c9927bb2..a4ca8c34e29eeec8737c7f0b3025952c319b54cd 100644 (file)
@@ -3833,8 +3833,23 @@ void ExternalFloat64Array::set(int index, double value) {
 ACCESSORS(FixedTypedArrayBase, base_pointer, Object, kBasePointerOffset)
 
 
+void* FixedTypedArrayBase::external_pointer() const {
+  intptr_t ptr = READ_INTPTR_FIELD(this, kExternalPointerOffset);
+  return reinterpret_cast<void*>(ptr);
+}
+
+
+void FixedTypedArrayBase::set_external_pointer(void* value,
+                                               WriteBarrierMode mode) {
+  intptr_t ptr = reinterpret_cast<intptr_t>(value);
+  WRITE_INTPTR_FIELD(this, kExternalPointerOffset, ptr);
+}
+
+
 void* FixedTypedArrayBase::DataPtr() {
-  return FIELD_ADDR(this, kDataOffset);
+  return reinterpret_cast<void*>(
+      reinterpret_cast<intptr_t>(base_pointer()) +
+      reinterpret_cast<intptr_t>(external_pointer()));
 }
 
 
@@ -3915,8 +3930,7 @@ double Float64ArrayTraits::defaultValue() {
 template <class Traits>
 typename Traits::ElementType FixedTypedArray<Traits>::get_scalar(int index) {
   DCHECK((index >= 0) && (index < this->length()));
-  ElementType* ptr = reinterpret_cast<ElementType*>(
-      FIELD_ADDR(this, kDataOffset));
+  ElementType* ptr = reinterpret_cast<ElementType*>(DataPtr());
   return ptr[index];
 }
 
@@ -3924,8 +3938,7 @@ typename Traits::ElementType FixedTypedArray<Traits>::get_scalar(int index) {
 template <class Traits>
 void FixedTypedArray<Traits>::set(int index, ElementType value) {
   DCHECK((index >= 0) && (index < this->length()));
-  ElementType* ptr = reinterpret_cast<ElementType*>(
-      FIELD_ADDR(this, kDataOffset));
+  ElementType* ptr = reinterpret_cast<ElementType*>(DataPtr());
   ptr[index] = value;
 }
 
index 4327f653095cf28f3053a6e9066dbb1354d52ee8..d8852427613ce939b7542b209bb5f39b0a522d63 100644 (file)
@@ -4536,6 +4536,10 @@ class FixedTypedArrayBase: public FixedArrayBase {
   // [base_pointer]: For now, points to the FixedTypedArrayBase itself.
   DECL_ACCESSORS(base_pointer, Object)
 
+  // [external_pointer]: For now, contains the offset between base_pointer and
+  // the start of the data.
+  DECL_ACCESSORS(external_pointer, void)
+
   // Dispatched behavior.
   inline void FixedTypedArrayBaseIterateBody(ObjectVisitor* v);
 
@@ -4544,11 +4548,12 @@ class FixedTypedArrayBase: public FixedArrayBase {
 
   DECLARE_CAST(FixedTypedArrayBase)
 
-  static const int kBasePointerOffset =
-      FixedArrayBase::kHeaderSize + kPointerSize;
-  static const int kHeaderSize = kBasePointerOffset + kPointerSize;
+  static const int kBasePointerOffset = FixedArrayBase::kHeaderSize;
+  static const int kExternalPointerOffset = kBasePointerOffset + kPointerSize;
+  static const int kHeaderSize =
+      DOUBLE_POINTER_ALIGN(kExternalPointerOffset + kPointerSize);
 
-  static const int kDataOffset = DOUBLE_POINTER_ALIGN(kHeaderSize);
+  static const int kDataOffset = kHeaderSize;
 
   inline int size();
 
index 15782e1075848606588755facc72e4608f430b7c..92dc76b22d8e17ffde2921c47c53ed22bb10a4da 100644 (file)
@@ -2283,10 +2283,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
           !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
          (instr->value()->representation().IsDouble() &&
           IsDoubleOrFloatElementsKind(instr->elements_kind())));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
   LOperand* val = UseRegister(instr->value());
   LOperand* key = UseRegisterOrConstantAtStart(instr->key());
   LOperand* backing_store = UseRegister(instr->elements());
index 6305dc7587db4bfb3cc3afa0fce6435b7e126faf..92688ce4992ed4b7089963b80af0a22babe70cb7 100644 (file)
@@ -458,6 +458,11 @@ bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const {
 }
 
 
+bool LCodeGen::IsExternalConstant(LConstantOperand* op) const {
+  return chunk_->LookupLiteralRepresentation(op).IsExternal();
+}
+
+
 bool LCodeGen::IsDehoistedKeyConstant(LConstantOperand* op) const {
   return op->IsConstantOperand() &&
       chunk_->IsDehoistedKey(chunk_->LookupConstant(op));
@@ -4218,6 +4223,11 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
         __ movl(operand, Immediate(value));
       }
 
+    } else if (IsExternalConstant(operand_value)) {
+      DCHECK(!hinstr->NeedsWriteBarrier());
+      ExternalReference ptr = ToExternalReference(operand_value);
+      __ Move(kScratchRegister, ptr);
+      __ movp(operand, kScratchRegister);
     } else {
       Handle<Object> handle_value = ToHandle(operand_value);
       DCHECK(!hinstr->NeedsWriteBarrier());
index 8fc7cdce2115c0d73354319392a3addb96392f3a..b08eff1952a3b7b8d49699cecb39f469571ab90a 100644 (file)
@@ -62,6 +62,7 @@ class LCodeGen: public LCodeGenBase {
   Register ToRegister(LOperand* op) const;
   XMMRegister ToDoubleRegister(LOperand* op) const;
   bool IsInteger32Constant(LConstantOperand* op) const;
+  bool IsExternalConstant(LConstantOperand* op) const;
   bool IsDehoistedKeyConstant(LConstantOperand* op) const;
   bool IsSmiConstant(LConstantOperand* op) const;
   int32_t ToRepresentation(LConstantOperand* op, const Representation& r) const;
index e41133cb0097570a60309abc6aa75e1857161a9c..46bb35ae8f9fab01007ce77bb5186f7dbb58290f 100644 (file)
@@ -2332,10 +2332,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
        !IsDoubleOrFloatElementsKind(elements_kind)) ||
        (instr->value()->representation().IsDouble() &&
        IsDoubleOrFloatElementsKind(elements_kind)));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
   bool val_is_temp_register =
       elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS ||
       elements_kind == EXTERNAL_FLOAT32_ELEMENTS ||
index 41612905fd0ed25836d13c032308fd7dc13d4547..dc5f2eec7a1f0cdf1124219d165a019d87e63781 100644 (file)
@@ -807,6 +807,10 @@ int32_t LCodeGen::ToInteger32(LConstantOperand* op) const {
 int32_t LCodeGen::ToRepresentation(LConstantOperand* op,
                                    const Representation& r) const {
   HConstant* constant = chunk_->LookupConstant(op);
+  if (r.IsExternal()) {
+    return reinterpret_cast<int32_t>(
+        constant->ExternalReferenceValue().address());
+  }
   int32_t value = constant->Integer32Value();
   if (r.IsInteger32()) return value;
   DCHECK(r.IsSmiOrTagged());
@@ -4494,7 +4498,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
     if (operand_value->IsRegister()) {
       Register value = ToRegister(operand_value);
       __ Store(value, operand, representation);
-    } else if (representation.IsInteger32()) {
+    } else if (representation.IsInteger32() || representation.IsExternal()) {
       Immediate immediate = ToImmediate(operand_value, representation);
       DCHECK(!instr->hydrogen()->NeedsWriteBarrier());
       __ mov(operand, immediate);
index f421c4addf381d4f49e8b99b398ebb6cdf15ade8..2f5f15f2887132d12d63a30090ee82f8713c54e9 100644 (file)
@@ -2350,10 +2350,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
        !IsDoubleOrFloatElementsKind(elements_kind)) ||
       (instr->value()->representation().IsDouble() &&
        IsDoubleOrFloatElementsKind(elements_kind)));
-  DCHECK((instr->is_fixed_typed_array() &&
-          instr->elements()->representation().IsTagged()) ||
-         (instr->is_external() &&
-          instr->elements()->representation().IsExternal()));
+  DCHECK(instr->elements()->representation().IsExternal());
 
   LOperand* backing_store = UseRegister(instr->elements());
   LOperand* val = GetStoreKeyedValueOperand(instr);
index bced8d478d085590c1324867c8a6f472ad0467af..287eca42515b9d909b646ada42722b0ab046c3be 100644 (file)
@@ -16,6 +16,7 @@ WORKSPACE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
 
 # Ignore those.
 BLACKLISTED = [
+  "fixed_typed_array_base_data_offset",
   "page_flags",
   "math_exp_constants",
   "math_exp_log_table",