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

Unified Diff: sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 12299008: Stop resolving all of js_helper unconditionally. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/enqueue.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/enqueue.dart (revision 18614)
+++ sdk/lib/_internal/compiler/implementation/enqueue.dart (working copy)
@@ -67,6 +67,7 @@
// runtime type.
if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) {
compiler.enabledRuntimeType = true;
+ compiler.backend.registerRuntimeType();
} else if (element == compiler.functionApplyMethod) {
compiler.enabledFunctionApply = true;
} else if (element == compiler.invokeOnMethod) {
@@ -205,22 +206,6 @@
if (isResolutionQueue) {
compiler.resolver.checkClass(cls);
}
-
- if (compiler.enableTypeAssertions) {
- // We need to register is checks and helpers for checking
- // assignments to fields.
- // TODO(ngeoffray): This should really move to the backend.
- cls.forEachLocalMember((Element member) {
- if (!member.isInstanceMember() || !member.isField()) return;
- DartType type = member.computeType(compiler);
- registerIsCheck(type);
- SourceString helper = compiler.backend.getCheckedModeHelper(type);
- if (helper != null) {
- Element helperElement = compiler.findHelper(helper);
- registerStaticUse(helperElement);
- }
- });
- }
}
processClass(cls);
for (Link<DartType> supertypes = cls.allSupertypes;
@@ -364,8 +349,14 @@
void registerIsCheck(DartType type) {
universe.isChecks.add(type);
+ compiler.backend.registerIsCheck(type, this);
}
+ void registerAsCheck(DartType type) {
+ registerIsCheck(type);
+ compiler.backend.registerAsCheck(type);
+ }
+
void forEach(f(WorkItem work));
void logSummary(log(message)) {

Powered by Google App Engine
This is Rietveld 408576698