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

Unified Diff: runtime/vm/code_descriptors_test.cc

Issue 10829036: Change the stack map search to require an exact match. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors_test.cc
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index a72c062d0eb2d4329139e72125ce552821f8998f..5c5e860109150ab4e4c704ac437e2d2bb3f1dc13 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -201,8 +201,15 @@ TEST_CASE(StackmapGC) {
builder->SetSlotAsValue(2); // var k.
builder->SetSlotAsObject(3); // var s2.
builder->SetSlotAsObject(4); // var s3.
- builder->AddEntry(0); // Add a stack map entry at pc offset 0.
const Code& code = Code::Handle(function_foo.unoptimized_code());
+ // Search for the pc of the call to 'func'.
+ const PcDescriptors& descriptors =
+ PcDescriptors::Handle(code.pc_descriptors());
+ for (int i = 0; i < descriptors.Length(); ++i) {
+ if (descriptors.DescriptorKind(i) == PcDescriptors::kFuncCall) {
+ builder->AddEntry(descriptors.PC(i) - code.EntryPoint());
+ }
+ }
const Array& stack_maps = Array::Handle(builder->FinalizeStackmaps(code));
code.set_stackmaps(stack_maps);
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698