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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart

Issue 2932883002: Add FrontendStrategy.commonElements and remove Backend.commonElements (Closed)
Patch Set: Created 3 years, 6 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 dart2js.js_emitter.full_emitter; 5 library dart2js.js_emitter.full_emitter;
6 6
7 import 'dart:collection' show HashMap; 7 import 'dart:collection' show HashMap;
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 generateEmbeddedGlobalAccess(embeddedNames.ALL_CLASSES); 802 generateEmbeddedGlobalAccess(embeddedNames.ALL_CLASSES);
803 jsAst.Expression getTypeFromNameAccess = 803 jsAst.Expression getTypeFromNameAccess =
804 generateEmbeddedGlobalAccess(embeddedNames.GET_TYPE_FROM_NAME); 804 generateEmbeddedGlobalAccess(embeddedNames.GET_TYPE_FROM_NAME);
805 jsAst.Expression interceptorsByTagAccess = 805 jsAst.Expression interceptorsByTagAccess =
806 generateEmbeddedGlobalAccess(embeddedNames.INTERCEPTORS_BY_TAG); 806 generateEmbeddedGlobalAccess(embeddedNames.INTERCEPTORS_BY_TAG);
807 jsAst.Expression leafTagsAccess = 807 jsAst.Expression leafTagsAccess =
808 generateEmbeddedGlobalAccess(embeddedNames.LEAF_TAGS); 808 generateEmbeddedGlobalAccess(embeddedNames.LEAF_TAGS);
809 jsAst.Expression finishedClassesAccess = 809 jsAst.Expression finishedClassesAccess =
810 generateEmbeddedGlobalAccess(embeddedNames.FINISHED_CLASSES); 810 generateEmbeddedGlobalAccess(embeddedNames.FINISHED_CLASSES);
811 jsAst.Expression cyclicThrow = 811 jsAst.Expression cyclicThrow =
812 staticFunctionAccess(backend.commonElements.cyclicThrowHelper); 812 staticFunctionAccess(compiler.commonElements.cyclicThrowHelper);
813 jsAst.Expression laziesAccess = 813 jsAst.Expression laziesAccess =
814 generateEmbeddedGlobalAccess(embeddedNames.LAZIES); 814 generateEmbeddedGlobalAccess(embeddedNames.LAZIES);
815 815
816 return js.statement( 816 return js.statement(
817 ''' 817 '''
818 function init() { 818 function init() {
819 $isolatePropertiesName = Object.create(null); 819 $isolatePropertiesName = Object.create(null);
820 #allClasses = map(); 820 #allClasses = map();
821 #getTypeFromName = function(name) {return #allClasses[name];}; 821 #getTypeFromName = function(name) {return #allClasses[name];};
822 #interceptorsByTag = map(); 822 #interceptorsByTag = map();
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 // data. 1921 // data.
1922 mapping["_comment"] = "This mapping shows which compiled `.js` files are " 1922 mapping["_comment"] = "This mapping shows which compiled `.js` files are "
1923 "needed for a given deferred library import."; 1923 "needed for a given deferred library import.";
1924 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); 1924 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap());
1925 compiler.outputProvider( 1925 compiler.outputProvider(
1926 compiler.options.deferredMapUri.path, '', OutputType.info) 1926 compiler.options.deferredMapUri.path, '', OutputType.info)
1927 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) 1927 ..add(const JsonEncoder.withIndent(" ").convert(mapping))
1928 ..close(); 1928 ..close();
1929 } 1929 }
1930 } 1930 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698