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

Unified Diff: src/code-stubs.h

Issue 2511603002: [ic] Support data handlers in LoadGlobalIC. (Closed)
Patch Set: Addressing comments and fix Created 4 years, 1 month 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') | src/ic/accessor-assembler.cc » ('J')
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 0168683298db8dffd957d3d8b35fa4c6589d4ea0..588a3069afa60ac9a55e7dafa35d13393e94a533 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1956,6 +1956,11 @@ class LoadGlobalICTrampolineStub : public TurboFanCodeStub {
Code::Kind GetCodeKind() const override { return Code::LOAD_GLOBAL_IC; }
+ TypeofMode typeof_mode() const {
+ LoadGlobalICState state(GetExtraICState());
+ return state.typeof_mode();
+ }
+
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@@ -2022,6 +2027,10 @@ class KeyedStoreICTrampolineTFStub : public StoreICTrampolineStub {
Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
+ LanguageMode language_mode() const {
+ return StoreICState(GetExtraICState()).language_mode();
+ }
+
DEFINE_TURBOFAN_CODE_STUB(KeyedStoreICTrampolineTF, StoreICTrampolineStub);
};
@@ -2059,7 +2068,23 @@ class LoadICStub : public TurboFanCodeStub {
class LoadICProtoArrayStub : public TurboFanCodeStub {
public:
- explicit LoadICProtoArrayStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+ explicit LoadICProtoArrayStub(Isolate* isolate,
+ bool throw_reference_error_if_nonexistent)
+ : TurboFanCodeStub(isolate) {
+ minor_key_ = ThrowReferenceErrorIfNonexistentBits::encode(
+ throw_reference_error_if_nonexistent);
+ }
+
+ bool throw_reference_error_if_nonexistent() const {
+ return ThrowReferenceErrorIfNonexistentBits::decode(minor_key_);
+ }
+
+ ExtraICState GetExtraICState() const final {
+ return static_cast<ExtraICState>(minor_key_);
+ }
+
+ private:
+ class ThrowReferenceErrorIfNonexistentBits : public BitField<bool, 0, 1> {};
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadICProtoArray);
DEFINE_TURBOFAN_CODE_STUB(LoadICProtoArray, TurboFanCodeStub);
@@ -2074,6 +2099,11 @@ class LoadGlobalICStub : public TurboFanCodeStub {
Code::Kind GetCodeKind() const override { return Code::LOAD_GLOBAL_IC; }
+ TypeofMode typeof_mode() const {
+ LoadGlobalICState state(GetExtraICState());
+ return state.typeof_mode();
+ }
+
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@@ -2099,6 +2129,11 @@ class StoreICStub : public TurboFanCodeStub {
}
Code::Kind GetCodeKind() const override { return Code::STORE_IC; }
+
+ LanguageMode language_mode() const {
+ return StoreICState(GetExtraICState()).language_mode();
+ }
+
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@@ -2136,6 +2171,10 @@ class KeyedStoreICTFStub : public StoreICStub {
Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
+ LanguageMode language_mode() const {
+ return StoreICState(GetExtraICState()).language_mode();
+ }
+
DEFINE_TURBOFAN_CODE_STUB(KeyedStoreICTF, StoreICStub);
};
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | src/ic/accessor-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698