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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart

Issue 78873007: Support type argument substitution on unnamed mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed to use the synthetic type variables added in the element model. Created 7 years 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 // TODO(ahe): Share these with js_helper.dart. 7 // TODO(ahe): Share these with js_helper.dart.
8 const FUNCTION_INDEX = 0; 8 const FUNCTION_INDEX = 0;
9 const NAME_INDEX = 1; 9 const NAME_INDEX = 1;
10 const CALL_NAME_INDEX = 2; 10 const CALL_NAME_INDEX = 2;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 '''; 175 ''';
176 176
177 String processStatics = ''' 177 String processStatics = '''
178 function processStatics(descriptor) { 178 function processStatics(descriptor) {
179 for (var property in descriptor) { 179 for (var property in descriptor) {
180 if (!hasOwnProperty.call(descriptor, property)) continue; 180 if (!hasOwnProperty.call(descriptor, property)) continue;
181 if (property === "") continue; 181 if (property === "") continue;
182 var element = descriptor[property]; 182 var element = descriptor[property];
183 var firstChar = property.substring(0, 1); 183 var firstChar = property.substring(0, 1);
184 var previousProperty; 184 var previousProperty;
185 if (firstChar === "+") { 185 if (firstChar === "+" || firstChar === "-") {
186 mangledGlobalNames[previousProperty] = property.substring(1); 186 if (firstChar === "+") ${/* Break long line.
187 if (descriptor[property] == 1) ''' // Break long line. 187 */""} mangledGlobalNames[previousProperty] = property.substring(1);
ahe 2013/12/19 11:57:06 Restore the other version, Johnni prefers it that
zarah 2013/12/20 13:17:21 Done.
188 '''descriptor[previousProperty].$reflectableField = 1; 188 if (element == 1) descriptor[previousProperty].$reflectableField = 1;
189 if (element && element.length) ''' // Break long line. 189 if (element && element.length) ''' // Break long line.
190 '''init.typeInformation[previousProperty] = element; 190 '''init.typeInformation[previousProperty] = element;
191 } else if (firstChar === "@") { 191 } else if (firstChar === "@") {
192 property = property.substring(1); 192 property = property.substring(1);
193 ${namer.currentIsolate}[property][$metadataField] = element; 193 ${namer.currentIsolate}[property][$metadataField] = element;
194 } else if (firstChar === "*") { 194 } else if (firstChar === "*") {
195 globalObject[previousProperty].$defaultValuesField = element; 195 globalObject[previousProperty].$defaultValuesField = element;
196 var optionalMethods = descriptor.$methodsWithOptionalArgumentsField; 196 var optionalMethods = descriptor.$methodsWithOptionalArgumentsField;
197 if (!optionalMethods) { 197 if (!optionalMethods) {
198 descriptor.$methodsWithOptionalArgumentsField = optionalMethods = {} 198 descriptor.$methodsWithOptionalArgumentsField = optionalMethods = {}
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 (function() { 288 (function() {
289 var result = $array[$index]; 289 var result = $array[$index];
290 if ($check) { 290 if ($check) {
291 throw new Error( 291 throw new Error(
292 name + ": expected value of type \'$type\' at index " + ($index) + 292 name + ": expected value of type \'$type\' at index " + ($index) +
293 " but got " + (typeof result)); 293 " but got " + (typeof result));
294 } 294 }
295 return result; 295 return result;
296 })()'''; 296 })()''';
297 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698