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

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

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Address comments and fix duplicated library names. 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 'needsMixinSupport': emitter.needsMixinSupport, 125 'needsMixinSupport': emitter.needsMixinSupport,
126 'needsNativeSupport': program.needsNativeSupport, 126 'needsNativeSupport': program.needsNativeSupport,
127 'enabledJsInterop': backend.jsInteropAnalysis.enabledJsInterop, 127 'enabledJsInterop': backend.jsInteropAnalysis.enabledJsInterop,
128 'jsInteropBoostrap': backend.jsInteropAnalysis.buildJsInteropBootstrap(), 128 'jsInteropBoostrap': backend.jsInteropAnalysis.buildJsInteropBootstrap(),
129 'isInterceptorClass': namer.operatorIs(backend.helpers.jsInterceptorClass), 129 'isInterceptorClass': namer.operatorIs(backend.helpers.jsInterceptorClass),
130 'isObject': namer.operatorIs(compiler.commonElements.objectClass), 130 'isObject': namer.operatorIs(compiler.commonElements.objectClass),
131 'specProperty': js.string(namer.nativeSpecProperty), 131 'specProperty': js.string(namer.nativeSpecProperty),
132 'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(), 132 'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(),
133 'hasRetainedMetadata': backend.mirrorsData.hasRetainedMetadata, 133 'hasRetainedMetadata': backend.mirrorsData.hasRetainedMetadata,
134 'types': typesAccess, 134 'types': typesAccess,
135 'objectClassName': js.quoteName( 135 'objectClassName': js.quoteName(namer.runtimeTypeName(
136 namer.runtimeTypeName(compiler.commonElements.objectClass as Entity)), 136 // ignore: UNNECESSARY_CAST
137 compiler.commonElements.objectClass as Entity)),
137 'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo, 138 'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo,
138 'usesMangledNames': compiler.commonElements.mirrorsLibrary != null || 139 'usesMangledNames': compiler.commonElements.mirrorsLibrary != null ||
139 backend.backendUsage.isFunctionApplyUsed, 140 backend.backendUsage.isFunctionApplyUsed,
140 'tearOffCode': buildTearOffCode(backend), 141 'tearOffCode': buildTearOffCode(backend),
141 'nativeInfoHandler': nativeInfoHandler, 142 'nativeInfoHandler': nativeInfoHandler,
142 'operatorIsPrefix': js.string(namer.operatorIsPrefix), 143 'operatorIsPrefix': js.string(namer.operatorIsPrefix),
143 'deferredActionString': js.string(namer.deferredAction) 144 'deferredActionString': js.string(namer.deferredAction)
144 }; 145 };
145 String skeleton = ''' 146 String skeleton = '''
146 function $setupProgramName(programData, typesOffset) { 147 function $setupProgramName(programData, typesOffset) {
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 (function() { 842 (function() {
842 var result = $array[$index]; 843 var result = $array[$index];
843 if ($check) { 844 if ($check) {
844 throw new Error( 845 throw new Error(
845 name + ": expected value of type \'$type\' at index " + ($index) + 846 name + ": expected value of type \'$type\' at index " + ($index) +
846 " but got " + (typeof result)); 847 " but got " + (typeof result));
847 } 848 }
848 return result; 849 return result;
849 })()'''; 850 })()''';
850 } 851 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698