Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 7ec43c6ac507c66c2cc98698eaf85aef2bfe3f2f..bf0e261557b3ac5cefd85becf0e5834919534bc3 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -50,6 +50,7 @@ namespace internal { |
V(ArrayLength) \ |
V(StringLength) \ |
V(FunctionPrototype) \ |
+ V(StoreArrayLength) \ |
V(RecordWrite) \ |
V(StoreBufferOverflow) \ |
V(RegExpExec) \ |
@@ -179,6 +180,9 @@ class CodeStub BASE_EMBEDDED { |
virtual InlineCacheState GetICState() { |
return UNINITIALIZED; |
} |
+ virtual Code::ExtraICState GetExtraICState() { |
+ return Code::kNoExtraICState; |
+ } |
// Returns whether the code generated for this stub needs to be allocated as |
// a fixed (non-moveable) code object. |
@@ -605,6 +609,37 @@ class StringLengthStub: public ICStub { |
}; |
+class StoreICStub: public ICStub { |
+ public: |
+ StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) |
+ : ICStub(kind), strict_mode_(strict_mode) { } |
+ |
+ protected: |
+ virtual Code::ExtraICState GetExtraICState() { |
+ return strict_mode_; |
+ } |
+ |
+ private: |
+ class StrictModeBits: public BitField<bool, 4, 1> {}; |
+ virtual int MinorKey() { |
+ return KindBits::encode(kind()) | StrictModeBits::encode(strict_mode_); |
+ } |
+ |
+ StrictModeFlag strict_mode_; |
+}; |
+ |
+ |
+class StoreArrayLengthStub: public StoreICStub { |
+ public: |
+ explicit StoreArrayLengthStub(Code::Kind kind, StrictModeFlag strict_mode) |
+ : StoreICStub(kind, strict_mode) { } |
+ virtual void Generate(MacroAssembler* masm); |
+ |
+ private: |
+ virtual CodeStub::Major MajorKey() { return StoreArrayLength; } |
+}; |
+ |
+ |
class BinaryOpStub: public PlatformCodeStub { |
public: |
BinaryOpStub(Token::Value op, OverwriteMode mode) |