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

Unified Diff: lib/runtime/dart_sdk.js

Issue 1930323004: instantiate generic tear-offs, fixes #525 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format 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:
Download patch
« no previous file with comments | « karma.conf.js ('k') | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index 0af77e4c21030ff6eb346ab484cfc1f15a9d64e1..5386e8505573e6e69434132cccfccd57828265ac 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -142,6 +142,12 @@ dart_library.library('dart_sdk', null, /* Imports */[
dart.tag(f, sig);
return f;
};
+ dart.gbind = function(f, ...typeArgs) {
+ let result = f(...typeArgs);
+ let sig = dart._getRuntimeType(f)(...typeArgs);
+ dart.tag(result, sig);
+ return result;
+ };
dart._setMethodSignature = function(f, sigF) {
dart.defineMemoizedGetter(f, dart._methodSig, () => {
let sigObj = sigF();
@@ -462,7 +468,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
}
}
if (ftype === void 0) {
- ftype = dart.read(f);
+ ftype = dart._getRuntimeType(f);
}
if (!ftype) {
if (typeArgs != null) {
@@ -490,10 +496,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
dart.throwNoSuchMethodFunc(obj, name, args, originalFunction);
};
dart.dcall = function(f, ...args) {
- return dart._checkAndCall(f, dart.read(f), void 0, null, args, 'call');
+ return dart._checkAndCall(f, dart._getRuntimeType(f), void 0, null, args, 'call');
};
dart.dgcall = function(f, typeArgs, ...args) {
- return dart._checkAndCall(f, dart.read(f), void 0, typeArgs, args, 'call');
+ return dart._checkAndCall(f, dart._getRuntimeType(f), void 0, typeArgs, args, 'call');
};
dart._callMethod = function(obj, name, typeArgs, args, displayName) {
let symbol = dart._canonicalFieldName(obj, name, args, displayName);
@@ -758,7 +764,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
}
return result;
};
- dart.read = function(value) {
+ dart._getRuntimeType = function(value) {
return value[dart._runtimeType];
};
dart.tag = function(value, t) {
@@ -964,11 +970,11 @@ dart_library.library('dart_sdk', null, /* Imports */[
return new dart.Typedef(name, closure);
};
dart.isDartType = function(type) {
- return dart.read(type) === core.Type;
+ return dart._getRuntimeType(type) === core.Type;
};
dart.typeName = function(type) {
if (type instanceof dart.TypeRep) return type.toString();
- let tag = dart.read(type);
+ let tag = dart._getRuntimeType(type);
if (tag === core.Type) {
let name = type.name;
let args = dart.getGenericArgs(type);
« no previous file with comments | « karma.conf.js ('k') | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698