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

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

Issue 1988023008: Name and hoist types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 4 years, 7 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: 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 0998ca2608fb90e220d72a64d03b96428926199b..9359acea9e367fcaf83aaec2caa6efa36612ef1e 100644
--- a/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -154,9 +154,7 @@ getMethodType(obj, name) => JS('', '''(() => {
getMethodTypeFromType(type, name) => JS('', '''(() => {
let sigObj = $type[$_methodSig];
if (sigObj === void 0) return void 0;
- let parts = sigObj[$name];
- if (parts === void 0) return void 0;
- return $definiteFunctionType.apply(null, parts);
+ return sigObj[$name];
})()''');
/// Get the type of a constructor from a class using the stored signature
@@ -168,9 +166,7 @@ classGetConstructorType(cls, name) => JS('', '''(() => {
if ($cls == null) return void 0;
let sigCtor = $cls[$_constructorSig];
if (sigCtor === void 0) return void 0;
- let parts = sigCtor[$name];
- if (parts === void 0) return void 0;
- return $definiteFunctionType.apply(null, parts);
+ return sigCtor[$name];
})()''');
/// Given an object and a method name, tear off the method.
@@ -226,8 +222,7 @@ _setStaticTypes(f, names) => JS('', '''(() => {
// TODO(vsm): Need to generate static methods.
if (!$f[name]) continue;
$tagLazy($f[name], function() {
- let parts = $f[$_staticSig][name];
- return $definiteFunctionType.apply(null, parts);
+ return $f[$_staticSig][name];
})
}
})()''');

Powered by Google App Engine
This is Rietveld 408576698