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

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 1320673004: dart2js: Make functions that appear to be unreachable throw. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 2a91a2e34eb8247d1cd3d27c368125f8aa4b176a..91049cda0fe66872d542cdc2d79fdb2ac2b06f45 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -2396,8 +2396,12 @@ abstract class Closure implements Function {
jsArguments,
String propertyName) {
JS_EFFECT(() {
- BoundClosure.receiverOf(JS('BoundClosure', 'void 0'));
- BoundClosure.selfOf(JS('BoundClosure', 'void 0'));
+ // The functions are called here to model the calls from JS forms below.
+ // The types in the JS forms in the arguments are propagated in type
+ // inference.
+ BoundClosure.receiverOf(JS('BoundClosure', '0'));
+ BoundClosure.selfOf(JS('BoundClosure', '0'));
+ getType(JS('int', '0'));
});
// TODO(ahe): All the place below using \$ should be rewritten to go
// through the namer.
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698