| Index: src/templates.js
|
| diff --git a/src/harmony-templates.js b/src/templates.js
|
| similarity index 62%
|
| rename from src/harmony-templates.js
|
| rename to src/templates.js
|
| index 254f434fdfe0e6eb75a268b8774c6fa7a49b261e..20f8af5f68cb684bd93c9de86038c30fe55107e3 100644
|
| --- a/src/harmony-templates.js
|
| +++ b/src/templates.js
|
| @@ -58,37 +58,3 @@ function GetTemplateCallSite(siteObj, rawStrings, hash) {
|
|
|
| return SetCachedCallSite(%ObjectFreeze(siteObj), hash);
|
| }
|
| -
|
| -
|
| -// ES6 Draft 10-14-2014, section 21.1.2.4
|
| -function StringRaw(callSite) {
|
| - // TODO(caitp): Use rest parameters when implemented
|
| - var numberOfSubstitutions = %_ArgumentsLength();
|
| - var cooked = ToObject(callSite);
|
| - var raw = ToObject(cooked.raw);
|
| - var literalSegments = ToLength(raw.length);
|
| - if (literalSegments <= 0) return "";
|
| -
|
| - var result = ToString(raw[0]);
|
| -
|
| - for (var i = 1; i < literalSegments; ++i) {
|
| - if (i < numberOfSubstitutions) {
|
| - result += ToString(%_Arguments(i));
|
| - }
|
| - result += ToString(raw[i]);
|
| - }
|
| -
|
| - return result;
|
| -}
|
| -
|
| -
|
| -function ExtendStringForTemplates() {
|
| - %CheckIsBootstrapping();
|
| -
|
| - // Set up the non-enumerable functions on the String object.
|
| - InstallFunctions($String, DONT_ENUM, $Array(
|
| - "raw", StringRaw
|
| - ));
|
| -}
|
| -
|
| -ExtendStringForTemplates();
|
|
|