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

Unified Diff: runtime/vm/code_generator.cc

Issue 2509013002: Allocate generic types in new-space before canonicalizing. (Closed)
Patch Set: formatting Created 4 years, 1 month 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/class_finalizer.cc ('k') | runtime/vm/dart_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
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index ef90b547a1772d3317850f767fa6c6c3fa8b00b0..4a35895f3fac4e5ca7560c354bf5c812566afb8d 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -338,7 +338,8 @@ static void PrintTypeCheck(const char* message,
StackFrame* caller_frame = iterator.NextFrame();
ASSERT(caller_frame != NULL);
- const AbstractType& instance_type = AbstractType::Handle(instance.GetType());
+ const AbstractType& instance_type =
+ AbstractType::Handle(instance.GetType(Heap::kNew));
ASSERT(instance_type.IsInstantiated());
if (type.IsInstantiated()) {
OS::PrintErr("%s: '%s' %" Pd " %s '%s' %" Pd " (pc: %#" Px ").\n", message,
@@ -551,7 +552,7 @@ DEFINE_RUNTIME_ENTRY(TypeCheck, 5) {
// Throw a dynamic type error.
const TokenPosition location = GetCallerLocation();
const AbstractType& src_type =
- AbstractType::Handle(zone, src_instance.GetType());
+ AbstractType::Handle(zone, src_instance.GetType(Heap::kNew));
if (!dst_type.IsInstantiated()) {
// Instantiate dst_type before reporting the error.
dst_type = dst_type.InstantiateFrom(instantiator_type_arguments, NULL,
@@ -603,7 +604,7 @@ DEFINE_RUNTIME_ENTRY(NonBoolTypeError, 1) {
ASSERT(!src_instance.IsBool());
const Type& bool_interface = Type::Handle(Type::BoolType());
const AbstractType& src_type =
- AbstractType::Handle(zone, src_instance.GetType());
+ AbstractType::Handle(zone, src_instance.GetType(Heap::kNew));
const String& no_bound_error = String::Handle(zone);
Exceptions::CreateAndThrowTypeError(location, src_type, bool_interface,
Symbols::BooleanExpression(),
@@ -624,7 +625,7 @@ DEFINE_RUNTIME_ENTRY(BadTypeError, 3) {
const AbstractType& dst_type =
AbstractType::CheckedHandle(zone, arguments.ArgAt(2));
const AbstractType& src_type =
- AbstractType::Handle(zone, src_value.GetType());
+ AbstractType::Handle(zone, src_value.GetType(Heap::kNew));
Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name,
String::Handle(zone));
UNREACHABLE();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698