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

Unified Diff: runtime/vm/code_generator.cc

Issue 15338008: - Add a GetClassId() to Object, so that we do not have to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/lib/object.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 22901)
+++ runtime/vm/code_generator.cc (working copy)
@@ -893,13 +893,13 @@
Function::Handle(target_code.function());
ASSERT(!target_function.IsNull());
if (args.length() == 1) {
- ic_data.AddReceiverCheck(Class::Handle(args[0]->clazz()).id(),
+ ic_data.AddReceiverCheck(args[0]->GetClassId(),
target_function);
} else {
GrowableArray<intptr_t> class_ids(args.length());
ASSERT(ic_data.num_args_tested() == args.length());
for (intptr_t i = 0; i < args.length(); i++) {
- class_ids.Add(Class::Handle(args[i]->clazz()).id());
+ class_ids.Add(args[i]->GetClassId());
}
ic_data.AddCheck(class_ids, target_function);
}
@@ -921,7 +921,7 @@
args.length(),
caller_frame->pc(),
Class::Handle(receiver.clazz()).ToCString(),
- Class::Handle(receiver.clazz()).id(),
+ receiver.GetClassId(),
target_function.ToCString());
}
}
@@ -1088,8 +1088,8 @@
ASSERT(!target_function.IsNull());
GrowableArray<intptr_t> class_ids(kNumArguments);
ASSERT(ic_data.num_args_tested() == kNumArguments);
- class_ids.Add(Class::Handle(receiver.clazz()).id());
- class_ids.Add(Class::Handle(arg1.clazz()).id());
+ class_ids.Add(receiver.GetClassId());
+ class_ids.Add(arg1.GetClassId());
ic_data.AddCheck(class_ids, target_function);
}
@@ -1771,7 +1771,7 @@
const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
const Object& value = Object::Handle(arguments.ArgAt(1));
- field.UpdateCid(Class::Handle(value.clazz()).id());
+ field.UpdateCid(value.GetClassId());
}
} // namespace dart
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698