Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 17f9200c12c7aacf509616f829ea966e51a896db..131887d4e4f2766d8cc41cb854319d0e740a64fe 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -2245,13 +2245,59 @@ class ToBooleanStub: public HydrogenCodeStub { |
}; |
-class ElementsTransitionAndStoreStub : public PlatformCodeStub { |
+class ElementsTransitionAndStoreStub : public HydrogenCodeStub { |
public: |
- ElementsTransitionAndStoreStub(ElementsKind from, |
- ElementsKind to, |
+ ElementsTransitionAndStoreStub(ElementsKind from_kind, |
+ ElementsKind to_kind, |
bool is_jsarray, |
- StrictModeFlag strict_mode, |
KeyedAccessStoreMode store_mode) |
+ : from_kind_(from_kind), |
+ to_kind_(to_kind), |
+ is_jsarray_(is_jsarray), |
+ store_mode_(store_mode) {} |
+ |
+ ElementsKind from_kind() const { return from_kind_; } |
+ ElementsKind to_kind() const { return to_kind_; } |
+ bool is_jsarray() const { return is_jsarray_; } |
+ KeyedAccessStoreMode store_mode() const { return store_mode_; } |
+ |
+ Handle<Code> GenerateCode(); |
+ |
+ void InitializeInterfaceDescriptor( |
+ Isolate* isolate, |
+ CodeStubInterfaceDescriptor* descriptor); |
+ |
+ private: |
+ class FromBits: public BitField<ElementsKind, 0, 8> {}; |
+ class ToBits: public BitField<ElementsKind, 8, 8> {}; |
+ class IsJSArrayBits: public BitField<bool, 16, 1> {}; |
+ class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {}; |
+ |
+ Major MajorKey() { return ElementsTransitionAndStore; } |
+ int NotMissMinorKey() { |
+ return FromBits::encode(from_kind_) | |
+ ToBits::encode(to_kind_) | |
+ IsJSArrayBits::encode(is_jsarray_) | |
+ StoreModeBits::encode(store_mode_); |
+ } |
+ |
+ ElementsKind from_kind_; |
+ ElementsKind to_kind_; |
+ bool is_jsarray_; |
+ KeyedAccessStoreMode store_mode_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); |
+}; |
+ |
+ |
+// TODO(bmeurer) Remove this when compiled transitions is enabled |
+class ElementsTransitionAndStorePlatformStub : public PlatformCodeStub { |
+ public: |
+ ElementsTransitionAndStorePlatformStub(ElementsKind from, |
+ ElementsKind to, |
+ bool is_jsarray, |
+ StrictModeFlag strict_mode, |
+ KeyedAccessStoreMode store_mode) |
: from_(from), |
to_(to), |
is_jsarray_(is_jsarray), |
@@ -2282,7 +2328,7 @@ class ElementsTransitionAndStoreStub : public PlatformCodeStub { |
StrictModeFlag strict_mode_; |
KeyedAccessStoreMode store_mode_; |
- DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); |
+ DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStorePlatformStub); |
}; |