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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 3004713002: Remove use of Compiler in inferrer engines. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 611a64747fb4d671568b5c0105b1c11743a953dc..ed8a3c45c684bf045d896e96047492e644d719b7 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -616,33 +616,6 @@ class JavaScriptBackend {
: new Namer(closedWorld, codegenWorldBuilder);
}
- /// Returns true if global optimizations such as type inferencing can apply to
- /// the field [element].
- ///
- /// One category of elements that do not apply is runtime helpers that the
- /// backend calls, but the optimizations don't see those calls.
- bool canFieldBeUsedForGlobalOptimizations(
- FieldEntity element, ClosedWorld closedWorld) {
- if (closedWorld.backendUsage.isFieldUsedByBackend(element)) {
- return false;
- }
- if ((element.isTopLevel || element.isStatic) && !element.isAssignable) {
- return true;
- }
- return !mirrorsData.isMemberAccessibleByReflection(element);
- }
-
- /// Returns true if global optimizations such as type inferencing can apply to
- /// the parameter [element].
- ///
- /// One category of elements that do not apply is runtime helpers that the
- /// backend calls, but the optimizations don't see those calls.
- bool canFunctionParametersBeUsedForGlobalOptimizations(
- FunctionEntity function, ClosedWorld closedWorld) {
- return !closedWorld.backendUsage.isFunctionUsedByBackend(function) &&
- !mirrorsData.isMemberAccessibleByReflection(function);
- }
-
void validateInterceptorImplementsAllObjectMethods(
ClassEntity interceptorClass) {
if (interceptorClass == null) return;
@@ -1019,7 +992,7 @@ class JavaScriptBackend {
_oneShotInterceptorData = new OneShotInterceptorData(
closedWorld.interceptorData, closedWorld.commonElements);
_namer = determineNamer(closedWorld, codegenWorldBuilder);
- tracer = new Tracer(closedWorld, namer, compiler);
+ tracer = new Tracer(closedWorld, namer, compiler.outputProvider);
_rtiEncoder = _namer.rtiEncoder = new RuntimeTypesEncoderImpl(
namer, closedWorld.elementEnvironment, closedWorld.commonElements);
emitter.createEmitter(namer, closedWorld, codegenWorldBuilder, sorter);
« no previous file with comments | « pkg/compiler/lib/src/io/source_map_builder.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698