Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index ccae5e280d8b0810e03f9b7c9f0041b91d768899..64b96c805bd422c87c9f5b4cc7469a2afc4c9d7d 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -2684,7 +2684,7 @@ static RawObject* ThrowArgumentError(const char* exception_message) { |
ASSERT(result.IsFunction()); |
Function& constructor = Function::Handle(isolate); |
constructor ^= result.raw(); |
- if (!constructor.IsConstructor()) { |
+ if (!constructor.IsGenerativeConstructor()) { |
const String& message = String::Handle( |
String::NewFormatted("%s: class '%s' is not a constructor.", |
CURRENT_FUNC, class_name.ToCString())); |
@@ -3151,7 +3151,7 @@ static Dart_Handle NewByteData(Isolate* isolate, intptr_t length) { |
ASSERT(!result.IsNull()); |
ASSERT(result.IsFunction()); |
const Function& factory = Function::Cast(result); |
- ASSERT(!factory.IsConstructor()); |
+ ASSERT(!factory.IsGenerativeConstructor()); |
// Create the argument list. |
const Array& args = Array::Handle(isolate, Array::New(2)); |
@@ -3200,7 +3200,7 @@ static Dart_Handle NewExternalByteData( |
ASSERT(!result.IsNull()); |
ASSERT(result.IsFunction()); |
const Function& factory = Function::Cast(result); |
- ASSERT(!factory.IsConstructor()); |
+ ASSERT(!factory.IsGenerativeConstructor()); |
// Create the argument list. |
const intptr_t num_args = 3; |
@@ -3381,7 +3381,7 @@ DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data) { |
ASSERT(!result.IsNull()); |
ASSERT(result.IsFunction()); |
const Function& factory = Function::Cast(result); |
- ASSERT(!factory.IsConstructor()); |
+ ASSERT(!factory.IsGenerativeConstructor()); |
// Create the argument list. |
const Array& args = Array::Handle(isolate, Array::New(2)); |
@@ -3526,7 +3526,7 @@ static RawObject* ResolveConstructor(const char* current_func, |
const Function& constructor = |
Function::Handle(cls.LookupFunctionAllowPrivate(constr_name)); |
if (constructor.IsNull() || |
- (!constructor.IsConstructor() && !constructor.IsFactory())) { |
+ (!constructor.IsGenerativeConstructor() && !constructor.IsFactory())) { |
const String& lookup_class_name = String::Handle(cls.Name()); |
if (!class_name.Equals(lookup_class_name)) { |
// When the class name used to build the constructor name is |
@@ -3548,7 +3548,7 @@ static RawObject* ResolveConstructor(const char* current_func, |
return ApiError::New(message); |
} |
} |
- int extra_args = (constructor.IsConstructor() ? 2 : 1); |
+ int extra_args = (constructor.IsGenerativeConstructor() ? 2 : 1); |
String& error_message = String::Handle(); |
if (!constructor.AreValidArgumentCounts(num_args + extra_args, |
0, |
@@ -3651,17 +3651,17 @@ DART_EXPORT Dart_Handle Dart_New(Dart_Handle type, |
cls = type_obj.type_class(); |
} |
- if (constructor.IsConstructor()) { |
+ if (constructor.IsGenerativeConstructor()) { |
// Create the new object. |
new_object = Instance::New(cls); |
} |
// Create the argument list. |
intptr_t arg_index = 0; |
- int extra_args = (constructor.IsConstructor() ? 2 : 1); |
+ int extra_args = (constructor.IsGenerativeConstructor() ? 2 : 1); |
const Array& args = |
Array::Handle(isolate, Array::New(number_of_arguments + extra_args)); |
- if (constructor.IsConstructor()) { |
+ if (constructor.IsGenerativeConstructor()) { |
// Constructors get the uninitialized object and a constructor phase. |
if (!type_arguments.IsNull()) { |
// The type arguments will be null if the class has no type parameters, in |
@@ -3697,7 +3697,7 @@ DART_EXPORT Dart_Handle Dart_New(Dart_Handle type, |
return Api::NewHandle(isolate, result.raw()); |
} |
- if (constructor.IsConstructor()) { |
+ if (constructor.IsGenerativeConstructor()) { |
ASSERT(result.IsNull()); |
} else { |
ASSERT(result.IsNull() || result.IsInstance()); |
@@ -3855,7 +3855,7 @@ DART_EXPORT Dart_Handle Dart_InvokeConstructor(Dart_Handle object, |
Function::Handle(isolate, cls.LookupFunctionAllowPrivate(dot_name)); |
const int extra_args = 2; |
if (!constructor.IsNull() && |
- constructor.IsConstructor() && |
+ constructor.IsGenerativeConstructor() && |
constructor.AreValidArgumentCounts(number_of_arguments + extra_args, |
0, |
NULL)) { |