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

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

Issue 1823083002: [stubs] Introduce AddStub and SubtractStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/compiler/raw-machine-assembler.h ('k') | no next file » | 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/ast/prettyprinter.h" 7 #include "src/ast/prettyprinter.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 Node* result = __ CallRuntime(function_id, context, lhs, rhs); 642 Node* result = __ CallRuntime(function_id, context, lhs, rhs);
643 __ SetAccumulator(result); 643 __ SetAccumulator(result);
644 __ Dispatch(); 644 __ Dispatch();
645 } 645 }
646 646
647 647
648 // Add <src> 648 // Add <src>
649 // 649 //
650 // Add register <src> to accumulator. 650 // Add register <src> to accumulator.
651 void Interpreter::DoAdd(InterpreterAssembler* assembler) { 651 void Interpreter::DoAdd(InterpreterAssembler* assembler) {
652 DoBinaryOp(Runtime::kAdd, assembler); 652 DoBinaryOp(CodeFactory::Add(isolate_), assembler);
653 } 653 }
654 654
655 655
656 // Sub <src> 656 // Sub <src>
657 // 657 //
658 // Subtract register <src> from accumulator. 658 // Subtract register <src> from accumulator.
659 void Interpreter::DoSub(InterpreterAssembler* assembler) { 659 void Interpreter::DoSub(InterpreterAssembler* assembler) {
660 DoBinaryOp(Runtime::kSubtract, assembler); 660 DoBinaryOp(CodeFactory::Subtract(isolate_), assembler);
661 } 661 }
662 662
663 663
664 // Mul <src> 664 // Mul <src>
665 // 665 //
666 // Multiply accumulator by register <src>. 666 // Multiply accumulator by register <src>.
667 void Interpreter::DoMul(InterpreterAssembler* assembler) { 667 void Interpreter::DoMul(InterpreterAssembler* assembler) {
668 DoBinaryOp(Runtime::kMultiply, assembler); 668 DoBinaryOp(Runtime::kMultiply, assembler);
669 } 669 }
670 670
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 // Illegal 1605 // Illegal
1606 // 1606 //
1607 // An invalid bytecode aborting execution if dispatched. 1607 // An invalid bytecode aborting execution if dispatched.
1608 void Interpreter::DoIllegal(InterpreterAssembler* assembler) { 1608 void Interpreter::DoIllegal(InterpreterAssembler* assembler) {
1609 __ Abort(kInvalidBytecode); 1609 __ Abort(kInvalidBytecode);
1610 } 1610 }
1611 1611
1612 } // namespace interpreter 1612 } // namespace interpreter
1613 } // namespace internal 1613 } // namespace internal
1614 } // namespace v8 1614 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698