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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 221873002: Compute frontend/backend specific constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index 34c5c486000834a048a2ef7050cb8013d58d4550..6f90549e6ec3e226bc880f9df9c71193f2138ba1 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -45,6 +45,14 @@ class DartBackend extends Backend {
Map<Element, TreeElements> get resolvedElements =>
compiler.enqueuer.resolution.resolvedElements;
+ ConstantSystem get constantSystem {
+ return constantCompiler.constantCompiler.constantSystem;
+ }
+
+ BackendConstantHandler get constantHandler => constantCompiler;
+
+ DartConstantHandler constantCompiler;
+
/**
* Tells whether it is safe to remove type declarations from variables,
* functions parameters. It becomes not safe if:
@@ -96,6 +104,7 @@ class DartBackend extends Backend {
reexportingLibraries = <Element, LibraryElement>{},
forceStripTypes = strips.indexOf('types') != -1,
stripAsserts = strips.indexOf('asserts') != -1,
+ constantCompiler = new DartConstantHandler(compiler),
super(compiler);
bool classNeedsRti(ClassElement cls) => false;

Powered by Google App Engine
This is Rietveld 408576698