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

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

Issue 2939033002: Towards compiling Hello World! (Closed)
Patch Set: Fix parameter ordering Created 3 years, 6 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/common/codegen.dart
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index e6bf624ca826344195a15e1c4f7baf2913f2cd2e..00b49253ea2e503d2e39491961a18c8b021b4702 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -4,7 +4,8 @@
library dart2js.common.codegen;
-import '../elements/elements.dart' show ClassElement, LocalFunctionElement;
+import '../common_elements.dart';
+import '../elements/elements.dart' show LocalFunctionElement;
import '../elements/entities.dart';
import '../elements/types.dart' show DartType, InterfaceType;
import '../universe/use.dart' show ConstantUse, DynamicUse, StaticUse, TypeUse;
@@ -109,10 +110,11 @@ class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact {
// TODO(johnniwinther): Split this class into interface and implementation.
// TODO(johnniwinther): Move this implementation to the JS backend.
class CodegenRegistry {
+ final ElementEnvironment _elementEnvironment;
final MemberEntity currentElement;
final _CodegenImpact worldImpact;
- CodegenRegistry(this.currentElement)
+ CodegenRegistry(this._elementEnvironment, this.currentElement)
: this.worldImpact = new _CodegenImpact();
bool get isForResolution => false;
@@ -120,8 +122,8 @@ class CodegenRegistry {
String toString() => 'CodegenRegistry for $currentElement';
@deprecated
- void registerInstantiatedClass(ClassElement element) {
- registerInstantiation(element.rawType);
+ void registerInstantiatedClass(ClassEntity element) {
+ registerInstantiation(_elementEnvironment.getRawType(element));
}
void registerStaticUse(StaticUse staticUse) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698