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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart

Issue 1913033002: dart2js: Pass type information to constructor rather than add later. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: rebase Created 4 years, 4 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_emitter/program_builder/program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index efec052e37bd4eba4be5b2e4340d662a0334e658..74219ee0d11a0f248c9ea73804545b74a4b9b5ea 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -499,12 +499,14 @@ class ProgramBuilder {
return new Class(
element, name, null, [], instanceFields, [], [], [], [], [], [], null,
isDirectlyInstantiated: true,
+ hasRti: true, // TODO(sra): fix this.
Siggi Cherem (dart-lang) 2016/08/19 16:39:46 explain what needs to be fixed?
onlyForRti: false,
isNative: backend.isNative(element));
}
Class _buildClass(ClassElement element) {
bool onlyForRti = collector.classesOnlyNeededForRti.contains(element);
+ bool hasRti = backend.classNeedsRti(element);
if (backend.isJsInterop(element)) {
// TODO(jacobr): check whether the class has any active static fields
// if it does not we can suppress it completely.
@@ -635,6 +637,7 @@ class ProgramBuilder {
isChecks,
typeTests.functionTypeIndex,
isDirectlyInstantiated: isInstantiated,
+ hasRti: hasRti,
onlyForRti: onlyForRti);
} else {
result = new Class(
@@ -651,6 +654,7 @@ class ProgramBuilder {
isChecks,
typeTests.functionTypeIndex,
isDirectlyInstantiated: isInstantiated,
+ hasRti: hasRti,
onlyForRti: onlyForRti,
isNative: backend.isNative(element));
}

Powered by Google App Engine
This is Rietveld 408576698