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

Unified Diff: tool/input_sdk/private/ddc_runtime/classes.dart

Issue 1921503007: simplify emitting dart.bind for native types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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
« no previous file with comments | « test/codegen/expect/language-all.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/ddc_runtime/classes.dart
diff --git a/tool/input_sdk/private/ddc_runtime/classes.dart b/tool/input_sdk/private/ddc_runtime/classes.dart
index adaf1d984f98c1c594bceb7043266b41b401e324..c2e708b93fa3348d959c68708fc2bd4cac6316ca 100644
--- a/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -124,9 +124,8 @@ final _staticSig = JS('', 'Symbol("sigStatic")');
/// Get the type of a method from an object using the stored signature
getMethodType(obj, name) => JS('', '''(() => {
- if ($obj === void 0) return void 0;
- if ($obj == null) return void 0;
- return $getMethodTypeFromType($obj.__proto__.constructor, $name);
+ let type = $obj == null ? $Object : $obj.__proto__.constructor;
+ return $getMethodTypeFromType(type, $name);
})()''');
/// Get the type of a method from a type using the stored signature
« no previous file with comments | « test/codegen/expect/language-all.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698