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

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

Issue 1761783004: [WIP] EqualStub and NotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@StringRelationalComparison
Patch Set: Updates 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/code-stub-assembler.cc ('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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB) 80 REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB)
81 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL) 81 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL)
82 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV) 82 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV)
83 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD) 83 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD)
84 #undef REPLACE_BINARY_OP_IC_CALL 84 #undef REPLACE_BINARY_OP_IC_CALL
85 85
86 #define REPLACE_RUNTIME_CALL(op, fun) \ 86 #define REPLACE_RUNTIME_CALL(op, fun) \
87 void JSGenericLowering::Lower##op(Node* node) { \ 87 void JSGenericLowering::Lower##op(Node* node) { \
88 ReplaceWithRuntimeCall(node, fun); \ 88 ReplaceWithRuntimeCall(node, fun); \
89 } 89 }
90 REPLACE_RUNTIME_CALL(JSEqual, Runtime::kEqual)
91 REPLACE_RUNTIME_CALL(JSNotEqual, Runtime::kNotEqual)
92 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext) 90 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext)
93 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext) 91 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext)
94 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver) 92 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver)
95 #undef REPLACE_RUNTIME_CALL 93 #undef REPLACE_RUNTIME_CALL
96 94
97 #define REPLACE_STUB_CALL(Name) \ 95 #define REPLACE_STUB_CALL(Name) \
98 void JSGenericLowering::LowerJS##Name(Node* node) { \ 96 void JSGenericLowering::LowerJS##Name(Node* node) { \
99 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ 97 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \
100 Callable callable = CodeFactory::Name(isolate()); \ 98 Callable callable = CodeFactory::Name(isolate()); \
101 ReplaceWithStubCall(node, callable, flags); \ 99 ReplaceWithStubCall(node, callable, flags); \
102 } 100 }
103 REPLACE_STUB_CALL(LessThan) 101 REPLACE_STUB_CALL(LessThan)
104 REPLACE_STUB_CALL(LessThanOrEqual) 102 REPLACE_STUB_CALL(LessThanOrEqual)
105 REPLACE_STUB_CALL(GreaterThan) 103 REPLACE_STUB_CALL(GreaterThan)
106 REPLACE_STUB_CALL(GreaterThanOrEqual) 104 REPLACE_STUB_CALL(GreaterThanOrEqual)
105 REPLACE_STUB_CALL(Equal)
106 REPLACE_STUB_CALL(NotEqual)
107 REPLACE_STUB_CALL(StrictEqual) 107 REPLACE_STUB_CALL(StrictEqual)
108 REPLACE_STUB_CALL(StrictNotEqual) 108 REPLACE_STUB_CALL(StrictNotEqual)
109 #undef REPLACE_STUB_CALL 109 #undef REPLACE_STUB_CALL
110 110
111 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable, 111 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable,
112 CallDescriptor::Flags flags) { 112 CallDescriptor::Flags flags) {
113 Operator::Properties properties = node->op()->properties(); 113 Operator::Properties properties = node->op()->properties();
114 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 114 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
115 isolate(), zone(), callable.descriptor(), 0, flags, properties); 115 isolate(), zone(), callable.descriptor(), 0, flags, properties);
116 Node* stub_code = jsgraph()->HeapConstant(callable.code()); 116 Node* stub_code = jsgraph()->HeapConstant(callable.code());
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 775
776 776
777 MachineOperatorBuilder* JSGenericLowering::machine() const { 777 MachineOperatorBuilder* JSGenericLowering::machine() const {
778 return jsgraph()->machine(); 778 return jsgraph()->machine();
779 } 779 }
780 780
781 } // namespace compiler 781 } // namespace compiler
782 } // namespace internal 782 } // namespace internal
783 } // namespace v8 783 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-stub-assembler.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698