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

Side by Side 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 interpreter-assembler-unittest 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 unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/x87/builtins-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/interpreter-assembler.h" 9 #include "src/compiler/interpreter-assembler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 340 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
341 // and the key <key> with the value in the accumulator. 341 // and the key <key> with the value in the accumulator.
342 void Interpreter::DoKeyedStoreICStrict( 342 void Interpreter::DoKeyedStoreICStrict(
343 compiler::InterpreterAssembler* assembler) { 343 compiler::InterpreterAssembler* assembler) {
344 Callable ic = 344 Callable ic =
345 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); 345 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
346 DoPropertyStoreIC(ic, assembler); 346 DoPropertyStoreIC(ic, assembler);
347 } 347 }
348 348
349 349
350 // PushContext <context>
351 //
352 // Pushes the accumulator as the current context, and saves it in <context>
353 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
354 Node* reg_index = __ BytecodeOperandReg8(0);
355 Node* context = __ GetAccumulator();
356 __ SetContext(context);
357 __ StoreRegister(context, reg_index);
358 __ Dispatch();
359 }
360
361
362 // PopContext <context>
363 //
364 // Pops the current context and sets <context> as the new context.
365 void Interpreter::DoPopContext(compiler::InterpreterAssembler* assembler) {
366 Node* reg_index = __ BytecodeOperandReg8(0);
367 Node* context = __ LoadRegister(reg_index);
368 __ SetContext(context);
369 __ Dispatch();
370 }
371
372
350 void Interpreter::DoBinaryOp(Runtime::FunctionId function_id, 373 void Interpreter::DoBinaryOp(Runtime::FunctionId function_id,
351 compiler::InterpreterAssembler* assembler) { 374 compiler::InterpreterAssembler* assembler) {
352 // TODO(rmcilroy): Call ICs which back-patch bytecode with type specialized 375 // TODO(rmcilroy): Call ICs which back-patch bytecode with type specialized
353 // operations, instead of calling builtins directly. 376 // operations, instead of calling builtins directly.
354 Node* reg_index = __ BytecodeOperandReg8(0); 377 Node* reg_index = __ BytecodeOperandReg8(0);
355 Node* lhs = __ LoadRegister(reg_index); 378 Node* lhs = __ LoadRegister(reg_index);
356 Node* rhs = __ GetAccumulator(); 379 Node* rhs = __ GetAccumulator();
357 Node* result = __ CallRuntime(function_id, lhs, rhs); 380 Node* result = __ CallRuntime(function_id, lhs, rhs);
358 __ SetAccumulator(result); 381 __ SetAccumulator(result);
359 __ Dispatch(); 382 __ Dispatch();
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // 731 //
709 // Return the value in the accumulator. 732 // Return the value in the accumulator.
710 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 733 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
711 __ Return(); 734 __ Return();
712 } 735 }
713 736
714 737
715 } // namespace interpreter 738 } // namespace interpreter
716 } // namespace internal 739 } // namespace internal
717 } // namespace v8 740 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698