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

Unified Diff: src/runtime/runtime-test.cc

Issue 2764113002: [type-profile] Handle returns correctly. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/runtime/runtime-object.cc ('k') | test/message/type-profile/collect-type-profile.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 2c179607d8f8ff4c744d2d519015f578d24f223c..ffaaed573ec0296e5369cc634618327d16ac7317 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -171,16 +171,11 @@ RUNTIME_FUNCTION(Runtime_PrintTypeProfile) {
Object* function_name = vector->shared_function_info()->name();
PrintF("Function: %s\n", String::cast(function_name)->ToCString().get());
- FeedbackMetadataIterator iter(vector->metadata());
- while (iter.HasNext()) {
- FeedbackSlot slot = iter.Next();
- FeedbackSlotKind kind = iter.kind();
- if (kind == FeedbackSlotKind::kTypeProfile) {
- CollectTypeProfileNexus nexus(vector, slot);
- nexus.Print();
- PrintF("\n");
- return isolate->heap()->undefined_value();
- }
+ FeedbackSlot slot = vector->GetTypeProfileSlot();
+ if (!slot.IsInvalid()) {
+ CollectTypeProfileNexus nexus(vector, slot);
+ nexus.Print();
+ PrintF("\n");
}
}
return isolate->heap()->undefined_value();
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/message/type-profile/collect-type-profile.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698