| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index f9016f180b5b2aee5d33f7cbd4aec6607a23b1fb..a7dc962a2ddf7d119508dbe0e2f0bf04a19550ad 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -83,6 +83,7 @@ namespace internal {
|
| V(LoadConstant) \
|
| V(LoadField) \
|
| V(StoreField) \
|
| + V(ExtendStorage) \
|
| V(StoreGlobal) \
|
| V(StringLength)
|
|
|
| @@ -981,6 +982,42 @@ class StoreFieldStub : public HandlerStub {
|
| };
|
|
|
|
|
| +// Extend storage is called in a store inline cache when
|
| +// it is necessary to extend the properties array of a
|
| +// JSObject.
|
| +class ExtendStorageStub : public HandlerStub {
|
| + public:
|
| + ExtendStorageStub(Isolate* isolate, FieldIndex index,
|
| + Representation representation)
|
| + : HandlerStub(isolate) {
|
| + int property_index_key = index.GetFieldAccessStubKey();
|
| + uint8_t repr = PropertyDetails::EncodeRepresentation(representation);
|
| + set_sub_minor_key(StoreFieldByIndexBits::encode(property_index_key) |
|
| + RepresentationBits::encode(repr));
|
| + }
|
| +
|
| + FieldIndex index() const {
|
| + int property_index_key = StoreFieldByIndexBits::decode(sub_minor_key());
|
| + return FieldIndex::FromFieldAccessStubKey(property_index_key);
|
| + }
|
| +
|
| + Representation representation() {
|
| + uint8_t repr = RepresentationBits::decode(sub_minor_key());
|
| + return PropertyDetails::DecodeRepresentation(repr);
|
| + }
|
| +
|
| + protected:
|
| + virtual Code::Kind kind() const { return Code::STORE_IC; }
|
| + virtual Code::StubType GetStubType() { return Code::FAST; }
|
| +
|
| + private:
|
| + class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
|
| + class RepresentationBits : public BitField<uint8_t, 13, 4> {};
|
| +
|
| + DEFINE_HANDLER_CODE_STUB(ExtendStorage, HandlerStub);
|
| +};
|
| +
|
| +
|
| class StoreGlobalStub : public HandlerStub {
|
| public:
|
| StoreGlobalStub(Isolate* isolate, bool is_constant, bool check_global)
|
|
|