Index: runtime/vm/resolver.cc |
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc |
index caaf55653d7b97e17b1cfc112985b9a1b0a5f9d1..95f8c626d6bbd5b5c20eab257bfee58b8b5a4c5e 100644 |
--- a/runtime/vm/resolver.cc |
+++ b/runtime/vm/resolver.cc |
@@ -36,9 +36,11 @@ RawFunction* Resolver::ResolveDynamicForReceiverClass( |
const String& function_name, |
const ArgumentsDescriptor& args_desc, |
bool allow_add) { |
+ Thread* thread = Thread::Current(); |
+ Zone* zone = thread->zone(); |
- Function& function = Function::Handle( |
- ResolveDynamicAnyArgs(receiver_class, function_name, allow_add)); |
+ Function& function = Function::Handle(zone, |
+ ResolveDynamicAnyArgs(zone, receiver_class, function_name, allow_add)); |
if (function.IsNull() || |
!function.AreValidArguments(args_desc, NULL)) { |
@@ -46,7 +48,7 @@ RawFunction* Resolver::ResolveDynamicForReceiverClass( |
// "noSuchMethod" function. |
if (FLAG_trace_resolving) { |
String& error_message = |
- String::Handle(Symbols::New("function not found")); |
+ String::Handle(zone, Symbols::New(thread, "function not found")); |
if (!function.IsNull()) { |
// Obtain more detailed error message. |
function.AreValidArguments(args_desc, &error_message); |
@@ -62,18 +64,19 @@ RawFunction* Resolver::ResolveDynamicForReceiverClass( |
RawFunction* Resolver::ResolveDynamicAnyArgs( |
+ Zone* zone, |
const Class& receiver_class, |
const String& function_name, |
bool allow_add) { |
- Class& cls = Class::Handle(receiver_class.raw()); |
+ Class& cls = Class::Handle(zone, receiver_class.raw()); |
if (FLAG_trace_resolving) { |
THR_Print("ResolveDynamic '%s' for class %s\n", |
function_name.ToCString(), |
- String::Handle(cls.Name()).ToCString()); |
+ String::Handle(zone, cls.Name()).ToCString()); |
} |
const bool is_getter = Field::IsGetterName(function_name); |
- String& field_name = String::Handle(); |
+ String& field_name = String::Handle(zone); |
if (is_getter) { |
field_name ^= Field::NameFromGetter(function_name); |
@@ -88,7 +91,7 @@ RawFunction* Resolver::ResolveDynamicAnyArgs( |
field_name = String::SubString(field_name, 1); |
ASSERT(!Field::IsGetterName(field_name)); |
- String& property_getter_name = String::Handle(); |
+ String& property_getter_name = String::Handle(zone); |
if (!Field::IsSetterName(field_name)) { |
// If this is not a setter, we need to look for both the regular |
// name and the getter name. (In the case of an operator, this |
@@ -97,7 +100,7 @@ RawFunction* Resolver::ResolveDynamicAnyArgs( |
property_getter_name = Field::GetterName(field_name); |
} |
- Function& function = Function::Handle(); |
+ Function& function = Function::Handle(zone); |
while (!cls.IsNull()) { |
function = cls.LookupDynamicFunction(field_name); |
if (!function.IsNull()) { |
@@ -117,7 +120,7 @@ RawFunction* Resolver::ResolveDynamicAnyArgs( |
// Now look for an instance function whose name matches function_name |
// in the class. |
- Function& function = Function::Handle(); |
+ Function& function = Function::Handle(zone); |
while (!cls.IsNull()) { |
function ^= cls.LookupDynamicFunction(function_name); |
if (!function.IsNull()) { |