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

Unified Diff: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart

Issue 2110273003: Make is checks work on JavaScriptFunction objects. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index e2ebe39130a3b4ea5222bcd94f3abdba770da85f..585f98f26a52cde3783f95903955c2a8fa25cec4 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -8,6 +8,11 @@ library compiler.src.js_backend.js_interop_analysis;
import '../common.dart';
import '../constants/values.dart'
show ConstantValue, ConstructedConstantValue, StringConstantValue;
+import '../dart_types.dart'
+ show
+ DartType,
+ DynamicType,
+ FunctionType;
import '../diagnostics/messages.dart' show MessageKind;
import '../elements/elements.dart'
show
@@ -185,4 +190,14 @@ class JsInteropAnalysis {
});
return new jsAst.Block(statements);
}
+
+ FunctionType buildJsFunctionType() {
+ // TODO(jacobr): consider using codegenWorld.isChecks to determine the
+ // range of positional arguments that need to be supported by JavaScript
+ // function types.
+ return new FunctionType.synthesized(
+ const DynamicType(),
+ [],
+ new List<DartType>.generate(16, (_) => const DynamicType()));
sra1 2016/06/30 17:57:13 This is ok since it is a one-of thing, but conside
Jacob 2016/07/01 18:27:50 filled is better. Forgot we had that constructor.
+ }
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698