OLD | NEW |
---|---|
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/compiler/js-generic-lowering.h" | 5 #include "src/compiler/js-generic-lowering.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 | 126 |
127 void JSGenericLowering::LowerJSStrictNotEqual(Node* node) { | 127 void JSGenericLowering::LowerJSStrictNotEqual(Node* node) { |
128 // The !== operator doesn't need the current context. | 128 // The !== operator doesn't need the current context. |
129 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); | 129 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); |
130 Callable callable = CodeFactory::StrictNotEqual(isolate()); | 130 Callable callable = CodeFactory::StrictNotEqual(isolate()); |
131 node->RemoveInput(4); // control | 131 node->RemoveInput(4); // control |
132 ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags, | 132 ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags, |
133 Operator::kEliminatable); | 133 Operator::kEliminatable); |
134 } | 134 } |
135 | 135 |
136 void JSGenericLowering::LowerJSIsUndetectable(Node* node) { | |
137 UNREACHABLE(); // Should be replaced by ObjectIsUndetectable. | |
rmcilroy
2016/12/05 10:57:19
Nit - in typed lowering.
mythria
2016/12/05 14:53:10
Done.
| |
138 } | |
139 | |
136 void JSGenericLowering::LowerJSToBoolean(Node* node) { | 140 void JSGenericLowering::LowerJSToBoolean(Node* node) { |
137 // The ToBoolean conversion doesn't need the current context. | 141 // The ToBoolean conversion doesn't need the current context. |
138 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); | 142 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); |
139 Callable callable = CodeFactory::ToBoolean(isolate()); | 143 Callable callable = CodeFactory::ToBoolean(isolate()); |
140 node->AppendInput(zone(), graph()->start()); | 144 node->AppendInput(zone(), graph()->start()); |
141 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate, | 145 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate, |
142 Operator::kEliminatable); | 146 Operator::kEliminatable); |
143 } | 147 } |
144 | 148 |
145 void JSGenericLowering::LowerJSTypeOf(Node* node) { | 149 void JSGenericLowering::LowerJSTypeOf(Node* node) { |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
610 } | 614 } |
611 | 615 |
612 | 616 |
613 MachineOperatorBuilder* JSGenericLowering::machine() const { | 617 MachineOperatorBuilder* JSGenericLowering::machine() const { |
614 return jsgraph()->machine(); | 618 return jsgraph()->machine(); |
615 } | 619 } |
616 | 620 |
617 } // namespace compiler | 621 } // namespace compiler |
618 } // namespace internal | 622 } // namespace internal |
619 } // namespace v8 | 623 } // namespace v8 |
OLD | NEW |