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

Unified Diff: src/harmony-templates.js

Issue 947683002: Reimplement Maps and Sets in JS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename all the things, add more macros, and remove unnecessary %_CallFunctions Created 5 years, 9 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: src/harmony-templates.js
diff --git a/src/harmony-templates.js b/src/harmony-templates.js
index 254f434fdfe0e6eb75a268b8774c6fa7a49b261e..fa89a849f4f93760d8f498c11c624a4a4ab8fe58 100644
--- a/src/harmony-templates.js
+++ b/src/harmony-templates.js
@@ -21,7 +21,7 @@ function SameCallSiteElements(rawStrings, other) {
function GetCachedCallSite(siteObj, hash) {
- var obj = %MapGet(callSiteCache, hash);
+ var obj = %_CallFunction(callSiteCache, hash, $MapGet);
caitp (gmail) 2015/03/25 12:56:27 Couldn't we just call MapGet() (and others) direct
adamk 2015/03/25 15:43:06 MapGet is now inside a closure, so it's not visibl
caitp (gmail) 2015/03/25 15:46:24 I mean, you have a reference to $MapGet, otherwise
adamk 2015/03/25 16:13:36 Not sure what you're saying. I could have called "
adamk 2015/03/25 16:14:24 Or are you asking about the use of %_CallFunction(
caitp (gmail) 2015/03/25 16:31:50 OH --- derp, you're right. Course, this map here i
if (IS_UNDEFINED(obj)) return;
@@ -33,13 +33,13 @@ function GetCachedCallSite(siteObj, hash) {
function SetCachedCallSite(siteObj, hash) {
- var obj = %MapGet(callSiteCache, hash);
+ var obj = %_CallFunction(callSiteCache, hash, $MapGet);
var array;
if (IS_UNDEFINED(obj)) {
array = new InternalArray(1);
array[0] = siteObj;
- %MapSet(callSiteCache, hash, array);
+ %_CallFunction(callSiteCache, hash, array, $MapSet);
} else {
obj.push(siteObj);
}

Powered by Google App Engine
This is Rietveld 408576698