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

Unified Diff: test/cctest/test-code-stub-assembler.cc

Issue 2035683002: [turbofan] Fix assert caused by bogus merging of out-of-scope CodeAssembler variables (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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/compiler/code-assembler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-code-stub-assembler.cc
diff --git a/test/cctest/test-code-stub-assembler.cc b/test/cctest/test-code-stub-assembler.cc
index 01c99d43aa364b53ebc6693f1ea8e9ebde73093c..18d51ff0f02580be1af6748c0a814964527dc0b1 100644
--- a/test/cctest/test-code-stub-assembler.cc
+++ b/test/cctest/test-code-stub-assembler.cc
@@ -1090,5 +1090,34 @@ TEST(DeferredCodePhiHints) {
CHECK(!m.GenerateCode().is_null());
}
+TEST(TestOutOfScopeVariable) {
+ typedef CodeStubAssembler::Label Label;
+ typedef CodeStubAssembler::Variable Variable;
+ Isolate* isolate(CcTest::InitIsolateOnce());
+ VoidDescriptor descriptor(isolate);
+ CodeStubAssemblerTester m(isolate, descriptor);
+ Label block1(&m);
+ Label block2(&m);
+ Label block3(&m);
+ Label block4(&m);
+ m.Branch(m.WordEqual(m.Parameter(0), m.IntPtrConstant(0)), &block1, &block4);
+ m.Bind(&block4);
+ {
+ Variable var_object(&m, MachineRepresentation::kTagged);
+ m.Branch(m.WordEqual(m.Parameter(0), m.IntPtrConstant(0)), &block2,
+ &block3);
+
+ m.Bind(&block2);
+ var_object.Bind(m.IntPtrConstant(55));
+ m.Goto(&block1);
+
+ m.Bind(&block3);
+ var_object.Bind(m.IntPtrConstant(66));
+ m.Goto(&block1);
+ }
+ m.Bind(&block1);
+ CHECK(!m.GenerateCode().is_null());
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/code-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698