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

Unified Diff: pkg/compiler/lib/src/js_model/js_strategy.dart

Issue 2951723002: Add closure_test for kernel based members (Closed)
Patch Set: Cleanup Created 3 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/kernel/closure.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_model/js_strategy.dart
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 2bff5fdcc3d21dc453e62aadeac5fd0ee237d74f..74474516e964827154a941a744533004c153e122 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -4,7 +4,6 @@
library dart2js.js_model.strategy;
-import '../backend_strategy.dart';
import '../closure.dart' show ClosureConversionTask;
import '../common/tasks.dart';
import '../common_elements.dart';
@@ -32,27 +31,29 @@ import '../util/emptyset.dart';
import '../world.dart';
import 'elements.dart';
-class JsBackendStrategy implements BackendStrategy {
+class JsBackendStrategy implements KernelBackendStrategy {
final Compiler _compiler;
final JsToFrontendMap _map = new JsToFrontendMapImpl();
ElementEnvironment _elementEnvironment;
CommonElements _commonElements;
- KernelToElementMap __elementMap;
+ KernelToElementMap _elementMap;
ClosureConversionTask _closureDataLookup;
- GlobalLocalsMap _globalLocalsMap = new GlobalLocalsMap();
+ final GlobalLocalsMap _globalLocalsMap = new GlobalLocalsMap();
JsBackendStrategy(this._compiler);
- KernelToElementMap get _elementMap {
- if (__elementMap == null) {
+ KernelToElementMap get elementMap {
+ if (_elementMap == null) {
KernelFrontEndStrategy strategy = _compiler.frontendStrategy;
KernelToElementMap elementMap = strategy.elementMap;
- __elementMap = new JsKernelToElementMap(
+ _elementMap = new JsKernelToElementMap(
_map, _elementEnvironment, _commonElements, elementMap);
}
- return __elementMap;
+ return _elementMap;
}
+ GlobalLocalsMap get globalLocalsMapForTesting => _globalLocalsMap;
+
@override
ClosedWorldRefiner createClosedWorldRefiner(ClosedWorld closedWorld) {
_elementEnvironment =
@@ -132,7 +133,7 @@ class JsBackendStrategy implements BackendStrategy {
@override
ClosureConversionTask get closureDataLookup =>
_closureDataLookup ??= new KernelClosureConversionTask(
- _compiler.measurer, _elementMap, _globalLocalsMap);
+ _compiler.measurer, elementMap, _globalLocalsMap);
@override
SourceInformationStrategy get sourceInformationStrategy =>
@@ -142,7 +143,7 @@ class JsBackendStrategy implements BackendStrategy {
SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend,
SourceInformationStrategy sourceInformationStrategy) {
return new KernelSsaBuilder(
- task, backend.compiler, _elementMap, _globalLocalsMap);
+ task, backend.compiler, elementMap, _globalLocalsMap);
}
@override
@@ -156,7 +157,7 @@ class JsBackendStrategy implements BackendStrategy {
ClosedWorld closedWorld,
SelectorConstraintsStrategy selectorConstraintsStrategy) {
return new KernelCodegenWorldBuilder(
- _elementMap,
+ elementMap,
closedWorld.elementEnvironment,
nativeBasicData,
closedWorld,
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/kernel/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698