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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart

Issue 2927043002: Handle `new Object()` in compile_from_dill_test (Closed)
Patch Set: 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/js_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index ee49e446ad3c3a656549e5c3f87b48efa4577844..ba964c12685e45c4239be1d6cb9d720e79d204ed 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -15,7 +15,7 @@ import '../../../compiler_new.dart';
import '../../common.dart';
import '../../compiler.dart' show Compiler;
import '../../constants/values.dart';
-import '../../common_elements.dart' show CommonElements;
+import '../../common_elements.dart' show CommonElements, ElementEnvironment;
import '../../elements/resolution_types.dart' show ResolutionDartType;
import '../../deferred_load.dart' show OutputUnit;
import '../../elements/elements.dart'
@@ -124,6 +124,7 @@ class Emitter extends js_emitter.EmitterBase {
NativeEmitter get nativeEmitter => task.nativeEmitter;
TypeTestRegistry get typeTestRegistry => task.typeTestRegistry;
CommonElements get commonElements => compiler.commonElements;
+ ElementEnvironment get _elementEnvironment => compiler.elementEnvironment;
// The full code that is written to each hunk part-file.
Map<OutputUnit, CodeOutput> outputBuffers = new Map<OutputUnit, CodeOutput>();
@@ -555,7 +556,7 @@ class Emitter extends js_emitter.EmitterBase {
void assembleClass(
Class cls, ClassBuilder enclosingBuilder, Fragment fragment) {
- ClassElement classElement = cls.element;
+ ClassEntity classElement = cls.element;
reporter.withCurrentElement(classElement, () {
classEmitter.emitClass(cls, enclosingBuilder, fragment);
});
@@ -1025,8 +1026,7 @@ class Emitter extends js_emitter.EmitterBase {
String libraryName = (!compiler.options.enableMinification ||
backend.mirrorsData.mustRetainLibraryNames)
- // TODO(johnniwinther): Support library names for entities.
- ? library is LibraryElement ? library.libraryName : ''
+ ? _elementEnvironment.getLibraryName(library)
: "";
jsAst.Fun metadata =

Powered by Google App Engine
This is Rietveld 408576698