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

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

Issue 1278353003: Handle more unqualified SendSets (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 part of js_backend; 5 part of js_backend;
6 6
7 /// [ConstantCompilerTask] for compilation of constants for the JavaScript 7 /// [ConstantCompilerTask] for compilation of constants for the JavaScript
8 /// backend. 8 /// backend.
9 /// 9 ///
10 /// Since this task needs to distinguish between frontend and backend constants 10 /// Since this task needs to distinguish between frontend and backend constants
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 @override 44 @override
45 ConstantExpression compileConstant(VariableElement element) { 45 ConstantExpression compileConstant(VariableElement element) {
46 return measure(() { 46 return measure(() {
47 ConstantExpression result = dartConstantCompiler.compileConstant(element); 47 ConstantExpression result = dartConstantCompiler.compileConstant(element);
48 jsConstantCompiler.compileConstant(element); 48 jsConstantCompiler.compileConstant(element);
49 return result; 49 return result;
50 }); 50 });
51 } 51 }
52 52
53 @override
54 void evaluate(ConstantExpression constant) {
55 return measure(() {
56 dartConstantCompiler.evaluate(constant);
57 jsConstantCompiler.evaluate(constant);
58 });
59 }
60
53 void compileVariable(VariableElement element) { 61 void compileVariable(VariableElement element) {
54 measure(() { 62 measure(() {
55 jsConstantCompiler.compileVariable(element); 63 jsConstantCompiler.compileVariable(element);
56 }); 64 });
57 } 65 }
58 66
59 ConstantExpression compileNode(Node node, TreeElements elements, 67 ConstantExpression compileNode(Node node, TreeElements elements,
60 {bool enforceConst: true}) { 68 {bool enforceConst: true}) {
61 return measure(() { 69 return measure(() {
62 ConstantExpression result = 70 ConstantExpression result =
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // TODO(ahe): This doesn't belong here. Rename this class and generalize. 288 // TODO(ahe): This doesn't belong here. Rename this class and generalize.
281 var closureClassMap = 289 var closureClassMap =
282 constants.compiler.closureToClassMapper.closureMappingCache 290 constants.compiler.closureToClassMapper.closureMappingCache
283 .remove(node); 291 .remove(node);
284 if (closureClassMap != null) { 292 if (closureClassMap != null) {
285 closureClassMap.removeMyselfFrom( 293 closureClassMap.removeMyselfFrom(
286 constants.compiler.enqueuer.codegen.universe); 294 constants.compiler.enqueuer.codegen.universe);
287 } 295 }
288 } 296 }
289 } 297 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/resolution/access_semantics.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698