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

Side by Side Diff: src/interpreter/interpreter.cc

Issue 2142273003: [interpreter] Inline Star on dispatch for some bytecodes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed nitpicks Created 4 years, 5 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 <fstream> 7 #include <fstream>
8 8
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 Node* reg_index = __ BytecodeOperandReg(0); 363 Node* reg_index = __ BytecodeOperandReg(0);
364 Node* value = __ LoadRegister(reg_index); 364 Node* value = __ LoadRegister(reg_index);
365 __ SetAccumulator(value); 365 __ SetAccumulator(value);
366 __ Dispatch(); 366 __ Dispatch();
367 } 367 }
368 368
369 // Star <dst> 369 // Star <dst>
370 // 370 //
371 // Store accumulator to register <dst>. 371 // Store accumulator to register <dst>.
372 void Interpreter::DoStar(InterpreterAssembler* assembler) { 372 void Interpreter::DoStar(InterpreterAssembler* assembler) {
373 Node* reg_index = __ BytecodeOperandReg(0); 373 __ StoreAccumulatorToRegister();
rmcilroy 2016/07/18 11:07:52 Not so keen on inlining this into the interpreter-
klaasb 2016/07/18 15:15:29 Done. Inlined.
374 Node* accumulator = __ GetAccumulator();
375 __ StoreRegister(accumulator, reg_index);
376 __ Dispatch(); 374 __ Dispatch();
377 } 375 }
378 376
379 // Mov <src> <dst> 377 // Mov <src> <dst>
380 // 378 //
381 // Stores the value of register <src> to register <dst>. 379 // Stores the value of register <src> to register <dst>.
382 void Interpreter::DoMov(InterpreterAssembler* assembler) { 380 void Interpreter::DoMov(InterpreterAssembler* assembler) {
383 Node* src_index = __ BytecodeOperandReg(0); 381 Node* src_index = __ BytecodeOperandReg(0);
384 Node* src_value = __ LoadRegister(src_index); 382 Node* src_value = __ LoadRegister(src_index);
385 Node* dst_index = __ BytecodeOperandReg(1); 383 Node* dst_index = __ BytecodeOperandReg(1);
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2022 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2025 __ SmiTag(new_state)); 2023 __ SmiTag(new_state));
2026 __ SetAccumulator(old_state); 2024 __ SetAccumulator(old_state);
2027 2025
2028 __ Dispatch(); 2026 __ Dispatch();
2029 } 2027 }
2030 2028
2031 } // namespace interpreter 2029 } // namespace interpreter
2032 } // namespace internal 2030 } // namespace internal
2033 } // namespace v8 2031 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698