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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1860043002: [stubs] Introduce MultiplyStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 8 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/code-stub-assembler.h ('k') | src/interpreter/interpreter.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 #define REPLACE_BINARY_OP_IC_CALL(Op, token) \ 67 #define REPLACE_BINARY_OP_IC_CALL(Op, token) \
68 void JSGenericLowering::Lower##Op(Node* node) { \ 68 void JSGenericLowering::Lower##Op(Node* node) { \
69 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ 69 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \
70 ReplaceWithStubCall(node, CodeFactory::BinaryOpIC(isolate(), token), \ 70 ReplaceWithStubCall(node, CodeFactory::BinaryOpIC(isolate(), token), \
71 CallDescriptor::kPatchableCallSiteWithNop | flags); \ 71 CallDescriptor::kPatchableCallSiteWithNop | flags); \
72 } 72 }
73 REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL) 73 REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL)
74 REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR) 74 REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR)
75 REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR) 75 REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR)
76 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL)
77 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV) 76 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV)
78 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD) 77 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD)
79 #undef REPLACE_BINARY_OP_IC_CALL 78 #undef REPLACE_BINARY_OP_IC_CALL
80 79
81 #define REPLACE_RUNTIME_CALL(op, fun) \ 80 #define REPLACE_RUNTIME_CALL(op, fun) \
82 void JSGenericLowering::Lower##op(Node* node) { \ 81 void JSGenericLowering::Lower##op(Node* node) { \
83 ReplaceWithRuntimeCall(node, fun); \ 82 ReplaceWithRuntimeCall(node, fun); \
84 } 83 }
85 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext) 84 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext)
86 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext) 85 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext)
87 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver) 86 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver)
88 #undef REPLACE_RUNTIME_CALL 87 #undef REPLACE_RUNTIME_CALL
89 88
90 #define REPLACE_STUB_CALL(Name) \ 89 #define REPLACE_STUB_CALL(Name) \
91 void JSGenericLowering::LowerJS##Name(Node* node) { \ 90 void JSGenericLowering::LowerJS##Name(Node* node) { \
92 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ 91 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \
93 Callable callable = CodeFactory::Name(isolate()); \ 92 Callable callable = CodeFactory::Name(isolate()); \
94 ReplaceWithStubCall(node, callable, flags); \ 93 ReplaceWithStubCall(node, callable, flags); \
95 } 94 }
96 REPLACE_STUB_CALL(Add) 95 REPLACE_STUB_CALL(Add)
97 REPLACE_STUB_CALL(Subtract) 96 REPLACE_STUB_CALL(Subtract)
97 REPLACE_STUB_CALL(Multiply)
98 REPLACE_STUB_CALL(BitwiseAnd) 98 REPLACE_STUB_CALL(BitwiseAnd)
99 REPLACE_STUB_CALL(BitwiseOr) 99 REPLACE_STUB_CALL(BitwiseOr)
100 REPLACE_STUB_CALL(BitwiseXor) 100 REPLACE_STUB_CALL(BitwiseXor)
101 REPLACE_STUB_CALL(LessThan) 101 REPLACE_STUB_CALL(LessThan)
102 REPLACE_STUB_CALL(LessThanOrEqual) 102 REPLACE_STUB_CALL(LessThanOrEqual)
103 REPLACE_STUB_CALL(GreaterThan) 103 REPLACE_STUB_CALL(GreaterThan)
104 REPLACE_STUB_CALL(GreaterThanOrEqual) 104 REPLACE_STUB_CALL(GreaterThanOrEqual)
105 REPLACE_STUB_CALL(Equal) 105 REPLACE_STUB_CALL(Equal)
106 REPLACE_STUB_CALL(NotEqual) 106 REPLACE_STUB_CALL(NotEqual)
107 REPLACE_STUB_CALL(StrictEqual) 107 REPLACE_STUB_CALL(StrictEqual)
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 747
748 748
749 MachineOperatorBuilder* JSGenericLowering::machine() const { 749 MachineOperatorBuilder* JSGenericLowering::machine() const {
750 return jsgraph()->machine(); 750 return jsgraph()->machine();
751 } 751 }
752 752
753 } // namespace compiler 753 } // namespace compiler
754 } // namespace internal 754 } // namespace internal
755 } // namespace v8 755 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698