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

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

Issue 2692303002: Split InterceptorData (Closed)
Patch Set: Created 3 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
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 '../compiler.dart' show Compiler; 7 import '../compiler.dart' show Compiler;
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../elements/entities.dart'; 9 import '../elements/entities.dart';
10 import '../elements/types.dart' show InterfaceType; 10 import '../elements/types.dart' show InterfaceType;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 (a0 >>> 0) === a0 && a0 < receiver.length) 330 (a0 >>> 0) === a0 && a0 < receiver.length)
331 return receiver[a0] = a1; 331 return receiver[a0] = a1;
332 ''', 332 ''',
333 typeCheck); 333 typeCheck);
334 } 334 }
335 } 335 }
336 return null; 336 return null;
337 } 337 }
338 338
339 jsAst.Expression generateOneShotInterceptor(jsAst.Name name) { 339 jsAst.Expression generateOneShotInterceptor(jsAst.Name name) {
340 Selector selector = backend.interceptorData.oneShotInterceptors[name]; 340 Selector selector =
341 backend.oneShotInterceptorData.getOneShotInterceptorSelector(name);
341 Set<ClassEntity> classes = 342 Set<ClassEntity> classes =
342 backend.interceptorData.getInterceptedClassesOn(selector.name); 343 backend.interceptorData.getInterceptedClassesOn(selector.name);
343 jsAst.Name getInterceptorName = namer.nameForGetInterceptor(classes); 344 jsAst.Name getInterceptorName = namer.nameForGetInterceptor(classes);
344 345
345 List<String> parameterNames = <String>[]; 346 List<String> parameterNames = <String>[];
346 parameterNames.add('receiver'); 347 parameterNames.add('receiver');
347 348
348 if (selector.isSetter) { 349 if (selector.isSetter) {
349 parameterNames.add('value'); 350 parameterNames.add('value');
350 } else { 351 } else {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 413 }
413 414
414 var map = new jsAst.ObjectInitializer(properties); 415 var map = new jsAst.ObjectInitializer(properties);
415 elements.add(map); 416 elements.add(map);
416 } 417 }
417 } 418 }
418 419
419 return new jsAst.ArrayInitializer(elements); 420 return new jsAst.ArrayInitializer(elements);
420 } 421 }
421 } 422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698