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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 12334070: Support runtime check of function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: New check encoding Created 7 years, 9 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/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index b8843daeccf1b6463040a086003dc590c87d75b3..9aac0855f6c1c8d173018cb0dfd3047623b510bc 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -2244,9 +2244,10 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
message: 'Attempt to check malformed type $type'));
world.registerIsCheck(type, work.resolutionTree);
Element element = type.element;
+ String operatorIs = backend.namer.operatorIsType(type);
use(input);
js.PropertyAccess field =
- new js.PropertyAccess.field(pop(), backend.namer.operatorIs(element));
+ new js.PropertyAccess.field(pop(), operatorIs);
if (backend.emitter.nativeEmitter.requiresNativeIsCheck(element)) {
push(new js.Call(field, <js.Expression>[]));
if (negative) push(new js.Prefix('!', pop()));
@@ -2426,7 +2427,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// 2 arguments implies that the method is either [propertyTypeCheck]
// or [propertyTypeCast].
assert(!type.isMalformed);
- String additionalArgument = backend.namer.operatorIs(type.element);
+ String additionalArgument = backend.namer.operatorIsType(type);
arguments.add(js.string(additionalArgument));
} else if (parameterCount == 3) {
// 3 arguments implies that the method is [malformedTypeCheck].

Powered by Google App Engine
This is Rietveld 408576698