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

Unified Diff: src/interpreter/interpreter.cc

Issue 1379793004: [Interpreter] Add support for new local function context creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_decl
Patch Set: Fix ia32 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 abe2e75739a4d4f8b39c3b61238460fd01180976..74cfd4782898db131ac44803c58464fae5e46d66 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -347,6 +347,29 @@ void Interpreter::DoKeyedStoreICStrict(
}
+// PushContext <context>
+//
+// Pushes the accumulator as the current context, and saves it in <context>
+void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
+ Node* reg_index = __ BytecodeOperandReg8(0);
+ Node* context = __ GetAccumulator();
+ __ SetContext(context);
+ __ StoreRegister(context, reg_index);
+ __ Dispatch();
+}
+
+
+// PopContext <context>
+//
+// Pops the current context and sets <context> as the new context.
+void Interpreter::DoPopContext(compiler::InterpreterAssembler* assembler) {
+ Node* reg_index = __ BytecodeOperandReg8(0);
+ Node* context = __ LoadRegister(reg_index);
+ __ SetContext(context);
+ __ Dispatch();
+}
+
+
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