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

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

Issue 1919143002: Store constant variable initializers in elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 8 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/constant_handler_javascript.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
index f300312bd3050559da0100521aaf8fd6638242f5..909b11361f3492f8eaeef58432a4048e3a82be2b 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -36,11 +36,6 @@ class JavaScriptConstantTask extends ConstantCompilerTask {
}
@override
- ConstantExpression getConstantForVariable(VariableElement element) {
- return dartConstantCompiler.getConstantForVariable(element);
- }
-
- @override
ConstantExpression compileConstant(VariableElement element) {
return measure(() {
// TODO(het): Only report errors from one of the constant compilers
@@ -58,9 +53,10 @@ class JavaScriptConstantTask extends ConstantCompilerTask {
});
}
- void compileVariable(VariableElement element) {
- measure(() {
- jsConstantCompiler.compileVariable(element);
+ @override
+ ConstantExpression compileVariable(VariableElement element) {
+ return measure(() {
+ return jsConstantCompiler.compileVariable(element);
});
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698