| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index f9016f180b5b2aee5d33f7cbd4aec6607a23b1fb..3fadbf3eb2fd8067b7a09fa4f86553d1d9cd41c9 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -80,6 +80,7 @@ namespace internal {
|
| V(VectorKeyedLoad) \
|
| V(VectorLoad) \
|
| /* IC Handler stubs */ \
|
| + V(ExtendStorage) \
|
| V(LoadConstant) \
|
| V(LoadField) \
|
| V(StoreField) \
|
| @@ -981,6 +982,44 @@ 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);
|
| + }
|
| +
|
| + virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
|
| +
|
| + 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)
|
|
|