Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 8380266d92edf0b13f644f38f3f2917c1fdaf119..b5c07e5a09ef774838257860e10c209060901e42 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -16,6 +16,7 @@ namespace internal { |
// List of code stubs used on all platforms. |
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
+ V(ArrayShift) \ |
V(CallFunction) \ |
V(CallConstruct) \ |
V(BinaryOpIC) \ |
@@ -2466,6 +2467,36 @@ class ElementsTransitionAndStoreStub : public HydrogenCodeStub { |
}; |
+class ArrayShiftStub V8_FINAL : public HydrogenCodeStub { |
+ public: |
+ ArrayShiftStub(Isolate* isolate, ElementsKind kind) |
+ : HydrogenCodeStub(isolate), kind_(kind) { } |
+ |
+ ElementsKind kind() const { return kind_; } |
+ |
+ virtual Handle<Code> GenerateCode() V8_OVERRIDE; |
+ |
+ virtual void InitializeInterfaceDescriptor( |
+ CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; |
+ |
+ // Inline Array.shift() for arrays up to this length. |
+ static const int kInlineThreshold = 16; |
+ |
+ // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
+ static const int kReceiver = 0; |
+ |
+ private: |
+ Major MajorKey() { return ArrayShift; } |
+ int NotMissMinorKey() { |
+ return kind_; |
+ } |
+ |
+ ElementsKind kind_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ArrayShiftStub); |
+}; |
+ |
+ |
class StoreArrayLiteralElementStub : public PlatformCodeStub { |
public: |
explicit StoreArrayLiteralElementStub(Isolate* isolate) |