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

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

Issue 1638863002: Revert "Optimize subclass/subtype queries" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 code_generator_dependencies; 5 library code_generator_dependencies;
6 6
7 import '../backend_helpers.dart' show 7 import '../backend_helpers.dart' show
8 BackendHelpers; 8 BackendHelpers;
9 import '../js_backend.dart'; 9 import '../js_backend.dart';
10 10
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 222
223 int getTypeVariableIndex(TypeVariableType variable) { 223 int getTypeVariableIndex(TypeVariableType variable) {
224 return variable.element.index; 224 return variable.element.index;
225 } 225 }
226 226
227 bool needsSubstitutionForTypeVariableAccess(ClassElement cls) { 227 bool needsSubstitutionForTypeVariableAccess(ClassElement cls) {
228 ClassWorld classWorld = _compiler.world; 228 ClassWorld classWorld = _compiler.world;
229 if (classWorld.isUsedAsMixin(cls)) return true; 229 if (classWorld.isUsedAsMixin(cls)) return true;
230 230
231 return _compiler.world.anyStrictSubclassOf(cls, (ClassElement subclass) { 231 Iterable<ClassElement> subclasses = _compiler.world.strictSubclassesOf(cls);
232 return subclasses.any((ClassElement subclass) {
232 return !_backend.rti.isTrivialSubstitution(subclass, cls); 233 return !_backend.rti.isTrivialSubstitution(subclass, cls);
233 }); 234 });
234 } 235 }
235 236
236 js.Expression generateTypeRepresentation(DartType dartType, 237 js.Expression generateTypeRepresentation(DartType dartType,
237 List<js.Expression> arguments, 238 List<js.Expression> arguments,
238 CodegenRegistry registry) { 239 CodegenRegistry registry) {
239 int variableIndex = 0; 240 int variableIndex = 0;
240 js.Expression representation = _backend.rtiEncoder.getTypeRepresentation( 241 js.Expression representation = _backend.rtiEncoder.getTypeRepresentation(
241 dartType, 242 dartType,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff; 294 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff;
294 295
295 js.Name registerOneShotInterceptor(Selector selector) { 296 js.Name registerOneShotInterceptor(Selector selector) {
296 return _backend.registerOneShotInterceptor(selector); 297 return _backend.registerOneShotInterceptor(selector);
297 } 298 }
298 299
299 bool mayGenerateInstanceofCheck(DartType type) { 300 bool mayGenerateInstanceofCheck(DartType type) {
300 return _backend.mayGenerateInstanceofCheck(type); 301 return _backend.mayGenerateInstanceofCheck(type);
301 } 302 }
302 } 303 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698