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

Unified Diff: lib/runtime/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 1969093002: Miscellaneous runtime fixes. (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:
Download patch
« no previous file with comments | « no previous file | tool/input_sdk/private/ddc_runtime/classes.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 75b7f50be0d1ff99be600807d258313f3afdaacb..349281f49529892af3e52e59abf3f7c8513c14da 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -203,7 +203,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
dart._installProperties = function(jsProto, extProto) {
let coreObjProto = core.Object.prototype;
if (extProto === coreObjProto) {
- for (let name of dart.getOwnPropertyNames(coreObjProto)) {
+ let names = dart.getOwnPropertyNames(coreObjProto);
+ for (let i = 0; i < names.length; ++i) {
+ let name = names[i];
let desc = dart.getOwnPropertyDescriptor(coreObjProto, name);
dart.defineProperty(jsProto, dart.getExtensionSymbol(name), desc);
}
@@ -961,8 +963,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
return dart.defineLazyProperty(obj, name, {get: getter});
};
dart.copyTheseProperties = function(to, from, names) {
- for (let name of names) {
- dart.copyProperty(to, from, name);
+ for (let i = 0; i < names.length; ++i) {
+ dart.copyProperty(to, from, names[i]);
}
return to;
};
@@ -1268,8 +1270,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
}
return a == dart.dynamic ? dart.bottom : a;
}
- static _canonicalizeArray(definite, arr, map) {
- if (!definite) arr = arr.map(FunctionType._normalizeParameter);
+ static _canonicalizeArray(definite, array, map) {
+ let arr = definite ? array : array.map(FunctionType._normalizeParameter);
return FunctionType._memoizeArray(map, arr, () => arr);
}
static _canonicalizeNamed(definite, named, map) {
@@ -1292,9 +1294,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
map.set(key, result = new Map());
return result;
}
- static _createSmall(count, definite, returnType, args) {
+ static _createSmall(count, definite, returnType, required) {
let map = dart._fnTypeSmallMap[count];
- if (!definite) args = args.map(FunctionType._normalizeParameter);
+ let args = definite ? required : required.map(FunctionType._normalizeParameter);
for (var i = 0; i < count; ++i) {
map = FunctionType._lookupNonTerminal(map, args[i]);
}
« no previous file with comments | « no previous file | tool/input_sdk/private/ddc_runtime/classes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698