|
|
|
--- !ditz.rubyforge.org,2008-03-06/issue
|
|
|
|
title: force specific key slots for internal non-configurable properties where it matters
|
|
|
|
desc: |-
|
|
|
|
For instance:
|
|
|
|
|
|
|
|
* Proxy target/handler should reside in a specific slot to make the
|
|
|
|
lookup fast. In other words, if DUK_HOBJECT_FLAG_SPECIAL_PROXYOBJ
|
|
|
|
is set, one can be certain that target/handler are in specific slots
|
|
|
|
without a scan.
|
|
|
|
|
|
|
|
* Internal values for Buffer, String, etc, should reside in a known slot.
|
|
|
|
|
|
|
|
* Typed array internal properties (byte offset, byte length, underlying
|
|
|
|
buffer).
|
|
|
|
|
|
|
|
* Enumerator.
|
|
|
|
|
|
|
|
Putting values in specific slots is safe provided that:
|
|
|
|
|
|
|
|
* Each "trusted slot" contains a non-configurable property that is never
|
|
|
|
deleted (even internally, with raw operations).
|
|
|
|
|
|
|
|
* Each property preceding a "trusted slot" is also trusted (i.e.
|
|
|
|
non-deletable).
|
|
|
|
|
|
|
|
If this is the case, the properties never change their slot because they
|
|
|
|
are never affected by object compaction.
|
|
|
|
|
|
|
|
If trusted slots are used, they should be asserted both during creation
|
|
|
|
and usage, and defines should be used for the slots.
|
|
|
|
|
|
|
|
Without trusted slots it will be difficult to support e.g. typed arrays
|
|
|
|
efficiently without creating a new struct subtype with more fields or
|
|
|
|
increasing the object footprint for all objects.
|
|
|
|
type: :task
|
|
|
|
component: duk
|
|
|
|
release:
|
|
|
|
reporter: Sami Vaarala <sami.vaarala@iki.fi>
|
|
|
|
status: :unstarted
|
|
|
|
disposition:
|
|
|
|
creation_time: 2014-04-28 13:05:31.860401 Z
|
|
|
|
references: []
|
|
|
|
|
|
|
|
id: 6c9b8a83de00e6d6eb2c4ded8ac0a0ef52ab054b
|
|
|
|
log_events:
|
|
|
|
- - 2014-04-28 13:05:32.068368 Z
|
|
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
|
|
- created
|
|
|
|
- ""
|
|
|
|
- - 2014-07-24 13:10:09.781408 Z
|
|
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
|
|
- unassigned from release v0.12
|
|
|
|
- ""
|