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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2707933002: Tests for `void`.
Patch Set: More tests. Created 3 years, 10 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
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 js_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 10
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 rti.registerRtiDependency(helpers.mapLiteralClass, cls); 1166 rti.registerRtiDependency(helpers.mapLiteralClass, cls);
1167 } else if (cls == helpers.boundClosureClass) { 1167 } else if (cls == helpers.boundClosureClass) {
1168 impactTransformer.registerBackendImpact( 1168 impactTransformer.registerBackendImpact(
1169 impactBuilder, impacts.boundClosureClass); 1169 impactBuilder, impacts.boundClosureClass);
1170 } else if (isNativeOrExtendsNative(cls)) { 1170 } else if (isNativeOrExtendsNative(cls)) {
1171 impactTransformer.registerBackendImpact( 1171 impactTransformer.registerBackendImpact(
1172 impactBuilder, impacts.nativeOrExtendsClass); 1172 impactBuilder, impacts.nativeOrExtendsClass);
1173 } else if (cls == helpers.mapLiteralClass) { 1173 } else if (cls == helpers.mapLiteralClass) {
1174 impactTransformer.registerBackendImpact( 1174 impactTransformer.registerBackendImpact(
1175 impactBuilder, impacts.mapLiteralClass); 1175 impactBuilder, impacts.mapLiteralClass);
1176 } else if (cls == commonElements.objectClass) {
1177 impactTransformer.registerBackendImpact(
1178 impactBuilder, impacts.objectClass);
1176 } 1179 }
1177 } 1180 }
1178 if (cls == helpers.closureClass) { 1181 if (cls == helpers.closureClass) {
1179 impactTransformer.registerBackendImpact( 1182 impactTransformer.registerBackendImpact(
1180 impactBuilder, impacts.closureClass); 1183 impactBuilder, impacts.closureClass);
1181 } 1184 }
1182 if (cls == commonElements.stringClass || cls == helpers.jsStringClass) { 1185 if (cls == commonElements.stringClass || cls == helpers.jsStringClass) {
1183 addInterceptors(helpers.jsStringClass, impactBuilder, 1186 addInterceptors(helpers.jsStringClass, impactBuilder,
1184 forResolution: forResolution); 1187 forResolution: forResolution);
1185 } else if (cls == commonElements.listClass || 1188 } else if (cls == commonElements.listClass ||
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
3228 resolution.emptyCache(); 3231 resolution.emptyCache();
3229 } 3232 }
3230 } 3233 }
3231 } 3234 }
3232 3235
3233 class JavaScriptBackendClasses implements BackendClasses { 3236 class JavaScriptBackendClasses implements BackendClasses {
3234 final BackendHelpers helpers; 3237 final BackendHelpers helpers;
3235 3238
3236 JavaScriptBackendClasses(this.helpers); 3239 JavaScriptBackendClasses(this.helpers);
3237 3240
3241 ClassElement get voidClass => helpers.voidClass;
3238 ClassElement get intClass => helpers.jsIntClass; 3242 ClassElement get intClass => helpers.jsIntClass;
3239 ClassElement get uint32Class => helpers.jsUInt32Class; 3243 ClassElement get uint32Class => helpers.jsUInt32Class;
3240 ClassElement get uint31Class => helpers.jsUInt31Class; 3244 ClassElement get uint31Class => helpers.jsUInt31Class;
3241 ClassElement get positiveIntClass => helpers.jsPositiveIntClass; 3245 ClassElement get positiveIntClass => helpers.jsPositiveIntClass;
3242 ClassElement get doubleClass => helpers.jsDoubleClass; 3246 ClassElement get doubleClass => helpers.jsDoubleClass;
3243 ClassElement get numClass => helpers.jsNumberClass; 3247 ClassElement get numClass => helpers.jsNumberClass;
3244 ClassElement get stringClass => helpers.jsStringClass; 3248 ClassElement get stringClass => helpers.jsStringClass;
3245 ClassElement get listClass => helpers.jsArrayClass; 3249 ClassElement get listClass => helpers.jsArrayClass;
3246 ClassElement get mutableListClass => helpers.jsMutableArrayClass; 3250 ClassElement get mutableListClass => helpers.jsMutableArrayClass;
3247 ClassElement get constListClass => helpers.jsUnmodifiableArrayClass; 3251 ClassElement get constListClass => helpers.jsUnmodifiableArrayClass;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 @override 3285 @override
3282 bool isNativeClass(ClassElement element) { 3286 bool isNativeClass(ClassElement element) {
3283 return helpers.backend.isNative(element); 3287 return helpers.backend.isNative(element);
3284 } 3288 }
3285 3289
3286 @override 3290 @override
3287 bool isNativeMember(MemberElement element) { 3291 bool isNativeMember(MemberElement element) {
3288 return helpers.backend.isNative(element); 3292 return helpers.backend.isNative(element);
3289 } 3293 }
3290 } 3294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698