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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 14015004: Remove call-indirections from type tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 482116299e3a2c0521919bc7760fd776998c0381..0dea08d7d9a2d6b40c8a5b322c3bb6664df90d57 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -1175,17 +1175,11 @@ class CodeEmitterTask extends CompilerTask {
includeSuperMembers: false);
void generateIsTest(Element other) {
- jsAst.Expression code;
if (other == compiler.objectClass && other != classElement) {
// Avoid emitting [:$isObject:] on all classes but [Object].
return;
}
- if (nativeEmitter.requiresNativeIsCheck(other)) {
- code = js.fun([], [js.return_(true)]);
- } else {
- code = js('true');
- }
- builder.addProperty(namer.operatorIs(other), code);
+ builder.addProperty(namer.operatorIs(other), js('true'));
}
void generateSubstitution(Element other, {bool emitNull: false}) {
@@ -1203,9 +1197,6 @@ class CodeEmitterTask extends CompilerTask {
}
}
if (expression != null) {
- if (needsNativeCheck) {
- expression = js.fun([], js.return_(expression));
- }
builder.addProperty(namer.substitutionName(other), expression);
}
}

Powered by Google App Engine
This is Rietveld 408576698