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

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

Issue 1756793002: [compiler] Introduce proper StrictNotEqualStub. (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/code-stubs.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) 90 REPLACE_RUNTIME_CALL(JSEqual, Runtime::kEqual)
91 REPLACE_RUNTIME_CALL(JSNotEqual, Runtime::kNotEqual) 91 REPLACE_RUNTIME_CALL(JSNotEqual, Runtime::kNotEqual)
92 REPLACE_RUNTIME_CALL(JSStrictNotEqual, Runtime::kStrictNotEqual)
93 REPLACE_RUNTIME_CALL(JSLessThan, Runtime::kLessThan) 92 REPLACE_RUNTIME_CALL(JSLessThan, Runtime::kLessThan)
94 REPLACE_RUNTIME_CALL(JSGreaterThan, Runtime::kGreaterThan) 93 REPLACE_RUNTIME_CALL(JSGreaterThan, Runtime::kGreaterThan)
95 REPLACE_RUNTIME_CALL(JSLessThanOrEqual, Runtime::kLessThanOrEqual) 94 REPLACE_RUNTIME_CALL(JSLessThanOrEqual, Runtime::kLessThanOrEqual)
96 REPLACE_RUNTIME_CALL(JSGreaterThanOrEqual, Runtime::kGreaterThanOrEqual) 95 REPLACE_RUNTIME_CALL(JSGreaterThanOrEqual, Runtime::kGreaterThanOrEqual)
97 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext) 96 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext)
98 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext) 97 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext)
99 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver) 98 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver)
100 #undef REPLACE_RUNTIME_CALL 99 #undef REPLACE_RUNTIME_CALL
101 100
102 #define REPLACE_STUB_CALL(Op, Stub) \ 101 #define REPLACE_STUB_CALL(Name) \
103 void JSGenericLowering::Lower##Op(Node* node) { \ 102 void JSGenericLowering::LowerJS##Name(Node* node) { \
104 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ 103 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \
105 Callable callable = CodeFactory::Stub(isolate()); \ 104 Callable callable = CodeFactory::Name(isolate()); \
106 ReplaceWithStubCall(node, callable, flags); \ 105 ReplaceWithStubCall(node, callable, flags); \
107 } 106 }
108 REPLACE_STUB_CALL(JSStrictEqual, StrictEqual) 107 REPLACE_STUB_CALL(StrictEqual)
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());
117 node->InsertInput(zone(), 0, stub_code); 117 node->InsertInput(zone(), 0, stub_code);
118 NodeProperties::ChangeOp(node, common()->Call(desc)); 118 NodeProperties::ChangeOp(node, common()->Call(desc));
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 } 776 }
777 777
778 778
779 MachineOperatorBuilder* JSGenericLowering::machine() const { 779 MachineOperatorBuilder* JSGenericLowering::machine() const {
780 return jsgraph()->machine(); 780 return jsgraph()->machine();
781 } 781 }
782 782
783 } // namespace compiler 783 } // namespace compiler
784 } // namespace internal 784 } // namespace internal
785 } // namespace v8 785 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698