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

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 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 unified diff | Download patch
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 // 656 //
634 // Return the value in the accumulator. 657 // Return the value in the accumulator.
635 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 658 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
636 __ Return(); 659 __ Return();
637 } 660 }
638 661
639 662
640 } // namespace interpreter 663 } // namespace interpreter
641 } // namespace internal 664 } // namespace internal
642 } // namespace v8 665 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698