Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index bd572c2f26b93e6ab5cb2d9e247529c32ff2b18f..1b160c40fa0495af5119e7b7eeaa77379d4cb213 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -77,6 +77,7 @@ namespace internal { |
V(DebuggerStatement) \ |
V(StringDictionaryLookup) \ |
V(ElementsTransitionAndStore) \ |
+ V(TransitionElementsKind) \ |
V(StoreArrayLiteralElement) \ |
V(StubFailureTrampoline) \ |
V(ProfileEntryHook) |
@@ -1218,6 +1219,40 @@ class KeyedLoadFastElementStub : public HydrogenCodeStub { |
}; |
+class TransitionElementsKindStub : public HydrogenCodeStub { |
+ public: |
+ TransitionElementsKindStub(ElementsKind from_kind, |
+ ElementsKind to_kind) { |
+ bit_field_ = FromKindBits::encode(from_kind) | |
+ ToKindBits::encode(to_kind); |
+ } |
+ |
+ Major MajorKey() { return TransitionElementsKind; } |
+ int MinorKey() { return bit_field_; } |
+ |
+ ElementsKind from_kind() const { |
+ return FromKindBits::decode(bit_field_); |
+ } |
+ |
+ ElementsKind to_kind() const { |
+ return ToKindBits::decode(bit_field_); |
+ } |
+ |
+ virtual Handle<Code> GenerateCode(); |
+ |
+ virtual void InitializeInterfaceDescriptor( |
+ Isolate* isolate, |
+ CodeStubInterfaceDescriptor* descriptor); |
+ |
+ private: |
+ class FromKindBits: public BitField<ElementsKind, 8, 8> {}; |
+ class ToKindBits: public BitField<ElementsKind, 0, 8> {}; |
+ uint32_t bit_field_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub); |
+}; |
+ |
+ |
class KeyedStoreElementStub : public PlatformCodeStub { |
public: |
KeyedStoreElementStub(bool is_js_array, |