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

Unified Diff: pkg/compiler/lib/src/ssa/codegen.dart

Issue 721093003: dart2js: simplify ssa-generate constant. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 2eaad68c6cbf6998afc6dbbe0425909ba64ff31f..66451f76e2f6e6065b632d264065663f8e78ecf4 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1813,27 +1813,9 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
}
- void generateConstant(ConstantValue constant) {
- if (constant.isFunction) {
- FunctionConstantValue function = constant;
- registry.registerStaticUse(function.element);
- }
- if (constant.isType) {
Johnni Winther 2014/11/14 08:33:32 We need to move this to JavaScriptBackend.register
- // If the type is a web component, we need to ensure the constructors are
- // available to 'upgrade' the native object.
- TypeConstantValue type = constant;
- Element element = type.representedType.element;
- if (element != null && element.isClass) {
- registry.registerTypeConstant(element);
- }
- }
- push(backend.emitter.constantReference(constant));
- }
-
visitConstant(HConstant node) {
assert(isGenerateAtUseSite(node));
- generateConstant(node.constant);
-
+ push(backend.emitter.constantReference(node.constant));
registry.registerCompileTimeConstant(node.constant);
backend.constants.addCompileTimeConstantForEmission(node.constant);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698