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

Side by Side Diff: lib/compiler/implementation/ssa/ssa.dart

Issue 10826045: Substitution handled for most Send nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
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 #library('ssa'); 5 #library('ssa');
6 6
7 #import('../leg.dart'); 7 #import('../leg.dart');
8 #import('../native_handler.dart', prefix: 'native'); 8 #import('../native_handler.dart', prefix: 'native');
9 #import('../source_file.dart'); 9 #import('../source_file.dart');
10 #import('../source_map_builder.dart'); 10 #import('../source_map_builder.dart');
(...skipping 14 matching lines...) Expand all
25 #source('types.dart'); 25 #source('types.dart');
26 #source('types_propagation.dart'); 26 #source('types_propagation.dart');
27 #source('validate.dart'); 27 #source('validate.dart');
28 #source('variable_allocator.dart'); 28 #source('variable_allocator.dart');
29 #source('value_set.dart'); 29 #source('value_set.dart');
30 30
31 class RuntimeTypeInformation { 31 class RuntimeTypeInformation {
32 String asJsString(InterfaceType type) { 32 String asJsString(InterfaceType type) {
33 ClassElement element = type.element; 33 ClassElement element = type.element;
34 StringBuffer buffer = new StringBuffer(); 34 StringBuffer buffer = new StringBuffer();
35 Link<Type> arguments = type.arguments; 35 Link<Type> arguments = type.typeArguments;
36 int index = 0; 36 int index = 0;
37 element.typeParameters.forEach((name, _) { 37 element.typeParameters.forEach((name, _) {
38 buffer.add("${name.slowToString()}: '${arguments.head}'"); 38 buffer.add("${name.slowToString()}: '${arguments.head}'");
39 if (++index < element.typeParameters.length) { 39 if (++index < element.typeParameters.length) {
40 buffer.add(', '); 40 buffer.add(', ');
41 } 41 }
42 }); 42 });
43 return "{$buffer}"; 43 return "{$buffer}";
44 } 44 }
45 45
46 bool hasTypeArguments(Type type) { 46 bool hasTypeArguments(Type type) {
47 if (type is InterfaceType) { 47 if (type is InterfaceType) {
48 InterfaceType interfaceType = type; 48 InterfaceType interfaceType = type;
49 return (!interfaceType.arguments.isEmpty() && 49 return (!interfaceType.typeArguments.isEmpty() &&
50 interfaceType.arguments.tail.isEmpty()); 50 interfaceType.typeArguments.tail.isEmpty());
51 } 51 }
52 return false; 52 return false;
53 } 53 }
54 } 54 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698