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

Unified Diff: src/code-stubs.h

Issue 443873002: Hydrogenize (and share) StoreField except heapobject (for now). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/stub-cache-arm64.cc ('k') | src/code-stubs-hydrogen.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 01f83ed54f5f7afa5274919620643b7521458fca..e9378de5bb8988f095f005f5691d1164a2f897ca 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -76,6 +76,7 @@ namespace internal {
V(CallApiGetter) \
/* IC Handler stubs */ \
V(LoadField) \
+ V(StoreField) \
V(LoadConstant) \
V(StringLength)
@@ -920,19 +921,13 @@ class LoadFieldStub: public HandlerStub {
public:
LoadFieldStub(Isolate* isolate, FieldIndex index)
: HandlerStub(isolate), index_(index) {
- int property_index_key = index_.GetLoadFieldStubKey();
+ int property_index_key = index_.GetFieldAccessStubKey();
bit_field_ = EncodedLoadFieldByIndexBits::encode(property_index_key);
}
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
- Representation representation() {
- if (unboxed_double()) return Representation::Double();
- return Representation::Tagged();
- }
-
FieldIndex index() const { return index_; }
- bool unboxed_double() { return index_.is_double(); }
protected:
explicit LoadFieldStub(Isolate* isolate);
@@ -980,6 +975,36 @@ class StringLengthStub: public HandlerStub {
};
+class StoreFieldStub : public HandlerStub {
+ public:
+ StoreFieldStub(Isolate* isolate, FieldIndex index,
+ Representation representation)
+ : HandlerStub(isolate), index_(index), representation_(representation) {
+ int property_index_key = index_.GetFieldAccessStubKey();
+ bit_field_ = EncodedStoreFieldByIndexBits::encode(property_index_key) |
+ RepresentationBits::encode(
+ PropertyDetails::EncodeRepresentation(representation));
+ }
+
+ virtual Handle<Code> GenerateCode() V8_OVERRIDE;
+
+ FieldIndex index() const { return index_; }
+ Representation representation() { return representation_; }
+
+ protected:
+ explicit StoreFieldStub(Isolate* isolate);
+ virtual Code::Kind kind() const { return Code::STORE_IC; }
+ virtual Code::StubType GetStubType() { return Code::FAST; }
+
+ private:
+ class EncodedStoreFieldByIndexBits : public BitField<int, 0, 13> {};
+ class RepresentationBits : public BitField<int, 13, 4> {};
+ virtual CodeStub::Major MajorKey() const { return StoreField; }
+ FieldIndex index_;
+ Representation representation_;
+};
+
+
class StoreGlobalStub : public HandlerStub {
public:
StoreGlobalStub(Isolate* isolate, bool is_constant, bool check_global)
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698