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

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..2f92c1f73f064ffccc653ad2724c82924dab1b49 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1380,7 +1380,8 @@ DEOPT_REASONS(DEOPT_REASON_ID_TO_TEXT)
}
-static void DeoptimizeAt(const Code& optimized_code, uword pc) {
+void DeoptimizeAt(const Code& optimized_code, uword pc) {
+ ASSERT(optimized_code.is_optimized());
intptr_t deopt_reason = kDeoptUnknown;
const DeoptInfo& deopt_info =
DeoptInfo::Handle(optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason));
@@ -1733,4 +1734,17 @@ double DartModulo(double left, double right) {
return remainder;
}
+
+// Update global type feedback recorded for a field recording the assignment
+// of the given value.
+// Arg0: Field object;
+// Arg1: Value that is being stored.
+DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) {
+ ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count());
+ const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
+ const Object& value = Object::Handle(arguments.ArgAt(1));
+
+ field.UpdateCid(Class::Handle(value.clazz()).id());
Ivan Posva 2013/03/19 04:42:05 Do you think it would be useful to have an ClassId
Vyacheslav Egorov (Google) 2013/03/19 06:58:59 It can be useful but I would leave it out of scope
Ivan Posva 2013/03/19 15:48:51 I did not mean to imply to have this in this CL. I
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/compiler.cc » ('j') | runtime/vm/flow_graph.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698