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

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

Issue 1312393002: dart2js cps: Use 'this' instead of receiver when possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years, 3 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 '../js_backend.dart'; 7 import '../js_backend.dart';
8 import '../../common/registry.dart' show 8 import '../../common/registry.dart' show
9 Registry; 9 Registry;
10 import '../../compiler.dart' show 10 import '../../compiler.dart' show
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ClassWorld get classWorld => _compiler.world; 47 ClassWorld get classWorld => _compiler.world;
48 48
49 js.Expression constantReference(ConstantValue value) { 49 js.Expression constantReference(ConstantValue value) {
50 return _emitter.constantReference(value); 50 return _emitter.constantReference(value);
51 } 51 }
52 52
53 reportInternalError(String message) { 53 reportInternalError(String message) {
54 _compiler.internalError(_compiler.currentElement, message); 54 _compiler.internalError(_compiler.currentElement, message);
55 } 55 }
56 56
57 bool isUsedAsMixin(ClassElement clazz) {
sra1 2015/08/26 15:04:43 nit: I'm not a fan of the non-word 'clazz'. Other
58 return classWorld.isUsedAsMixin(clazz);
59 }
60
57 ConstantValue getConstantValueForVariable(VariableElement variable) { 61 ConstantValue getConstantValueForVariable(VariableElement variable) {
58 return _backend.constants.getConstantValueForVariable(variable); 62 return _backend.constants.getConstantValueForVariable(variable);
59 } 63 }
60 64
61 js.Expression staticFunctionAccess(FunctionElement element) { 65 js.Expression staticFunctionAccess(FunctionElement element) {
62 return _backend.emitter.staticFunctionAccess(element); 66 return _backend.emitter.staticFunctionAccess(element);
63 } 67 }
64 68
65 js.Expression isolateStaticClosureAccess(FunctionElement element) { 69 js.Expression isolateStaticClosureAccess(FunctionElement element) {
66 return _backend.emitter.isolateStaticClosureAccess(element); 70 return _backend.emitter.isolateStaticClosureAccess(element);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 111 }
108 112
109 bool isInterceptedSelector(Selector selector) { 113 bool isInterceptedSelector(Selector selector) {
110 return _backend.isInterceptedSelector(selector); 114 return _backend.isInterceptedSelector(selector);
111 } 115 }
112 116
113 bool isInterceptedMethod(Element element) { 117 bool isInterceptedMethod(Element element) {
114 return _backend.isInterceptedMethod(element); 118 return _backend.isInterceptedMethod(element);
115 } 119 }
116 120
121 bool isInterceptorClass(ClassElement element) {
122 return element.isSubclassOf(_backend.jsInterceptorClass);
123 }
124
117 Set<ClassElement> getInterceptedClassesOn(Selector selector) { 125 Set<ClassElement> getInterceptedClassesOn(Selector selector) {
118 return _backend.getInterceptedClassesOn(selector.name); 126 return _backend.getInterceptedClassesOn(selector.name);
119 } 127 }
120 128
121 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { 129 void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
122 _backend.registerSpecializedGetInterceptor(classes); 130 _backend.registerSpecializedGetInterceptor(classes);
123 } 131 }
124 132
125 js.Expression constructorAccess(ClassElement element) { 133 js.Expression constructorAccess(ClassElement element) {
126 return _backend.emitter.constructorAccess(element); 134 return _backend.emitter.constructorAccess(element);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass; 262 ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass;
255 263
256 bool isStringClass(ClassElement classElement) => 264 bool isStringClass(ClassElement classElement) =>
257 classElement == _backend.jsStringClass || 265 classElement == _backend.jsStringClass ||
258 classElement == _compiler.stringClass; 266 classElement == _compiler.stringClass;
259 267
260 bool isBoolClass(ClassElement classElement) => 268 bool isBoolClass(ClassElement classElement) =>
261 classElement == _backend.jsBoolClass || 269 classElement == _backend.jsBoolClass ||
262 classElement == _compiler.boolClass; 270 classElement == _compiler.boolClass;
263 } 271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698