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

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

Issue 960283003: dart2js: Don't emit nsm handlers if nobody needs them in the new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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) 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.program_builder; 5 library dart2js.js_emitter.program_builder;
6 6
7 import 'js_emitter.dart' show computeMixinClass; 7 import 'js_emitter.dart' show computeMixinClass;
8 import 'model.dart'; 8 import 'model.dart';
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 callStubs.add(_buildStubMethod(name, code, element: member)); 349 callStubs.add(_buildStubMethod(name, code, element: member));
350 }); 350 });
351 } 351 }
352 } 352 }
353 } 353 }
354 354
355 List<StubMethod> typeVariableReaderStubs = 355 List<StubMethod> typeVariableReaderStubs =
356 runtimeTypeGenerator.generateTypeVariableReaderStubs(element); 356 runtimeTypeGenerator.generateTypeVariableReaderStubs(element);
357 357
358 List<StubMethod> noSuchMethodStubs = <StubMethod>[]; 358 List<StubMethod> noSuchMethodStubs = <StubMethod>[];
359 if (element == _compiler.objectClass) { 359 if (_compiler.enabledNoSuchMethod && element == _compiler.objectClass) {
360 Map<String, Selector> selectors = 360 Map<String, Selector> selectors =
361 classStubGenerator.computeSelectorsForNsmHandlers(); 361 classStubGenerator.computeSelectorsForNsmHandlers();
362 selectors.forEach((String name, Selector selector) { 362 selectors.forEach((String name, Selector selector) {
363 noSuchMethodStubs 363 noSuchMethodStubs
364 .add(classStubGenerator.generateStubForNoSuchMethod(name, 364 .add(classStubGenerator.generateStubForNoSuchMethod(name,
365 selector)); 365 selector));
366 }); 366 });
367 } 367 }
368 368
369 if (element == backend.closureClass) { 369 if (element == backend.closureClass) {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 _registry.registerConstant(outputUnit, constantValue); 753 _registry.registerConstant(outputUnit, constantValue);
754 assert(!_constants.containsKey(constantValue)); 754 assert(!_constants.containsKey(constantValue));
755 String name = namer.constantName(constantValue); 755 String name = namer.constantName(constantValue);
756 String constantObject = namer.globalObjectForConstant(constantValue); 756 String constantObject = namer.globalObjectForConstant(constantValue);
757 Holder holder = _registry.registerHolder(constantObject); 757 Holder holder = _registry.registerHolder(constantObject);
758 Constant constant = new Constant(name, holder, constantValue); 758 Constant constant = new Constant(name, holder, constantValue);
759 _constants[constantValue] = constant; 759 _constants[constantValue] = constant;
760 } 760 }
761 } 761 }
762 } 762 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698