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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart

Issue 14986002: Make static tear-off closures a class, like instance tear-off closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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) 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 part of js_backend; 5 part of js_backend;
6 6
7 class ConstantEmitter { 7 class ConstantEmitter {
8 ConstantReferenceEmitter _referenceEmitter; 8 ConstantReferenceEmitter _referenceEmitter;
9 ConstantInitializerEmitter _initializerEmitter; 9 ConstantInitializerEmitter _initializerEmitter;
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 jsAst.Expression _visit(Constant constant) { 60 jsAst.Expression _visit(Constant constant) {
61 return constant.accept(this); 61 return constant.accept(this);
62 } 62 }
63 63
64 jsAst.Expression visitSentinel(SentinelConstant constant) { 64 jsAst.Expression visitSentinel(SentinelConstant constant) {
65 return new jsAst.VariableUse(namer.CURRENT_ISOLATE); 65 return new jsAst.VariableUse(namer.CURRENT_ISOLATE);
66 } 66 }
67 67
68 jsAst.Expression visitFunction(FunctionConstant constant) { 68 jsAst.Expression visitFunction(FunctionConstant constant) {
69 return new jsAst.VariableUse(namer.isolateAccess(constant.element)); 69 return new jsAst.VariableUse(
70 namer.isolateStaticClosureAccess(constant.element));
70 } 71 }
71 72
72 jsAst.Expression visitNull(NullConstant constant) { 73 jsAst.Expression visitNull(NullConstant constant) {
73 return new jsAst.LiteralNull(); 74 return new jsAst.LiteralNull();
74 } 75 }
75 76
76 jsAst.Expression visitInt(IntConstant constant) { 77 jsAst.Expression visitInt(IntConstant constant) {
77 return new jsAst.LiteralNumber('${constant.value}'); 78 return new jsAst.LiteralNumber('${constant.value}');
78 } 79 }
79 80
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 310 }
310 311
311 List<jsAst.Expression> _array(List<Constant> values) { 312 List<jsAst.Expression> _array(List<Constant> values) {
312 List<jsAst.Expression> valueList = <jsAst.Expression>[]; 313 List<jsAst.Expression> valueList = <jsAst.Expression>[];
313 for (int i = 0; i < values.length; i++) { 314 for (int i = 0; i < values.length; i++) {
314 valueList.add(_reference(values[i])); 315 valueList.add(_reference(values[i]));
315 } 316 }
316 return valueList; 317 return valueList;
317 } 318 }
318 } 319 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698