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

Unified Diff: runtime/lib/mirrors.cc

Issue 1569213003: Eliminate phase parameter in constructors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 24e6d71fffad0e43d5f0d72eb7cf1afda73262c3..05453f8b1a78ce9a7c0f7bf018944af36cc77acb 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -1726,8 +1726,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 5) {
}
const intptr_t num_explicit_args = explicit_args.Length();
- const intptr_t num_implicit_args =
- redirected_constructor.IsGenerativeConstructor() ? 2 : 1;
+ const intptr_t num_implicit_args = 1;
const Array& args =
Array::Handle(Array::New(num_implicit_args + num_explicit_args));
@@ -1758,9 +1757,9 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 5) {
Instance& new_object = Instance::Handle();
if (redirected_constructor.IsGenerativeConstructor()) {
- // Constructors get the uninitialized object and a constructor phase. Note
- // we have delayed allocation until after the function type and argument
- // matching checks.
+ // Constructors get the uninitialized object.
+ // Note we have delayed allocation until after the function
+ // type and argument matching checks.
new_object = Instance::New(redirected_klass);
if (!type_arguments.IsNull()) {
// The type arguments will be null if the class has no type parameters, in
@@ -1769,7 +1768,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 5) {
new_object.SetTypeArguments(type_arguments);
}
args.SetAt(0, new_object);
- args.SetAt(1, Smi::Handle(Smi::New(Function::kCtorPhaseAll)));
} else {
// Factories get type arguments.
args.SetAt(0, type_arguments);
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698