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

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

Issue 10825337: Add name and library to selectors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make library == null for non-private selectors. 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 class Constant implements Hashable { 5 class Constant implements Hashable {
6 const Constant(); 6 const Constant();
7 7
8 bool isNull() => false; 8 bool isNull() => false;
9 bool isBool() => false; 9 bool isBool() => false;
10 bool isTrue() => false; 10 bool isTrue() => false;
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 if (enclosingClass != compiler.objectClass) { 1131 if (enclosingClass != compiler.objectClass) {
1132 assert(superClass !== null); 1132 assert(superClass !== null);
1133 assert(superClass.resolutionState == ClassElement.STATE_DONE); 1133 assert(superClass.resolutionState == ClassElement.STATE_DONE);
1134 FunctionElement targetConstructor = 1134 FunctionElement targetConstructor =
1135 superClass.lookupConstructor(superClass.name); 1135 superClass.lookupConstructor(superClass.name);
1136 if (targetConstructor === null) { 1136 if (targetConstructor === null) {
1137 compiler.internalError("no default constructor available", 1137 compiler.internalError("no default constructor available",
1138 node: functionNode); 1138 node: functionNode);
1139 } 1139 }
1140 1140
1141 evaluateSuperOrRedirectSend(Selector.INVOCATION_0, 1141 Selector selector = new Selector.call(superClass.name,
1142 enclosingClass.getLibrary(),
1143 0);
1144 evaluateSuperOrRedirectSend(selector,
1142 const EmptyLink<Node>(), 1145 const EmptyLink<Node>(),
1143 targetConstructor); 1146 targetConstructor);
1144 } 1147 }
1145 } 1148 }
1146 } 1149 }
1147 1150
1148 /** 1151 /**
1149 * Simulates the execution of the [constructor] with the given 1152 * Simulates the execution of the [constructor] with the given
1150 * [arguments] to obtain the field values that need to be passed to the 1153 * [arguments] to obtain the field values that need to be passed to the
1151 * native JavaScript constructor. 1154 * native JavaScript constructor.
(...skipping 14 matching lines...) Expand all
1166 Constant fieldValue = fieldValues[field]; 1169 Constant fieldValue = fieldValues[field];
1167 if (fieldValue === null) { 1170 if (fieldValue === null) {
1168 // Use the default value. 1171 // Use the default value.
1169 fieldValue = compiler.compileVariable(field); 1172 fieldValue = compiler.compileVariable(field);
1170 } 1173 }
1171 jsNewArguments.add(fieldValue); 1174 jsNewArguments.add(fieldValue);
1172 }); 1175 });
1173 return jsNewArguments; 1176 return jsNewArguments;
1174 } 1177 }
1175 } 1178 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/compiler.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698