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

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

Issue 2688413003: Extract BackendUsage, MirrorsData, and CheckedModeHelpers from Backend. (Closed)
Patch Set: Cleanup 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) 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 library dart2js.js_emitter.full_emitter.nsm_emitter; 5 library dart2js.js_emitter.full_emitter.nsm_emitter;
6 6
7 import '../../elements/entities.dart'; 7 import '../../elements/entities.dart';
8 import '../../js/js.dart' as jsAst; 8 import '../../js/js.dart' as jsAst;
9 import '../../js/js.dart' show js; 9 import '../../js/js.dart' show js;
10 import '../../js_backend/js_backend.dart' show GetterName, SetterName; 10 import '../../js_backend/js_backend.dart' show GetterName, SetterName;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 isTrivialNsmHandler(type, argNames, selector, jsName) && 66 isTrivialNsmHandler(type, argNames, selector, jsName) &&
67 reflectionName == null) { 67 reflectionName == null) {
68 trivialNsmHandlers.add(selector); 68 trivialNsmHandlers.add(selector);
69 } else { 69 } else {
70 StubMethod method = 70 StubMethod method =
71 generator.generateStubForNoSuchMethod(jsName, selector); 71 generator.generateStubForNoSuchMethod(jsName, selector);
72 addProperty(method.name, method.code); 72 addProperty(method.name, method.code);
73 if (reflectionName != null) { 73 if (reflectionName != null) {
74 bool accessible = closedWorld.allFunctions 74 bool accessible = closedWorld.allFunctions
75 .filter(selector, null) 75 .filter(selector, null)
76 .any(backend.isMemberAccessibleByReflection); 76 .any(backend.mirrorsData.isMemberAccessibleByReflection);
77 addProperty( 77 addProperty(
78 namer.asName('+$reflectionName'), js(accessible ? '2' : '0')); 78 namer.asName('+$reflectionName'), js(accessible ? '2' : '0'));
79 } 79 }
80 } 80 }
81 } 81 }
82 } 82 }
83 83
84 // Identify the noSuchMethod handlers that are so simple that we can 84 // Identify the noSuchMethod handlers that are so simple that we can
85 // generate them programatically. 85 // generate them programatically.
86 bool isTrivialNsmHandler( 86 bool isTrivialNsmHandler(
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 404
405 String get value { 405 String get value {
406 if (_cachedValue == null) { 406 if (_cachedValue == null) {
407 _cachedValue = _computeDiffEncoding(); 407 _cachedValue = _computeDiffEncoding();
408 } 408 }
409 409
410 return _cachedValue; 410 return _cachedValue;
411 } 411 }
412 } 412 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698