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

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

Issue 2220993005: Split js_backend into multiple libraries (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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) 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 import '../common.dart';
6 import '../compiler.dart' show Compiler;
7 import '../constants/values.dart';
8 import '../dart_types.dart';
9 import '../elements/elements.dart';
10 import '../io/code_output.dart';
11 import '../js/js.dart' as jsAst;
12 import '../js/js.dart' show js;
13 import 'constant_system_javascript.dart';
14
15 import 'backend.dart';
16 import 'namer.dart';
6 17
7 typedef jsAst.Expression _ConstantReferenceGenerator(ConstantValue constant); 18 typedef jsAst.Expression _ConstantReferenceGenerator(ConstantValue constant);
8 19
9 typedef jsAst.Expression _ConstantListGenerator(jsAst.Expression array); 20 typedef jsAst.Expression _ConstantListGenerator(jsAst.Expression array);
10 21
11 /** 22 /**
12 * Generates the JavaScript expressions for constants. 23 * Generates the JavaScript expressions for constants.
13 * 24 *
14 * It uses a given [constantReferenceGenerator] to reference nested constants 25 * It uses a given [constantReferenceGenerator] to reference nested constants
15 * (if there are some). It is hence up to that function to decide which 26 * (if there are some). It is hence up to that function to decide which
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 [value, argumentList]); 333 [value, argumentList]);
323 } 334 }
324 return value; 335 return value;
325 } 336 }
326 337
327 @override 338 @override
328 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { 339 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) {
329 return constantReferenceGenerator(constant.referenced); 340 return constantReferenceGenerator(constant.referenced);
330 } 341 }
331 } 342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698