Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: src/code-stubs.h

Issue 587203002: ExtendStorageStub added, it is aimed for extending objects backing store when it runs out of space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698