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

Unified Diff: src/code-stubs.h

Issue 2595343002: [stubs] Port LoadFieldStub to TF (Closed)
Patch Set: Remerge Created 4 years 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 | « no previous file | 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 5b9b5351d983ae04f5d8a75fa94e7aff6f562c43..925ad1e631b1d3a47d2976d5612ef6942ba2018e 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -64,10 +64,6 @@ class Node;
/* used universally */ \
V(CallICTrampoline) \
/* --- HydrogenCodeStubs --- */ \
- /* These will be ported/eliminated */ \
- /* as part of the new IC system, ask */ \
- /* ishell before doing anything */ \
- V(LoadField) \
/* These should never be ported to TF */ \
/* because they are either used only by */ \
/* FCG/Crankshaft or are deprecated */ \
@@ -125,6 +121,7 @@ class Node;
V(StoreInterceptor) \
V(LoadApiGetter) \
V(LoadIndexedInterceptor) \
+ V(LoadField) \
V(GrowArrayElements) \
/* These are only called from FGC and */ \
/* can be removed when we use ignition */ \
@@ -1167,28 +1164,16 @@ class HandlerStub : public HydrogenCodeStub {
DEFINE_CODE_STUB_BASE(HandlerStub, HydrogenCodeStub);
};
-
-class LoadFieldStub: public HandlerStub {
+class LoadFieldStub : public TurboFanCodeStub {
public:
- LoadFieldStub(Isolate* isolate, FieldIndex index) : HandlerStub(isolate) {
- int property_index_key = index.GetFieldAccessStubKey();
- set_sub_minor_key(LoadFieldByIndexBits::encode(property_index_key));
- }
-
- FieldIndex index() const {
- int property_index_key = LoadFieldByIndexBits::decode(sub_minor_key());
- return FieldIndex::FromFieldAccessStubKey(property_index_key);
- }
+ explicit LoadFieldStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- protected:
- Code::Kind kind() const override { return Code::LOAD_IC; }
+ Code::Kind GetCodeKind() const override { return Code::HANDLER; }
+ ExtraICState GetExtraICState() const override { return GetCodeKind(); }
private:
- class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
-
- // TODO(ishell): The stub uses only kReceiver parameter.
- DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
- DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub);
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadField);
+ DEFINE_TURBOFAN_CODE_STUB(LoadField, TurboFanCodeStub);
};
class KeyedLoadSloppyArgumentsStub : public TurboFanCodeStub {
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698