OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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-intrinsic-lowering.h" | 5 #include "src/compiler/js-intrinsic-lowering.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 case Runtime::kInlineToNumber: | 82 case Runtime::kInlineToNumber: |
83 return ReduceToNumber(node); | 83 return ReduceToNumber(node); |
84 case Runtime::kInlineToObject: | 84 case Runtime::kInlineToObject: |
85 return ReduceToObject(node); | 85 return ReduceToObject(node); |
86 case Runtime::kInlineToPrimitive: | 86 case Runtime::kInlineToPrimitive: |
87 return ReduceToPrimitive(node); | 87 return ReduceToPrimitive(node); |
88 case Runtime::kInlineToString: | 88 case Runtime::kInlineToString: |
89 return ReduceToString(node); | 89 return ReduceToString(node); |
90 case Runtime::kInlineCall: | 90 case Runtime::kInlineCall: |
91 return ReduceCall(node); | 91 return ReduceCall(node); |
92 case Runtime::kInlineNewObject: | |
93 return ReduceNewObject(node); | |
92 case Runtime::kInlineGetSuperConstructor: | 94 case Runtime::kInlineGetSuperConstructor: |
93 return ReduceGetSuperConstructor(node); | 95 return ReduceGetSuperConstructor(node); |
94 case Runtime::kInlineGetOrdinaryHasInstance: | 96 case Runtime::kInlineGetOrdinaryHasInstance: |
95 return ReduceGetOrdinaryHasInstance(node); | 97 return ReduceGetOrdinaryHasInstance(node); |
96 default: | 98 default: |
97 break; | 99 break; |
98 } | 100 } |
99 return NoChange(); | 101 return NoChange(); |
100 } | 102 } |
101 | 103 |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
470 | 472 |
471 Reduction JSIntrinsicLowering::ReduceCall(Node* node) { | 473 Reduction JSIntrinsicLowering::ReduceCall(Node* node) { |
472 size_t const arity = CallRuntimeParametersOf(node->op()).arity(); | 474 size_t const arity = CallRuntimeParametersOf(node->op()).arity(); |
473 NodeProperties::ChangeOp(node, | 475 NodeProperties::ChangeOp(node, |
474 javascript()->CallFunction(arity, VectorSlotPair(), | 476 javascript()->CallFunction(arity, VectorSlotPair(), |
475 ConvertReceiverMode::kAny, | 477 ConvertReceiverMode::kAny, |
476 TailCallMode::kDisallow)); | 478 TailCallMode::kDisallow)); |
477 return Changed(node); | 479 return Changed(node); |
478 } | 480 } |
479 | 481 |
482 Reduction JSIntrinsicLowering::ReduceNewObject(Node* node) { | |
483 NodeProperties::ChangeOp(node, javascript()->Create()); | |
484 return Changed(node); | |
Camillo Bruni
2016/04/01 10:44:13
Check failed: OperatorProperties::GetTotalInputCou
| |
485 } | |
480 | 486 |
481 Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) { | 487 Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) { |
482 Node* active_function = NodeProperties::GetValueInput(node, 0); | 488 Node* active_function = NodeProperties::GetValueInput(node, 0); |
483 Node* effect = NodeProperties::GetEffectInput(node); | 489 Node* effect = NodeProperties::GetEffectInput(node); |
484 Node* control = NodeProperties::GetControlInput(node); | 490 Node* control = NodeProperties::GetControlInput(node); |
485 Node* active_function_map = effect = | 491 Node* active_function_map = effect = |
486 graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()), | 492 graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()), |
487 active_function, effect, control); | 493 active_function, effect, control); |
488 return Change(node, simplified()->LoadField(AccessBuilder::ForMapPrototype()), | 494 return Change(node, simplified()->LoadField(AccessBuilder::ForMapPrototype()), |
489 active_function_map, effect, control); | 495 active_function_map, effect, control); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 } | 580 } |
575 | 581 |
576 | 582 |
577 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 583 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
578 return jsgraph()->simplified(); | 584 return jsgraph()->simplified(); |
579 } | 585 } |
580 | 586 |
581 } // namespace compiler | 587 } // namespace compiler |
582 } // namespace internal | 588 } // namespace internal |
583 } // namespace v8 | 589 } // namespace v8 |
OLD | NEW |