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

Unified Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 841443004: [turbofan] Allow deoptimization for JSToNumber operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/mjsunit/compiler/regress-445907.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-js-typed-lowering.cc
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc
index 3023837f4c8286ecc768b22a5c0d747fc92c11bc..e23ad0cd169d091297556920d918e7378e70cc12 100644
--- a/test/cctest/compiler/test-js-typed-lowering.cc
+++ b/test/cctest/compiler/test-js-typed-lowering.cc
@@ -123,8 +123,13 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
Node* UseForEffect(Node* node) {
// TODO(titzer): use EffectPhi after fixing EffectCount
- return graph.NewNode(javascript.ToNumber(), node, context(), node,
- control());
+ if (OperatorProperties::HasFrameStateInput(javascript.ToNumber())) {
+ return graph.NewNode(javascript.ToNumber(), node, context(),
+ EmptyFrameState(context()), node, control());
+ } else {
+ return graph.NewNode(javascript.ToNumber(), node, context(), node,
+ control());
+ }
}
void CheckEffectInput(Node* effect, Node* use) {
@@ -737,12 +742,25 @@ TEST(RemoveToNumberEffects) {
switch (i) {
case 0:
+ // TODO(jarin) Replace with a query of FLAG_turbo_deoptimization.
+ if (OperatorProperties::HasFrameStateInput(R.javascript.ToNumber())) {
+ effect_use = R.graph.NewNode(R.javascript.ToNumber(), p0, R.context(),
+ frame_state, ton, R.start());
+ } else {
effect_use = R.graph.NewNode(R.javascript.ToNumber(), p0, R.context(),
ton, R.start());
+ }
break;
case 1:
- effect_use = R.graph.NewNode(R.javascript.ToNumber(), ton, R.context(),
- ton, R.start());
+ // TODO(jarin) Replace with a query of FLAG_turbo_deoptimization.
+ if (OperatorProperties::HasFrameStateInput(R.javascript.ToNumber())) {
+ effect_use =
+ R.graph.NewNode(R.javascript.ToNumber(), ton, R.context(),
+ frame_state, ton, R.start());
+ } else {
+ effect_use = R.graph.NewNode(R.javascript.ToNumber(), ton,
+ R.context(), ton, R.start());
+ }
break;
case 2:
effect_use = R.graph.NewNode(R.common.EffectPhi(1), ton, R.start());
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/mjsunit/compiler/regress-445907.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698