Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1210863002: [turbofan] Use proper eager deopts for %_ThrowNotDateError(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ports Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 case Runtime::kInlineValueOf: 85 case Runtime::kInlineValueOf:
86 return ReduceValueOf(node); 86 return ReduceValueOf(node);
87 case Runtime::kInlineIsMinusZero: 87 case Runtime::kInlineIsMinusZero:
88 return ReduceIsMinusZero(node); 88 return ReduceIsMinusZero(node);
89 case Runtime::kInlineFixedArraySet: 89 case Runtime::kInlineFixedArraySet:
90 return ReduceFixedArraySet(node); 90 return ReduceFixedArraySet(node);
91 case Runtime::kInlineGetTypeFeedbackVector: 91 case Runtime::kInlineGetTypeFeedbackVector:
92 return ReduceGetTypeFeedbackVector(node); 92 return ReduceGetTypeFeedbackVector(node);
93 case Runtime::kInlineGetCallerJSFunction: 93 case Runtime::kInlineGetCallerJSFunction:
94 return ReduceGetCallerJSFunction(node); 94 return ReduceGetCallerJSFunction(node);
95 case Runtime::kInlineThrowNotDateError:
96 return ReduceThrowNotDateError(node);
95 default: 97 default:
96 break; 98 break;
97 } 99 }
98 return NoChange(); 100 return NoChange();
99 } 101 }
100 102
101 103
102 Reduction JSIntrinsicLowering::ReduceConstructDouble(Node* node) { 104 Reduction JSIntrinsicLowering::ReduceConstructDouble(Node* node) {
103 Node* high = NodeProperties::GetValueInput(node, 0); 105 Node* high = NodeProperties::GetValueInput(node, 0);
104 Node* low = NodeProperties::GetValueInput(node, 1); 106 Node* low = NodeProperties::GetValueInput(node, 1);
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 // no phase-ordering dependency. 489 // no phase-ordering dependency.
488 FieldAccess access = AccessBuilder::ForFrameCallerFramePtr(); 490 FieldAccess access = AccessBuilder::ForFrameCallerFramePtr();
489 Node* fp = graph()->NewNode(machine()->LoadFramePointer()); 491 Node* fp = graph()->NewNode(machine()->LoadFramePointer());
490 Node* next_fp = 492 Node* next_fp =
491 graph()->NewNode(simplified()->LoadField(access), fp, effect, control); 493 graph()->NewNode(simplified()->LoadField(access), fp, effect, control);
492 return Change(node, simplified()->LoadField(AccessBuilder::ForFrameMarker()), 494 return Change(node, simplified()->LoadField(AccessBuilder::ForFrameMarker()),
493 next_fp, effect, control); 495 next_fp, effect, control);
494 } 496 }
495 497
496 498
499 Reduction JSIntrinsicLowering::ReduceThrowNotDateError(Node* node) {
500 if (mode() != kDeoptimizationEnabled) return NoChange();
501 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 1);
502 Node* const effect = NodeProperties::GetEffectInput(node);
503 Node* const control = NodeProperties::GetControlInput(node);
504
505 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer.
506 Node* deoptimize =
507 graph()->NewNode(common()->Deoptimize(), frame_state, effect, control);
508 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize);
509
510 node->set_op(common()->Dead());
511 node->TrimInputCount(0);
512 return Changed(node);
513 }
514
515
497 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, 516 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a,
498 Node* b) { 517 Node* b) {
499 node->set_op(op); 518 node->set_op(op);
500 node->ReplaceInput(0, a); 519 node->ReplaceInput(0, a);
501 node->ReplaceInput(1, b); 520 node->ReplaceInput(1, b);
502 node->TrimInputCount(2); 521 node->TrimInputCount(2);
503 RelaxControls(node); 522 RelaxControls(node);
504 return Changed(node); 523 return Changed(node);
505 } 524 }
506 525
(...skipping 24 matching lines...) Expand all
531 } 550 }
532 551
533 552
534 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { 553 MachineOperatorBuilder* JSIntrinsicLowering::machine() const {
535 return jsgraph()->machine(); 554 return jsgraph()->machine();
536 } 555 }
537 556
538 } // namespace compiler 557 } // namespace compiler
539 } // namespace internal 558 } // namespace internal
540 } // namespace v8 559 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698