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

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

Issue 917083003: Revert "dart2js: Refactoring, documentation, and a few bugfixes in Namer class." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 class InterceptorStubGenerator { 7 class InterceptorStubGenerator {
8 final Compiler compiler; 8 final Compiler compiler;
9 final Namer namer; 9 final Namer namer;
10 final JavaScriptBackend backend; 10 final JavaScriptBackend backend;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 ''', typeCheck); 284 ''', typeCheck);
285 } 285 }
286 } 286 }
287 return null; 287 return null;
288 } 288 }
289 289
290 jsAst.Expression generateOneShotInterceptor(String name) { 290 jsAst.Expression generateOneShotInterceptor(String name) {
291 Selector selector = backend.oneShotInterceptors[name]; 291 Selector selector = backend.oneShotInterceptors[name];
292 Set<ClassElement> classes = 292 Set<ClassElement> classes =
293 backend.getInterceptedClassesOn(selector.name); 293 backend.getInterceptedClassesOn(selector.name);
294 String getInterceptorName = namer.nameForGetInterceptor(classes); 294 String getInterceptorName =
295 namer.getInterceptorName(backend.getInterceptorMethod, classes);
295 296
296 List<String> parameterNames = <String>[]; 297 List<String> parameterNames = <String>[];
297 parameterNames.add('receiver'); 298 parameterNames.add('receiver');
298 299
299 if (selector.isSetter) { 300 if (selector.isSetter) {
300 parameterNames.add('value'); 301 parameterNames.add('value');
301 } else { 302 } else {
302 for (int i = 0; i < selector.argumentCount; i++) { 303 for (int i = 0; i < selector.argumentCount; i++) {
303 parameterNames.add('a$i'); 304 parameterNames.add('a$i');
304 } 305 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 364
364 var map = new jsAst.ObjectInitializer(properties); 365 var map = new jsAst.ObjectInitializer(properties);
365 elements.add(map); 366 elements.add(map);
366 } 367 }
367 } 368 }
368 } 369 }
369 370
370 return new jsAst.ArrayInitializer(elements); 371 return new jsAst.ArrayInitializer(elements);
371 } 372 }
372 } 373 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/class_stub_generator.dart ('k') | pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698