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

Unified Diff: src/code-stubs.h

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 6 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/code-factory.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 515f2e578e613470e9a228826df201f7bba6d116..ac373f018be8ec60bf27c90007325a01a3ee10b7 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -2114,24 +2114,37 @@ class StringCharAtGenerator {
class LoadDictionaryElementStub : public HydrogenCodeStub {
public:
- explicit LoadDictionaryElementStub(Isolate* isolate)
- : HydrogenCodeStub(isolate) {}
+ explicit LoadDictionaryElementStub(Isolate* isolate, const LoadICState& state)
+ : HydrogenCodeStub(isolate) {
+ minor_key_ = state.GetExtraICState();
+ }
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
return LoadWithVectorDescriptor(isolate());
}
+ LanguageMode language_mode() const {
+ return LoadICState::GetLanguageMode(MinorKey());
+ }
+
DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
};
class KeyedLoadGenericStub : public HydrogenCodeStub {
public:
- explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
+ explicit KeyedLoadGenericStub(Isolate* isolate, const LoadICState& state)
+ : HydrogenCodeStub(isolate) {
+ minor_key_ = state.GetExtraICState();
+ }
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const override { return GENERIC; }
+ LanguageMode language_mode() const {
+ return LoadICState::GetLanguageMode(MinorKey());
+ }
+
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
@@ -2153,7 +2166,7 @@ class LoadICTrampolineStub : public PlatformCodeStub {
return static_cast<ExtraICState>(minor_key_);
}
- private:
+ protected:
LoadICState state() const {
return LoadICState(static_cast<ExtraICState>(minor_key_));
}
@@ -2165,8 +2178,8 @@ class LoadICTrampolineStub : public PlatformCodeStub {
class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
public:
- explicit KeyedLoadICTrampolineStub(Isolate* isolate)
- : LoadICTrampolineStub(isolate, LoadICState(0)) {}
+ explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state)
+ : LoadICTrampolineStub(isolate, state) {}
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
@@ -2272,12 +2285,18 @@ class LoadICStub : public PlatformCodeStub {
class KeyedLoadICStub : public PlatformCodeStub {
public:
- explicit KeyedLoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
+ explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state)
+ : PlatformCodeStub(isolate) {
+ minor_key_ = state.GetExtraICState();
+ }
void GenerateForTrampoline(MacroAssembler* masm);
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const final { return DEFAULT; }
+ ExtraICState GetExtraICState() const final {
+ return static_cast<ExtraICState>(minor_key_);
+ }
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub);
@@ -2321,6 +2340,9 @@ class VectorKeyedStoreICStub : public PlatformCodeStub {
Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
InlineCacheState GetICState() const final { return DEFAULT; }
+ virtual ExtraICState GetExtraICState() const final {
+ return static_cast<ExtraICState>(minor_key_);
+ }
DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC);
DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub);
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698