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

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

Issue 1232423004: dart2js: check for the full getter/setter prefixes (fix #23828) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/23828_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 List<Selector> trivialNsmHandlers = <Selector>[]; 8 final List<Selector> trivialNsmHandlers = <Selector>[];
9 9
10 /// If this is true then we can generate the noSuchMethod handlers at startup 10 /// If this is true then we can generate the noSuchMethod handlers at startup
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 : js('j < #', js.number(interceptedSelectors.length)); 230 : js('j < #', js.number(interceptedSelectors.length));
231 231
232 statements.add(js.statement(''' 232 statements.add(js.statement('''
233 // If we are loading a deferred library the object class will not be in 233 // If we are loading a deferred library the object class will not be in
234 // the collectedClasses so objectClassObject is undefined, and we skip 234 // the collectedClasses so objectClassObject is undefined, and we skip
235 // setting up the names. 235 // setting up the names.
236 if (objectClassObject) { 236 if (objectClassObject) {
237 for (var j = 0; j < shortNames.length; j++) { 237 for (var j = 0; j < shortNames.length; j++) {
238 var type = 0; 238 var type = 0;
239 var shortName = shortNames[j]; 239 var shortName = shortNames[j];
240 if (shortName[0] == "${namer.getterPrefix[0]}") type = 1; 240 if (shortName.indexOf("${namer.getterPrefix}") == 0) type = 1;
241 if (shortName[0] == "${namer.setterPrefix[0]}") type = 2; 241 if (shortName.indexOf("${namer.setterPrefix}") == 0) type = 2;
242 // Generate call to: 242 // Generate call to:
243 // 243 //
244 // createInvocationMirror(String name, internalName, type, 244 // createInvocationMirror(String name, internalName, type,
245 // arguments, argumentNames) 245 // arguments, argumentNames)
246 // 246 //
247 247
248 // This 'if' is either a static choice or dynamic choice depending on 248 // This 'if' is either a static choice or dynamic choice depending on
249 // [isIntercepted]. 249 // [isIntercepted].
250 if (#isIntercepted) { 250 if (#isIntercepted) {
251 objectClassObject[shortName] = 251 objectClassObject[shortName] =
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 } 382 }
383 383
384 String get value { 384 String get value {
385 if (_cachedValue == null) { 385 if (_cachedValue == null) {
386 _cachedValue = _computeDiffEncoding(); 386 _cachedValue = _computeDiffEncoding();
387 } 387 }
388 388
389 return _cachedValue; 389 return _cachedValue;
390 } 390 }
391 } 391 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/23828_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698