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

Unified Diff: lib/runtime/dart_runtime.js

Issue 1145283002: Use short array syntax in method signatures (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
« no previous file with comments | « lib/runtime/dart/math.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_runtime.js
diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js
index a05cf97c6ec91917cc29848966028ef72a6183e8..10a577b4a7bfae2cc16a44a39b7eb6f01c92c623 100644
--- a/lib/runtime/dart_runtime.js
+++ b/lib/runtime/dart_runtime.js
@@ -1002,7 +1002,9 @@ var dart, _js_helper, _js_primitives;
if (obj == null) return void 0;
let sigObj = obj.__proto__.constructor[_methodSig];
if (sigObj === void 0) return void 0;
- let sig = sigObj[name];
+ let parts = sigObj[name];
+ if (parts === void 0) return void 0;
+ let sig = functionType.apply(functionType, parts);
Jennifer Messerly 2015/05/20 19:47:34 first arg here could be null right, since there is
vsm 2015/05/20 22:29:35 Yes, the first arg to apply is the 'this' pointer.
Leaf 2015/05/20 22:52:07 Done.
return sig;
}
@@ -1036,7 +1038,9 @@ var dart, _js_helper, _js_primitives;
// Set the lazily computed runtime type field on static methods
function _setStaticTypes(f, names) {
for (let name of names) {
- function getT() { return f[_staticSig][name];};
+ function getT() { let parts = f[_staticSig][name];
+ return functionType.apply(functionType, parts)
Jennifer Messerly 2015/05/20 19:47:34 indent here is a little off
Leaf 2015/05/20 22:52:07 Done.
+ };
defineProperty(f[name], _runtimeType, {get : getT});
}
}
« no previous file with comments | « lib/runtime/dart/math.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698