https://codereview.chromium.org/663683006/diff/440001/src/harmony-templates.js
File src/harmony-templates.js (right):
https://codereview.chromium.org/663683006/diff/440001/src/harmony-templates.js#newcode16
src/harmony-templates.js:16: DefineArrayProperty(siteObj, prop,
ToPropertyDescriptor({
On 2014/11/12 15:06:05, arv wrote:
I feel like this is doing too much work.
Nothing in this spec algorithm is observable since we are creating new
objects
from internal structures. So given that, we should be able to do
something
simpler:
function GetTemplateCallSite(siteObj, rawStrings) {
%AddNamedProperty(siteObj, "raw", %ObjectFreeze(rawStrings),
READ_ONLY | DONT_ENUM | DONT_DELETE);
return %ObjectFreeze(siteObj);
}
(Even if we wanted to create new arrays we should have added the
elements using
AddElement. No need to go through descriptors etc.)
Done. It's a lot tinier that way.
https://codereview.chromium.org/663683006/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.