| 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/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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 REPLACE_STUB_CALL(Multiply) | 79 REPLACE_STUB_CALL(Multiply) |
| 80 REPLACE_STUB_CALL(Divide) | 80 REPLACE_STUB_CALL(Divide) |
| 81 REPLACE_STUB_CALL(Modulus) | 81 REPLACE_STUB_CALL(Modulus) |
| 82 REPLACE_STUB_CALL(BitwiseAnd) | 82 REPLACE_STUB_CALL(BitwiseAnd) |
| 83 REPLACE_STUB_CALL(BitwiseOr) | 83 REPLACE_STUB_CALL(BitwiseOr) |
| 84 REPLACE_STUB_CALL(BitwiseXor) | 84 REPLACE_STUB_CALL(BitwiseXor) |
| 85 REPLACE_STUB_CALL(LessThan) | 85 REPLACE_STUB_CALL(LessThan) |
| 86 REPLACE_STUB_CALL(LessThanOrEqual) | 86 REPLACE_STUB_CALL(LessThanOrEqual) |
| 87 REPLACE_STUB_CALL(GreaterThan) | 87 REPLACE_STUB_CALL(GreaterThan) |
| 88 REPLACE_STUB_CALL(GreaterThanOrEqual) | 88 REPLACE_STUB_CALL(GreaterThanOrEqual) |
| 89 REPLACE_STUB_CALL(HasProperty) |
| 89 REPLACE_STUB_CALL(Equal) | 90 REPLACE_STUB_CALL(Equal) |
| 90 REPLACE_STUB_CALL(NotEqual) | 91 REPLACE_STUB_CALL(NotEqual) |
| 91 REPLACE_STUB_CALL(StrictEqual) | 92 REPLACE_STUB_CALL(StrictEqual) |
| 92 REPLACE_STUB_CALL(StrictNotEqual) | 93 REPLACE_STUB_CALL(StrictNotEqual) |
| 93 REPLACE_STUB_CALL(ToBoolean) | 94 REPLACE_STUB_CALL(ToBoolean) |
| 94 REPLACE_STUB_CALL(ToInteger) | 95 REPLACE_STUB_CALL(ToInteger) |
| 95 REPLACE_STUB_CALL(ToLength) | 96 REPLACE_STUB_CALL(ToLength) |
| 96 REPLACE_STUB_CALL(ToNumber) | 97 REPLACE_STUB_CALL(ToNumber) |
| 97 REPLACE_STUB_CALL(ToName) | 98 REPLACE_STUB_CALL(ToName) |
| 98 REPLACE_STUB_CALL(ToObject) | 99 REPLACE_STUB_CALL(ToObject) |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 322 |
| 322 | 323 |
| 323 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 324 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
| 324 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 325 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
| 325 ReplaceWithRuntimeCall(node, is_strict(language_mode) | 326 ReplaceWithRuntimeCall(node, is_strict(language_mode) |
| 326 ? Runtime::kDeleteProperty_Strict | 327 ? Runtime::kDeleteProperty_Strict |
| 327 : Runtime::kDeleteProperty_Sloppy); | 328 : Runtime::kDeleteProperty_Sloppy); |
| 328 } | 329 } |
| 329 | 330 |
| 330 | 331 |
| 331 void JSGenericLowering::LowerJSHasProperty(Node* node) { | |
| 332 ReplaceWithRuntimeCall(node, Runtime::kHasProperty); | |
| 333 } | |
| 334 | |
| 335 | |
| 336 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 332 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
| 337 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 333 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 338 Callable callable = CodeFactory::InstanceOf(isolate()); | 334 Callable callable = CodeFactory::InstanceOf(isolate()); |
| 339 ReplaceWithStubCall(node, callable, flags); | 335 ReplaceWithStubCall(node, callable, flags); |
| 340 } | 336 } |
| 341 | 337 |
| 342 | 338 |
| 343 void JSGenericLowering::LowerJSLoadContext(Node* node) { | 339 void JSGenericLowering::LowerJSLoadContext(Node* node) { |
| 344 const ContextAccess& access = ContextAccessOf(node->op()); | 340 const ContextAccess& access = ContextAccessOf(node->op()); |
| 345 for (size_t i = 0; i < access.depth(); ++i) { | 341 for (size_t i = 0; i < access.depth(); ++i) { |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 } | 726 } |
| 731 | 727 |
| 732 | 728 |
| 733 MachineOperatorBuilder* JSGenericLowering::machine() const { | 729 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 734 return jsgraph()->machine(); | 730 return jsgraph()->machine(); |
| 735 } | 731 } |
| 736 | 732 |
| 737 } // namespace compiler | 733 } // namespace compiler |
| 738 } // namespace internal | 734 } // namespace internal |
| 739 } // namespace v8 | 735 } // namespace v8 |
| OLD | NEW |