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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 12090118: Fix the arity of a call to a constructor body, now that we pass not just the parameters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | tests/language/constructor8_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 17982)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -1380,7 +1380,6 @@
List bodyCallInputs = <HInstruction>[];
bodyCallInputs.add(newObject);
FunctionSignature functionSignature = body.computeSignature(compiler);
- int arity = functionSignature.parameterCount;
functionSignature.orderedForEachParameter((parameter) {
if (!localsHandler.isBoxed(parameter)) {
// The parameter will be a field in the box passed as the
@@ -1420,7 +1419,8 @@
// these selectors. Maybe the resolver can do more of the work
// for us here?
LibraryElement library = body.getLibrary();
- Selector selector = new Selector.call(name, library, arity);
+ Selector selector = new Selector.call(
+ name, library, bodyCallInputs.length - 1);
HInvokeDynamic invoke =
new HInvokeDynamicMethod(selector, bodyCallInputs);
invoke.element = body;
« no previous file with comments | « no previous file | tests/language/constructor8_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698