Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 334f7d3eaf56bd9262d18b2551cf0ee20c4d8c01..e7ef203ad925f6d4bbeddcd2c1a370ffdba942be 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -220,7 +220,7 @@ void Interpreter::DoLoadIC(compiler::InterpreterAssembler* assembler) { |
// KeyedLoadIC <object> <slot> |
// |
-// Calls the LoadIC at FeedBackVector slot <slot> for <object> and the key |
+// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key |
// in the accumulator. |
void Interpreter::DoKeyedLoadIC(compiler::InterpreterAssembler* assembler) { |
Callable ic = |
@@ -229,6 +229,46 @@ void Interpreter::DoKeyedLoadIC(compiler::InterpreterAssembler* assembler) { |
} |
+void Interpreter::DoPropertyStoreIC(Callable ic, |
+ compiler::InterpreterAssembler* assembler) { |
+ Node* code_target = __ HeapConstant(ic.code()); |
+ Node* object_reg_index = __ BytecodeOperandReg(0); |
+ Node* object = __ LoadRegister(object_reg_index); |
+ Node* name_reg_index = __ BytecodeOperandReg(1); |
+ Node* name = __ LoadRegister(name_reg_index); |
+ Node* value = __ GetAccumulator(); |
+ Node* raw_slot = __ BytecodeOperandIdx(2); |
+ Node* smi_slot = __ SmiTag(raw_slot); |
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ Node* result = __ CallIC(ic.descriptor(), code_target, object, name, value, |
+ smi_slot, type_feedback_vector); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+ |
+// StoreIC <object> <name> <slot> |
+// |
+// Calls the StoreIC at FeedBackVector slot <slot> for <object> and the name |
+// <name> with the value in the accumulator. |
+void Interpreter::DoStoreIC(compiler::InterpreterAssembler* assembler) { |
+ Callable ic = |
+ CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED); |
+ DoPropertyStoreIC(ic, assembler); |
+} |
+ |
+ |
+// KeyedStoreIC <object> <key> <slot> |
+// |
+// Calls the KeyStoreIC at FeedBackVector slot <slot> for <object> and the key |
+// <key> with the value in the accumulator. |
+void Interpreter::DoKeyedStoreIC(compiler::InterpreterAssembler* assembler) { |
+ Callable ic = |
+ CodeFactory::KeyedStoreICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED); |
+ DoPropertyStoreIC(ic, assembler); |
+} |
+ |
+ |
void Interpreter::DoBinaryOp(int builtin_context_index, |
compiler::InterpreterAssembler* assembler) { |
// TODO(rmcilroy): Call ICs which back-patch bytecode with type specialized |