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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2498493003: kernel->ssa: get simple constructors working (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:js_runtime/shared/embedded_names.dart'; 7 import 'package:js_runtime/shared/embedded_names.dart';
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 Selector selector, 302 Selector selector,
303 List<HInstruction> providedArguments, 303 List<HInstruction> providedArguments,
304 ast.Node currentNode) { 304 ast.Node currentNode) {
305 assert(invariant(function, function.isImplementation)); 305 assert(invariant(function, function.isImplementation));
306 assert(providedArguments != null); 306 assert(providedArguments != null);
307 307
308 bool isInstanceMember = function.isInstanceMember; 308 bool isInstanceMember = function.isInstanceMember;
309 // For static calls, [providedArguments] is complete, default arguments 309 // For static calls, [providedArguments] is complete, default arguments
310 // have been included if necessary, see [makeStaticArgumentList]. 310 // have been included if necessary, see [makeStaticArgumentList].
311 if (!isInstanceMember || 311 if (!isInstanceMember ||
312 currentNode == null // In erroneous code, currentNode can be null. 312 currentNode == null || // In erroneous code, currentNode can be null.
313 ||
314 providedArgumentsKnownToBeComplete(currentNode) || 313 providedArgumentsKnownToBeComplete(currentNode) ||
315 function.isGenerativeConstructorBody || 314 function.isGenerativeConstructorBody ||
316 selector.isGetter) { 315 selector.isGetter) {
317 // For these cases, the provided argument list is known to be complete. 316 // For these cases, the provided argument list is known to be complete.
318 return providedArguments; 317 return providedArguments;
319 } else { 318 } else {
320 return completeDynamicSendArgumentsList( 319 return completeDynamicSendArgumentsList(
321 selector, function, providedArguments); 320 selector, function, providedArguments);
322 } 321 }
323 } 322 }
(...skipping 6762 matching lines...) Expand 10 before | Expand all | Expand 10 after
7086 if (unaliased is TypedefType) throw 'unable to unalias $type'; 7085 if (unaliased is TypedefType) throw 'unable to unalias $type';
7087 unaliased.accept(this, builder); 7086 unaliased.accept(this, builder);
7088 } 7087 }
7089 7088
7090 void visitDynamicType(DynamicType type, SsaBuilder builder) { 7089 void visitDynamicType(DynamicType type, SsaBuilder builder) {
7091 JavaScriptBackend backend = builder.compiler.backend; 7090 JavaScriptBackend backend = builder.compiler.backend;
7092 ClassElement cls = backend.helpers.DynamicRuntimeType; 7091 ClassElement cls = backend.helpers.DynamicRuntimeType;
7093 builder.push(new HDynamicType(type, new TypeMask.exact(cls, closedWorld))); 7092 builder.push(new HDynamicType(type, new TypeMask.exact(cls, closedWorld)));
7094 } 7093 }
7095 } 7094 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698