OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Called from a desugaring in the parser. | 5 // Called from a desugaring in the parser. |
6 | 6 |
7 var $getTemplateCallSite; | 7 var $getTemplateCallSite; |
8 | 8 |
9 (function() { | 9 (function(global, shared, exports) { |
10 | 10 |
11 "use strict"; | 11 "use strict"; |
12 | 12 |
13 %CheckIsBootstrapping(); | 13 %CheckIsBootstrapping(); |
14 | 14 |
15 var callSiteCache = new global.Map; | 15 var callSiteCache = new global.Map; |
16 var mapGetFn = global.Map.prototype.get; | 16 var mapGetFn = global.Map.prototype.get; |
17 var mapSetFn = global.Map.prototype.set; | 17 var mapSetFn = global.Map.prototype.set; |
18 | 18 |
19 | 19 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 var cached = GetCachedCallSite(rawStrings, hash); | 63 var cached = GetCachedCallSite(rawStrings, hash); |
64 | 64 |
65 if (!IS_UNDEFINED(cached)) return cached; | 65 if (!IS_UNDEFINED(cached)) return cached; |
66 | 66 |
67 %AddNamedProperty(siteObj, "raw", %ObjectFreeze(rawStrings), | 67 %AddNamedProperty(siteObj, "raw", %ObjectFreeze(rawStrings), |
68 READ_ONLY | DONT_ENUM | DONT_DELETE); | 68 READ_ONLY | DONT_ENUM | DONT_DELETE); |
69 | 69 |
70 return SetCachedCallSite(%ObjectFreeze(siteObj), hash); | 70 return SetCachedCallSite(%ObjectFreeze(siteObj), hash); |
71 } | 71 } |
72 | 72 |
73 })(); | 73 }) |
OLD | NEW |