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

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

Issue 792043007: [turbofan] Add frame state to the PlainPrimitiveToNumber unit test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/js-typed-lowering-unittest.cc
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc
index 97ff106329770269274b74bfeef435ed7e63e0a3..42ba64b9bcbc2cc2e3f35d27a8e9cebd6560ba8f 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -80,6 +80,12 @@ class JSTypedLoweringTest : public TypedGraphTest {
return reducer.Reduce(node);
}
+ Node* EmptyFrameState() {
+ MachineOperatorBuilder machine(zone());
+ JSGraph jsgraph(graph(), common(), javascript(), &machine);
+ return jsgraph.EmptyFrameState();
+ }
+
Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) {
Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer();
Runtime::SetupArrayBuffer(isolate(), buffer, true, bytes, byte_length);
@@ -369,8 +375,12 @@ TEST_F(JSTypedLoweringTest, JSToNumberWithPlainPrimitive) {
Node* const context = Parameter(Type::Any(), 1);
Node* const effect = graph()->start();
Node* const control = graph()->start();
- Reduction r = Reduce(graph()->NewNode(javascript()->ToNumber(), input,
- context, effect, control));
+ Reduction r =
+ FLAG_turbo_deoptimization
+ ? Reduce(graph()->NewNode(javascript()->ToNumber(), input, context,
+ EmptyFrameState(), effect, control))
+ : Reduce(graph()->NewNode(javascript()->ToNumber(), input, context,
+ effect, control));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsToNumber(input, IsNumberConstant(BitEq(0.0)),
graph()->start(), control));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698