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

Unified Diff: src/templates.js

Issue 1094563002: Wrap map and set implementation in functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/promise.js ('k') | src/weak-collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/templates.js
diff --git a/src/templates.js b/src/templates.js
index 6dae189039b535b42081716c7d655437c2923651..83f51d85ea662b2c7f9d8322178aad770793b6ea 100644
--- a/src/templates.js
+++ b/src/templates.js
@@ -2,18 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-"use strict";
-
// Called from a desugaring in the parser.
-var GetTemplateCallSite;
+
+var $getTemplateCallSite;
(function() {
+"use strict";
+
%CheckIsBootstrapping();
-var callSiteCache = new $Map;
-var mapGetFn = $Map.prototype.get;
-var mapSetFn = $Map.prototype.set;
+var callSiteCache = new global.Map;
+var mapGetFn = global.Map.prototype.get;
+var mapSetFn = global.Map.prototype.set;
function SameCallSiteElements(rawStrings, other) {
@@ -58,7 +59,7 @@ function SetCachedCallSite(siteObj, hash) {
}
-GetTemplateCallSite = function(siteObj, rawStrings, hash) {
+$getTemplateCallSite = function(siteObj, rawStrings, hash) {
var cached = GetCachedCallSite(rawStrings, hash);
if (!IS_UNDEFINED(cached)) return cached;
« no previous file with comments | « src/promise.js ('k') | src/weak-collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698