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

Unified Diff: src/collection.js

Issue 1154743003: Revert of Hook up more import/exports in natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.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 | « src/bootstrapper.cc ('k') | src/collection-iterator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index 70a88fb873cb18956514122aba63a1e115af01f0..b92a144c0cded375e072375f55e2ebea3902103e 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -8,19 +8,10 @@
%CheckIsBootstrapping();
-// -------------------------------------------------------------------
-// Imports
-
var GlobalMap = global.Map;
var GlobalObject = global.Object;
var GlobalSet = global.Set;
-var NumberIsNaN;
-
-utils.Import(function(from) {
- NumberIsNaN = from.NumberIsNaN;
-});
-
// -------------------------------------------------------------------
function HashToEntry(table, hash, numBuckets) {
@@ -31,7 +22,7 @@
function SetFindEntry(table, numBuckets, key, hash) {
- var keyIsNaN = NumberIsNaN(key);
+ var keyIsNaN = $numberIsNaN(key);
for (var entry = HashToEntry(table, hash, numBuckets);
entry !== NOT_FOUND;
entry = ORDERED_HASH_SET_CHAIN_AT(table, entry, numBuckets)) {
@@ -39,7 +30,7 @@
if (key === candidate) {
return entry;
}
- if (keyIsNaN && NumberIsNaN(candidate)) {
+ if (keyIsNaN && $numberIsNaN(candidate)) {
return entry;
}
}
@@ -49,7 +40,7 @@
function MapFindEntry(table, numBuckets, key, hash) {
- var keyIsNaN = NumberIsNaN(key);
+ var keyIsNaN = $numberIsNaN(key);
for (var entry = HashToEntry(table, hash, numBuckets);
entry !== NOT_FOUND;
entry = ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets)) {
@@ -57,7 +48,7 @@
if (key === candidate) {
return entry;
}
- if (keyIsNaN && NumberIsNaN(candidate)) {
+ if (keyIsNaN && $numberIsNaN(candidate)) {
return entry;
}
}
@@ -248,8 +239,8 @@
%FunctionSetLength(SetForEach, 1);
// Set up the non-enumerable functions on the Set prototype object.
-utils.InstallGetter(GlobalSet.prototype, "size", SetGetSize);
-utils.InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
+$installGetter(GlobalSet.prototype, "size", SetGetSize);
+$installFunctions(GlobalSet.prototype, DONT_ENUM, [
"add", SetAdd,
"has", SetHas,
"delete", SetDelete,
@@ -436,8 +427,8 @@
%FunctionSetLength(MapForEach, 1);
// Set up the non-enumerable functions on the Map prototype object.
-utils.InstallGetter(GlobalMap.prototype, "size", MapGetSize);
-utils.InstallFunctions(GlobalMap.prototype, DONT_ENUM, [
+$installGetter(GlobalMap.prototype, "size", MapGetSize);
+$installFunctions(GlobalMap.prototype, DONT_ENUM, [
"get", MapGet,
"set", MapSet,
"has", MapHas,
« no previous file with comments | « src/bootstrapper.cc ('k') | src/collection-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698