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

Unified Diff: runtime/vm/code_generator.cc

Issue 12529008: Collect type feedback for fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index b1f11df6a68f805e53a64c67ffdb625ada54e2ea..98350dd9cf47090bf2bb534bb3730a6d8f2088cc 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1380,7 +1380,7 @@ DEOPT_REASONS(DEOPT_REASON_ID_TO_TEXT)
}
-static void DeoptimizeAt(const Code& optimized_code, uword pc) {
+void DeoptimizeAt(const Code& optimized_code, uword pc) {
intptr_t deopt_reason = kDeoptUnknown;
const DeoptInfo& deopt_info =
DeoptInfo::Handle(optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason));
@@ -1733,4 +1733,17 @@ double DartModulo(double left, double right) {
return remainder;
}
+
+// Update global type feedback recorded for a field recording the assignment
+// of the value with the given class id.
+// Arg0: Field object;
+// Arg1: Value's cid as a smi.
+DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) {
+ ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count());
+ const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
+ const Smi& value_cid = Smi::CheckedHandle(arguments.ArgAt(1));
+
+ field.UpdateCid(value_cid.Value());
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/compiler.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698