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

Unified Diff: src/interpreter/interpreter.cc

Issue 1385623002: [Interpreter]: Add support for strict mode load / store ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index f36ba9efeb45b3ab8038b23f10600ceabe813876..f5164aaf9f2e23400db7125333cabd2ee892ce39 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -230,6 +230,17 @@ void Interpreter::DoLoadIC(compiler::InterpreterAssembler* assembler) {
}
+// LoadICStrict <object> <slot>
+//
+// Calls the strict mode LoadIC at FeedBackVector slot <slot> for <object> and
+// the name in the accumulator.
+void Interpreter::DoLoadICStrict(compiler::InterpreterAssembler* assembler) {
+ Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
+ STRICT, UNINITIALIZED);
+ DoPropertyLoadIC(ic, assembler);
+}
+
+
// KeyedLoadIC <object> <slot>
//
// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key
@@ -241,6 +252,18 @@ void Interpreter::DoKeyedLoadIC(compiler::InterpreterAssembler* assembler) {
}
+// KeyedLoadICStrict <object> <slot>
+//
+// Calls the strict mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
+// and the key in the accumulator.
+void Interpreter::DoKeyedLoadICStrict(
+ compiler::InterpreterAssembler* assembler) {
+ Callable ic =
+ CodeFactory::KeyedLoadICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
+ DoPropertyLoadIC(ic, assembler);
+}
+
+
void Interpreter::DoPropertyStoreIC(Callable ic,
compiler::InterpreterAssembler* assembler) {
Node* code_target = __ HeapConstant(ic.code());
@@ -270,6 +293,17 @@ void Interpreter::DoStoreIC(compiler::InterpreterAssembler* assembler) {
}
+// StoreICStrict <object> <name> <slot>
+//
+// Calls the strict mode StoreIC at FeedBackVector slot <slot> for <object> and
+// the name <name> with the value in the accumulator.
+void Interpreter::DoStoreICStrict(compiler::InterpreterAssembler* assembler) {
+ Callable ic =
+ CodeFactory::StoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
+ DoPropertyStoreIC(ic, assembler);
+}
+
+
// KeyedStoreIC <object> <key> <slot>
//
// Calls the KeyStoreIC at FeedBackVector slot <slot> for <object> and the key
@@ -281,6 +315,18 @@ void Interpreter::DoKeyedStoreIC(compiler::InterpreterAssembler* assembler) {
}
+// KeyedStoreICStore <object> <key> <slot>
+//
+// Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
+// and the key <key> with the value in the accumulator.
+void Interpreter::DoKeyedStoreICStrict(
+ compiler::InterpreterAssembler* assembler) {
+ Callable ic =
+ CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
+ DoPropertyStoreIC(ic, assembler);
+}
+
+
void Interpreter::DoBinaryOp(Runtime::FunctionId function_id,
compiler::InterpreterAssembler* assembler) {
// TODO(rmcilroy): Call ICs which back-patch bytecode with type specialized

Powered by Google App Engine
This is Rietveld 408576698