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

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

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 4 years 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 class NsmEmitter extends CodeEmitterHelper { 7 class NsmEmitter extends CodeEmitterHelper {
8 final ClosedWorld closedWorld; 8 final ClosedWorld closedWorld;
9 final List<Selector> trivialNsmHandlers = <Selector>[]; 9 final List<Selector> trivialNsmHandlers = <Selector>[];
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 js.stringPart(",")), 155 js.stringPart(",")),
156 addQuotes: true); 156 addQuotes: true);
157 157
158 if (!minify) { 158 if (!minify) {
159 sortedLongs = 159 sortedLongs =
160 sorted.map((selector) => selector.invocationMirrorMemberName); 160 sorted.map((selector) => selector.invocationMirrorMemberName);
161 } 161 }
162 } 162 }
163 // Startup code that loops over the method names and puts handlers on the 163 // Startup code that loops over the method names and puts handlers on the
164 // Object class to catch noSuchMethod invocations. 164 // Object class to catch noSuchMethod invocations.
165 ClassElement objectClass = compiler.coreClasses.objectClass; 165 ClassElement objectClass = compiler.commonElements.objectClass;
166 jsAst.Expression createInvocationMirror = backend.emitter 166 jsAst.Expression createInvocationMirror = backend.emitter
167 .staticFunctionAccess(backend.helpers.createInvocationMirror); 167 .staticFunctionAccess(backend.helpers.createInvocationMirror);
168 if (useDiffEncoding) { 168 if (useDiffEncoding) {
169 statements.add(js.statement( 169 statements.add(js.statement(
170 '''{ 170 '''{
171 var objectClassObject = processedClasses.collected[#objectClass], 171 var objectClassObject = processedClasses.collected[#objectClass],
172 nameSequences = #diffEncoding.split("."), 172 nameSequences = #diffEncoding.split("."),
173 shortNames = []; 173 shortNames = [];
174 if (objectClassObject instanceof Array) 174 if (objectClassObject instanceof Array)
175 objectClassObject = objectClassObject[1]; 175 objectClassObject = objectClassObject[1];
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 391 }
392 392
393 String get value { 393 String get value {
394 if (_cachedValue == null) { 394 if (_cachedValue == null) {
395 _cachedValue = _computeDiffEncoding(); 395 _cachedValue = _computeDiffEncoding();
396 } 396 }
397 397
398 return _cachedValue; 398 return _cachedValue;
399 } 399 }
400 } 400 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698