[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10416: Have visitProperties use enu
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10416: Have visitProperties use enumeration order. Makes the sol1.sol file |
Date: |
Sat, 13 Dec 2008 23:29:05 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10416
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Sat 2008-12-13 23:29:05 +0100
message:
Have visitProperties use enumeration order. Makes the sol1.sol file
closer to correct version. Next mismatch is handling of movieclips.
modified:
libcore/PropertyList.h
=== modified file 'libcore/PropertyList.h'
--- a/libcore/PropertyList.h 2008-10-25 18:51:18 +0000
+++ b/libcore/PropertyList.h 2008-12-13 22:29:05 +0000
@@ -129,7 +129,7 @@
//
/// The method will invoke the given visitor method
/// passing it two arguments: name of the property and
- /// value of it.
+ /// value of it. Scan by enumeration order.
///
/// @param visitor
/// The visitor function. Must take a string_table::key
@@ -142,8 +142,9 @@
template <class V>
void visitNonHiddenValues(V& visitor, const as_object& this_ptr) const
{
- for (container::const_iterator it = _props.begin(),
- itEnd = _props.end(); it != itEnd; ++it)
+ typedef container::nth_index<1>::type ContainerByOrder;
+ for (ContainerByOrder::const_reverse_iterator
it=_props.get<1>().rbegin(),
+ ie=_props.get<1>().rend(); it != ie; ++it)
{
if (it->getFlags().get_dont_enum()) continue;
as_value val = it->getValue(this_ptr);
@@ -458,6 +459,7 @@
/// \brief
/// Enumerate all non-hidden properties pushing
/// their keys to the given as_environment.
+ /// Follows enumeration order.
///
/// @param donelist
/// Don't enumerate those in donelist. Add those done to donelist.
@@ -467,6 +469,7 @@
/// \brief
/// Enumerate all non-hidden properties inserting
/// their name/value pair to the given SortedPropertyList.
+ /// Follows enumeration order.
///
/// @param this_ptr
/// The as_object used to set the 'this' pointer
@@ -497,6 +500,9 @@
/// Note that the PropertyList itself might be changed
/// from this call, accessed trough the 'this' pointer,
/// so this method too is non-const.
+ ///
+ /// This does not reflect the normal enumeration order. It is sorted
+ /// lexicographically by property.
///
void dump(as_object& this_ptr);
@@ -513,6 +519,9 @@
/// Note that the PropertyList itself might be changed
/// from this call, accessed trough the 'this' pointer,
/// so this method too is non-const.
+ ///
+ /// This does not reflect the normal enumeration order. It is sorted
+ /// lexicographically by property.
///
void dump(as_object& this_ptr, std::map<std::string, as_value>& to);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10416: Have visitProperties use enumeration order. Makes the sol1.sol file,
Sandro Santilli <=