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

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

Issue 2820143004: Remove Compiler and JavaScriptBackend from class_stub_generator (Closed)
Patch Set: Created 3 years, 8 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.js_emitter.full_emitter; 5 part of dart2js.js_emitter.full_emitter;
6 6
7 // TODO(ahe): Share these with js_helper.dart. 7 // TODO(ahe): Share these with js_helper.dart.
8 const FUNCTION_INDEX = 0; 8 const FUNCTION_INDEX = 0;
9 const NAME_INDEX = 1; 9 const NAME_INDEX = 1;
10 const CALL_NAME_INDEX = 2; 10 const CALL_NAME_INDEX = 2;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 'specProperty': js.string(namer.nativeSpecProperty), 132 'specProperty': js.string(namer.nativeSpecProperty),
133 'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(), 133 'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(),
134 'hasRetainedMetadata': backend.mirrorsData.hasRetainedMetadata, 134 'hasRetainedMetadata': backend.mirrorsData.hasRetainedMetadata,
135 'types': typesAccess, 135 'types': typesAccess,
136 'objectClassName': js.quoteName(namer.runtimeTypeName( 136 'objectClassName': js.quoteName(namer.runtimeTypeName(
137 // ignore: UNNECESSARY_CAST 137 // ignore: UNNECESSARY_CAST
138 compiler.commonElements.objectClass as Entity)), 138 compiler.commonElements.objectClass as Entity)),
139 'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo, 139 'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo,
140 'usesMangledNames': compiler.commonElements.mirrorsLibrary != null || 140 'usesMangledNames': compiler.commonElements.mirrorsLibrary != null ||
141 backend.backendUsage.isFunctionApplyUsed, 141 backend.backendUsage.isFunctionApplyUsed,
142 'tearOffCode': buildTearOffCode(backend), 142 'tearOffCode': buildTearOffCode(compiler.options, backend.emitter.emitter,
143 backend.namer, compiler.commonElements),
143 'nativeInfoHandler': nativeInfoHandler, 144 'nativeInfoHandler': nativeInfoHandler,
144 'operatorIsPrefix': js.string(namer.operatorIsPrefix), 145 'operatorIsPrefix': js.string(namer.operatorIsPrefix),
145 'deferredActionString': js.string(namer.deferredAction) 146 'deferredActionString': js.string(namer.deferredAction)
146 }; 147 };
147 String skeleton = ''' 148 String skeleton = '''
148 function $setupProgramName(programData, typesOffset) { 149 function $setupProgramName(programData, typesOffset) {
149 "use strict"; 150 "use strict";
150 if (#needsClassSupport) { 151 if (#needsClassSupport) {
151 152
152 function generateAccessor(fieldDescriptor, accessors, cls) { 153 function generateAccessor(fieldDescriptor, accessors, cls) {
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 (function() { 844 (function() {
844 var result = $array[$index]; 845 var result = $array[$index];
845 if ($check) { 846 if ($check) {
846 throw new Error( 847 throw new Error(
847 name + ": expected value of type \'$type\' at index " + ($index) + 848 name + ": expected value of type \'$type\' at index " + ($index) +
848 " but got " + (typeof result)); 849 " but got " + (typeof result));
849 } 850 }
850 return result; 851 return result;
851 })()'''; 852 })()''';
852 } 853 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698