| 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/builtins/builtins-constructor.h" | 8 #include "src/builtins/builtins-constructor.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 void JSGenericLowering::LowerJSStrictEqual(Node* node) { | 121 void JSGenericLowering::LowerJSStrictEqual(Node* node) { |
| 122 // The === operator doesn't need the current context. | 122 // The === operator doesn't need the current context. |
| 123 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); | 123 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); |
| 124 Callable callable = CodeFactory::StrictEqual(isolate()); | 124 Callable callable = CodeFactory::StrictEqual(isolate()); |
| 125 node->RemoveInput(4); // control | 125 node->RemoveInput(4); // control |
| 126 ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags, | 126 ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags, |
| 127 Operator::kEliminatable); | 127 Operator::kEliminatable); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void JSGenericLowering::LowerJSStrictNotEqual(Node* node) { | |
| 131 // The !== operator doesn't need the current context. | |
| 132 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); | |
| 133 Callable callable = CodeFactory::StrictNotEqual(isolate()); | |
| 134 node->RemoveInput(4); // control | |
| 135 ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags, | |
| 136 Operator::kEliminatable); | |
| 137 } | |
| 138 | |
| 139 void JSGenericLowering::LowerJSToBoolean(Node* node) { | 130 void JSGenericLowering::LowerJSToBoolean(Node* node) { |
| 140 // The ToBoolean conversion doesn't need the current context. | 131 // The ToBoolean conversion doesn't need the current context. |
| 141 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); | 132 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); |
| 142 Callable callable = CodeFactory::ToBoolean(isolate()); | 133 Callable callable = CodeFactory::ToBoolean(isolate()); |
| 143 node->AppendInput(zone(), graph()->start()); | 134 node->AppendInput(zone(), graph()->start()); |
| 144 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate, | 135 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate, |
| 145 Operator::kEliminatable); | 136 Operator::kEliminatable); |
| 146 } | 137 } |
| 147 | 138 |
| 148 void JSGenericLowering::LowerJSClassOf(Node* node) { | 139 void JSGenericLowering::LowerJSClassOf(Node* node) { |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 } | 698 } |
| 708 | 699 |
| 709 | 700 |
| 710 MachineOperatorBuilder* JSGenericLowering::machine() const { | 701 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 711 return jsgraph()->machine(); | 702 return jsgraph()->machine(); |
| 712 } | 703 } |
| 713 | 704 |
| 714 } // namespace compiler | 705 } // namespace compiler |
| 715 } // namespace internal | 706 } // namespace internal |
| 716 } // namespace v8 | 707 } // namespace v8 |
| OLD | NEW |