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

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

Issue 1136913006: dart2js: remove JS_OBJECT_CLASS_NAME and JS_NULL_CLASS_NAME from foreign (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove empty lines. Created 5 years, 7 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 aeeddc3afb936ee0a358f463cc47d5613669c1a3..32a4da6d00e5306268c0013cb972549f7903112f 100644
--- a/pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart
@@ -147,13 +147,6 @@ class Emitter implements emitterTask.Emitter {
case JsBuiltin.isFunctionType:
return _backend.rti.representationGenerator.templateForIsFunctionType;
- case JsBuiltin.isFunctionTypeLiteral:
- String functionClassName =
- _backend.namer.runtimeTypeName(_compiler.functionClass);
-
- return js.js.expressionTemplateFor(
- '#.$typeNameProperty === "$functionClassName"');
-
case JsBuiltin.typeName:
return js.js.expressionTemplateFor("#.$typeNameProperty");
@@ -170,6 +163,24 @@ class Emitter implements emitterTask.Emitter {
String isPrefix = namer.operatorIsPrefix;
return js.js.expressionTemplateFor("('$isPrefix' + #) in #.prototype");
+ case JsBuiltin.isFunctionTypeRti:
+ String functionClassName =
+ _backend.namer.runtimeTypeName(_compiler.functionClass);
+ return js.js.expressionTemplateFor(
+ '#.$typeNameProperty === "$functionClassName"');
+
+ case JsBuiltin.isNullTypeRti:
+ String nullClassName =
+ _backend.namer.runtimeTypeName(_compiler.nullClass);
+ return js.js.expressionTemplateFor(
+ '#.$typeNameProperty === "$nullClassName"');
+
+ case JsBuiltin.isDartObjectTypeRti:
+ String dartObjectClassName =
+ _backend.namer.runtimeTypeName(_compiler.objectClass);
+ return js.js.expressionTemplateFor(
+ '#.$typeNameProperty === "$dartObjectClassName"');
+
case JsBuiltin.getMetadata:
return _emitter.templateForReadMetadata;
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698