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 (function(global, utils) { | 7 (function(global, utils) { |
8 | 8 |
9 "use strict"; | 9 "use strict"; |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 return siteObj; | 64 return siteObj; |
65 } | 65 } |
66 | 66 |
67 | 67 |
68 function GetTemplateCallSite(siteObj, rawStrings, hash) { | 68 function GetTemplateCallSite(siteObj, rawStrings, hash) { |
69 var cached = GetCachedCallSite(rawStrings, hash); | 69 var cached = GetCachedCallSite(rawStrings, hash); |
70 | 70 |
71 if (!IS_UNDEFINED(cached)) return cached; | 71 if (!IS_UNDEFINED(cached)) return cached; |
72 | 72 |
73 %AddNamedProperty(siteObj, "raw", %ObjectFreeze(rawStrings), | 73 %AddNamedProperty(siteObj, "raw", %object_freeze(rawStrings), |
74 READ_ONLY | DONT_ENUM | DONT_DELETE); | 74 READ_ONLY | DONT_ENUM | DONT_DELETE); |
75 | 75 |
76 return SetCachedCallSite(%ObjectFreeze(siteObj), hash); | 76 return SetCachedCallSite(%object_freeze(siteObj), hash); |
77 } | 77 } |
78 | 78 |
79 // ---------------------------------------------------------------------------- | 79 // ---------------------------------------------------------------------------- |
80 // Exports | 80 // Exports |
81 | 81 |
82 %InstallToContext(["get_template_call_site", GetTemplateCallSite]); | 82 %InstallToContext(["get_template_call_site", GetTemplateCallSite]); |
83 | 83 |
84 }) | 84 }) |
OLD | NEW |