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

Unified Diff: src/code-stubs.h

Issue 609463003: Hydrogenize (and share) part of StoreTransition handler as a StoreTransitionStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing 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 154db16b149069c4ecfdaf4bcc104145ecf4998a..fc34ed05919c35cc04adcd769665ffad69126da5 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -80,12 +80,12 @@ namespace internal {
V(VectorKeyedLoad) \
V(VectorLoad) \
/* IC Handler stubs */ \
- V(ExtendStorage) \
V(LoadConstant) \
V(LoadField) \
V(KeyedLoadSloppyArguments) \
V(StoreField) \
V(StoreGlobal) \
+ V(StoreTransition) \
V(StringLength)
// List of code stubs only used on ARM 32 bits platforms.
@@ -999,30 +999,45 @@ 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 {
+class StoreTransitionStub : public HandlerStub {
public:
- ExtendStorageStub(Isolate* isolate, FieldIndex index,
- Representation representation)
+ enum StoreMode {
+ StoreMapOnly,
+ StoreMapAndValue,
+ ExtendStorageAndStoreMapAndValue
+ };
+
+ explicit StoreTransitionStub(Isolate* isolate) : HandlerStub(isolate) {
+ set_sub_minor_key(StoreModeBits::encode(StoreMapOnly));
+ }
+
+ StoreTransitionStub(Isolate* isolate, FieldIndex index,
+ Representation representation, StoreMode store_mode)
: HandlerStub(isolate) {
+ DCHECK(store_mode != StoreMapOnly);
int property_index_key = index.GetFieldAccessStubKey();
uint8_t repr = PropertyDetails::EncodeRepresentation(representation);
set_sub_minor_key(StoreFieldByIndexBits::encode(property_index_key) |
- RepresentationBits::encode(repr));
+ RepresentationBits::encode(repr) |
+ StoreModeBits::encode(store_mode));
}
FieldIndex index() const {
+ DCHECK(store_mode() != StoreMapOnly);
int property_index_key = StoreFieldByIndexBits::decode(sub_minor_key());
return FieldIndex::FromFieldAccessStubKey(property_index_key);
}
Representation representation() {
+ DCHECK(store_mode() != StoreMapOnly);
uint8_t repr = RepresentationBits::decode(sub_minor_key());
return PropertyDetails::DecodeRepresentation(repr);
}
+ StoreMode store_mode() const {
+ return StoreModeBits::decode(sub_minor_key());
+ }
+
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
protected:
@@ -1032,8 +1047,9 @@ class ExtendStorageStub : public HandlerStub {
private:
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
class RepresentationBits : public BitField<uint8_t, 13, 4> {};
+ class StoreModeBits : public BitField<StoreMode, 17, 2> {};
- DEFINE_HANDLER_CODE_STUB(ExtendStorage, HandlerStub);
+ DEFINE_HANDLER_CODE_STUB(StoreTransition, HandlerStub);
};
« 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