mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
--- !ditz.rubyforge.org,2008-03-06/issue
|
|
title: lazy .prototype for objects
|
|
desc: |-
|
|
One way to deal with the annoying function prototype loop (and also to
|
|
reduce memory use) would be to implement the "prototype" property of a
|
|
function instance as an auto-spawning virtual property.
|
|
|
|
The property would need to behave as it was present (e.g. enumerate)
|
|
but only be defined as a concrete value if actually read, written,
|
|
used in a constructor call etc. This spawning behavior doesn't have
|
|
to be exact: it can be exaggerated to spawn the property just in case
|
|
to simplify implementation. For instance, it would be OK to spawn the
|
|
property for enumeration even if the value was not ready during
|
|
enumeration.
|
|
|
|
The lazy prototype behavior needs a flag which is cleared when the lazy
|
|
creation actually happens. This is the case because user code may
|
|
delete the prototype, and once that has been done, the prototype must not
|
|
magically spawn back.
|
|
type: :task
|
|
component: duk
|
|
release: v1.2
|
|
reporter: Sami Vaarala <sami.vaarala@iki.fi>
|
|
status: :unstarted
|
|
disposition:
|
|
creation_time: 2014-09-26 20:46:56.145454 Z
|
|
references: []
|
|
|
|
id: e0372b1a5c59036f4372a1a1e919ee4a2644e7a0
|
|
log_events:
|
|
- - 2014-09-26 20:46:56.332664 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- created
|
|
- ""
|
|
- - 2014-11-02 00:19:26.330970 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- assigned to release v1.2 from v1.1
|
|
- ""
|
|
|