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

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

Issue 1091613003: Revert "dart2js: add compiler builtins to the core-runtime." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/new_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart
index 9539cf68e8d657326fe873da5bafd78ee08f41be..ef11a580a4bca8dd46744a31d9846763c7259419 100644
--- a/pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart
@@ -4,9 +4,6 @@
library dart2js.new_js_emitter.emitter;
-import 'package:_internal/compiler/js_lib/shared/embedded_names.dart' show
- JsBuiltin;
-
import '../program_builder.dart' show ProgramBuilder;
import '../model.dart';
import 'model_emitter.dart';
@@ -24,16 +21,11 @@ import '../js_emitter.dart' show
import '../js_emitter.dart' as emitterTask show
Emitter;
-import '../../util/util.dart' show
- NO_LOCATION_SPANNABLE;
-
class Emitter implements emitterTask.Emitter {
final Compiler _compiler;
final Namer namer;
final ModelEmitter _emitter;
- JavaScriptBackend get _backend => _compiler.backend;
-
Emitter(Compiler compiler, Namer namer, NativeEmitter nativeEmitter)
: this._compiler = compiler,
this.namer = namer,
@@ -74,12 +66,12 @@ class Emitter implements emitterTask.Emitter {
}
js.PropertyAccess _globalPropertyAccess(Element element) {
- String name = namer.globalPropertyName(element);
- js.PropertyAccess pa = new js.PropertyAccess.field(
- new js.VariableUse(namer.globalObjectFor(element)),
- name);
- return pa;
- }
+ String name = namer.globalPropertyName(element);
+ js.PropertyAccess pa = new js.PropertyAccess.field(
+ new js.VariableUse(namer.globalObjectFor(element)),
+ name);
+ return pa;
+ }
@override
js.Expression isolateLazyInitializerAccess(FieldElement element) {
@@ -130,42 +122,5 @@ class Emitter implements emitterTask.Emitter {
}
@override
- js.Template templateForBuiltin(JsBuiltin builtin) {
- String typeNameProperty = ModelEmitter.typeNameProperty;
-
- switch (builtin) {
- case JsBuiltin.dartObjectConstructor:
- return js.js.expressionTemplateYielding(
- typeAccess(_compiler.objectClass));
-
- case JsBuiltin.isFunctionType:
- return _backend.rti.representationGenerator.templateForIsFunctionType;
-
- case JsBuiltin.isFunctionTypeLiteral:
- String functionClassName =
- _backend.namer.runtimeTypeName(compiler.functionClass);
-
- return jsAst.js.expressionTemplateFor(
- '#.$typeNameProperty === "$functionClassName"');
-
- case JsBuiltin.typeName:
- return jsAst.js.expressionTemplateFor("#.$typeNameProperty");
-
- case JsBuiltin.rawRuntimeType:
- return jsAst.js.expressionTemplateFor("#.constructor");
-
- case JsBuiltin.createFunctionType:
- return _backend.rti.representationGenerator
- .templateForCreateFunctionType;
-
- default:
- _compiler.internalError(NO_LOCATION_SPANNABLE,
- "Unhandled Builtin: $builtin");
- return null;
- }
- }
-
- @override
- void invalidateCaches() {
- }
+ void invalidateCaches() {}
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/js_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698