|
@@ -4083,7 +4083,7 @@ type getTaggedTmplObject struct {
|
|
|
|
|
|
// As tagged template objects are not cached (because it's hard to ensure the cache is cleaned without using
|
|
// As tagged template objects are not cached (because it's hard to ensure the cache is cleaned without using
|
|
// finalizers) this wrapper is needed to override the equality method so that two objects for the same template
|
|
// finalizers) this wrapper is needed to override the equality method so that two objects for the same template
|
|
-// literal appeared be equal from the code's point of view.
|
|
|
|
|
|
+// literal appeared to be equal from the code's point of view.
|
|
type taggedTemplateArray struct {
|
|
type taggedTemplateArray struct {
|
|
*arrayObject
|
|
*arrayObject
|
|
idPtr *[]Value
|
|
idPtr *[]Value
|
|
@@ -4099,11 +4099,15 @@ func (a *taggedTemplateArray) equal(other objectImpl) bool {
|
|
func (c *getTaggedTmplObject) exec(vm *vm) {
|
|
func (c *getTaggedTmplObject) exec(vm *vm) {
|
|
cooked := vm.r.newArrayObject()
|
|
cooked := vm.r.newArrayObject()
|
|
setArrayValues(cooked, c.cooked)
|
|
setArrayValues(cooked, c.cooked)
|
|
- cooked.lengthProp.writable = false
|
|
|
|
-
|
|
|
|
raw := vm.r.newArrayObject()
|
|
raw := vm.r.newArrayObject()
|
|
setArrayValues(raw, c.raw)
|
|
setArrayValues(raw, c.raw)
|
|
|
|
+
|
|
|
|
+ cooked.propValueCount = len(c.cooked)
|
|
|
|
+ cooked.lengthProp.writable = false
|
|
|
|
+
|
|
|
|
+ raw.propValueCount = len(c.raw)
|
|
raw.lengthProp.writable = false
|
|
raw.lengthProp.writable = false
|
|
|
|
+
|
|
raw.preventExtensions(true)
|
|
raw.preventExtensions(true)
|
|
raw.val.self = &taggedTemplateArray{
|
|
raw.val.self = &taggedTemplateArray{
|
|
arrayObject: raw,
|
|
arrayObject: raw,
|