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

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

Issue 2828873002: Revert "Remove JavaScriptBackend from ClosedWorldBase" (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) 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 library dart2js.js_emitter.interceptor_stub_generator; 5 library dart2js.js_emitter.interceptor_stub_generator;
6 6
7 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 7 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
8 8
9 import '../common_elements.dart'; 9 import '../common_elements.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 typeCheck); 371 typeCheck);
372 } 372 }
373 } 373 }
374 return null; 374 return null;
375 } 375 }
376 376
377 jsAst.Expression generateOneShotInterceptor(jsAst.Name name) { 377 jsAst.Expression generateOneShotInterceptor(jsAst.Name name) {
378 Selector selector = 378 Selector selector =
379 _oneShotInterceptorData.getOneShotInterceptorSelector(name); 379 _oneShotInterceptorData.getOneShotInterceptorSelector(name);
380 Set<ClassEntity> classes = 380 Set<ClassEntity> classes =
381 _interceptorData.getInterceptedClassesOn(selector.name, _closedWorld); 381 _interceptorData.getInterceptedClassesOn(selector.name);
382 jsAst.Name getInterceptorName = _namer.nameForGetInterceptor(classes); 382 jsAst.Name getInterceptorName = _namer.nameForGetInterceptor(classes);
383 383
384 List<String> parameterNames = <String>[]; 384 List<String> parameterNames = <String>[];
385 parameterNames.add('receiver'); 385 parameterNames.add('receiver');
386 386
387 if (selector.isSetter) { 387 if (selector.isSetter) {
388 parameterNames.add('value'); 388 parameterNames.add('value');
389 } else { 389 } else {
390 for (int i = 0; i < selector.argumentCount; i++) { 390 for (int i = 0; i < selector.argumentCount; i++) {
391 parameterNames.add('a$i'); 391 parameterNames.add('a$i');
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 450 }
451 451
452 var map = new jsAst.ObjectInitializer(properties); 452 var map = new jsAst.ObjectInitializer(properties);
453 elements.add(map); 453 elements.add(map);
454 } 454 }
455 } 455 }
456 456
457 return new jsAst.ArrayInitializer(elements); 457 return new jsAst.ArrayInitializer(elements);
458 } 458 }
459 } 459 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/interceptor_data.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698