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

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

Issue 994323002: Support static getters and setters in the new dart2js code generator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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) 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 '../../dart2jslib.dart'; 8 import '../../dart2jslib.dart';
9 import '../../js_emitter/js_emitter.dart'; 9 import '../../js_emitter/js_emitter.dart';
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 reportInternalError(String message) { 38 reportInternalError(String message) {
39 _compiler.internalError(_compiler.currentElement, message); 39 _compiler.internalError(_compiler.currentElement, message);
40 } 40 }
41 41
42 ConstantExpression getConstantForVariable(VariableElement variable) { 42 ConstantExpression getConstantForVariable(VariableElement variable) {
43 return _backend.constants.getConstantForVariable(variable); 43 return _backend.constants.getConstantForVariable(variable);
44 } 44 }
45 45
46 js.Expression staticFunctionAccess(Element element) { 46 js.Expression staticFunctionAccess(FunctionElement element) {
47 return _backend.emitter.staticFunctionAccess(element); 47 return _backend.emitter.staticFunctionAccess(element);
48 } 48 }
49 49
50 js.Expression staticFieldAccess(FieldElement element) {
51 return _backend.emitter.staticFieldAccess(element);
52 }
53
50 String safeVariableName(String name) { 54 String safeVariableName(String name) {
51 return _namer.safeVariableName(name); 55 return _namer.safeVariableName(name);
52 } 56 }
53 57
54 ClassElement get listClass => _compiler.listClass; 58 ClassElement get listClass => _compiler.listClass;
55 59
56 ConstructorElement get mapLiteralConstructor { 60 ConstructorElement get mapLiteralConstructor {
57 return _backend.mapLiteralConstructor; 61 return _backend.mapLiteralConstructor;
58 } 62 }
59 63
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 bool needsSubstitutionForTypeVariableAccess(ClassElement cls) { 148 bool needsSubstitutionForTypeVariableAccess(ClassElement cls) {
145 ClassWorld classWorld = _compiler.world; 149 ClassWorld classWorld = _compiler.world;
146 if (classWorld.isUsedAsMixin(cls)) return true; 150 if (classWorld.isUsedAsMixin(cls)) return true;
147 151
148 Iterable<ClassElement> subclasses = _compiler.world.strictSubclassesOf(cls); 152 Iterable<ClassElement> subclasses = _compiler.world.strictSubclassesOf(cls);
149 return subclasses.any((ClassElement subclass) { 153 return subclasses.any((ClassElement subclass) {
150 return !_backend.rti.isTrivialSubstitution(subclass, cls); 154 return !_backend.rti.isTrivialSubstitution(subclass, cls);
151 }); 155 });
152 } 156 }
153 } 157 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698