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

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

Issue 2069003002: Repro for a bad code generation issue on ia32. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/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 06555351f94727c328420fec0b09b4ac40ed92b6..2eca4715e62f26f3c71969a71d9dfb2ff3cd97eb 100644
--- a/test/cctest/test-code-stub-assembler.cc
+++ b/test/cctest/test-code-stub-assembler.cc
@@ -1402,5 +1402,51 @@ TEST(TryProbeStubCache) {
CHECK(queried_existing && queried_non_existing);
}
+TEST(Dump) {
+ typedef CodeStubAssembler::Label Label;
+ typedef CodeStubAssembler::Variable Variable;
+ Isolate* isolate(CcTest::InitIsolateOnce());
+ LoadWithVectorDescriptor descriptor(isolate);
+ CodeStubAssemblerTester m(isolate, descriptor);
+
+ {
+ CodeStubAssembler::LoadICParameters p(m.Parameter(4), m.Parameter(0),
+ m.Parameter(1), m.Parameter(2),
+ m.Parameter(3));
+
+ Variable var_handler(&m, MachineRepresentation::kTagged);
+ Label if_handler(&m, &var_handler), try_polymorphic(&m), miss(&m);
+
+ Node* receiver_map = m.LoadReceiverMap(p.receiver);
+
+ // Check monomorphic case.
+ Node* feedback = m.TryMonomorphicCase(&p, receiver_map, &if_handler,
+ &var_handler, &try_polymorphic);
+ m.Bind(&if_handler);
+ {
+ LoadWithVectorDescriptor descriptor(isolate);
+ m.TailCallStub(descriptor, var_handler.value(), p.context, p.receiver,
+ p.name, p.slot, p.vector);
+ }
+
+ m.Bind(&try_polymorphic);
+ {
+ // Check polymorphic case.
+ m.GotoUnless(m.WordEqual(m.LoadMap(feedback),
+ m.LoadRoot(Heap::kFixedArrayMapRootIndex)),
+ &miss);
+ m.HandlePolymorphicCase(&p, receiver_map, feedback, &if_handler,
+ &var_handler, &miss, 2);
+ }
+ m.Bind(&miss);
+ {
+ m.TailCallRuntime(Runtime::kLoadIC_Miss, p.context, p.receiver, p.name,
+ p.slot, p.vector);
+ }
+ }
+ Handle<Code> code = m.GenerateCode();
+ code->Print();
+}
+
} // namespace internal
} // namespace v8
« 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