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(ToInteger) | 92 REPLACE_STUB_CALL(ToInteger) |
92 REPLACE_STUB_CALL(ToLength) | 93 REPLACE_STUB_CALL(ToLength) |
93 REPLACE_STUB_CALL(ToNumber) | 94 REPLACE_STUB_CALL(ToNumber) |
94 REPLACE_STUB_CALL(ToName) | 95 REPLACE_STUB_CALL(ToName) |
95 REPLACE_STUB_CALL(ToObject) | 96 REPLACE_STUB_CALL(ToObject) |
96 REPLACE_STUB_CALL(ToString) | 97 REPLACE_STUB_CALL(ToString) |
97 #undef REPLACE_STUB_CALL | 98 #undef REPLACE_STUB_CALL |
98 | 99 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 345 |
345 | 346 |
346 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 347 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
347 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 348 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
348 ReplaceWithRuntimeCall(node, is_strict(language_mode) | 349 ReplaceWithRuntimeCall(node, is_strict(language_mode) |
349 ? Runtime::kDeleteProperty_Strict | 350 ? Runtime::kDeleteProperty_Strict |
350 : Runtime::kDeleteProperty_Sloppy); | 351 : Runtime::kDeleteProperty_Sloppy); |
351 } | 352 } |
352 | 353 |
353 | 354 |
354 void JSGenericLowering::LowerJSHasProperty(Node* node) { | |
355 ReplaceWithRuntimeCall(node, Runtime::kHasProperty); | |
356 } | |
357 | |
358 | |
359 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 355 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
360 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 356 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
361 Callable callable = CodeFactory::InstanceOf(isolate()); | 357 Callable callable = CodeFactory::InstanceOf(isolate()); |
362 ReplaceWithStubCall(node, callable, flags); | 358 ReplaceWithStubCall(node, callable, flags); |
363 } | 359 } |
364 | 360 |
365 | 361 |
366 void JSGenericLowering::LowerJSLoadContext(Node* node) { | 362 void JSGenericLowering::LowerJSLoadContext(Node* node) { |
367 const ContextAccess& access = ContextAccessOf(node->op()); | 363 const ContextAccess& access = ContextAccessOf(node->op()); |
368 for (size_t i = 0; i < access.depth(); ++i) { | 364 for (size_t i = 0; i < access.depth(); ++i) { |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 } | 749 } |
754 | 750 |
755 | 751 |
756 MachineOperatorBuilder* JSGenericLowering::machine() const { | 752 MachineOperatorBuilder* JSGenericLowering::machine() const { |
757 return jsgraph()->machine(); | 753 return jsgraph()->machine(); |
758 } | 754 } |
759 | 755 |
760 } // namespace compiler | 756 } // namespace compiler |
761 } // namespace internal | 757 } // namespace internal |
762 } // namespace v8 | 758 } // namespace v8 |
OLD | NEW |