[prev in list] [next in list] [prev in thread] [next in thread]
List: gnash-commit
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11179: Go the whole hog with
From: Benjamin Wolsey <bwy () benjaminwolsey ! de>
Date: 2009-06-29 11:40:42
Message-ID: E1MLFXe-0007n4-GQ () sv ! gnu ! org
[Download RAW message or body]
------------------------------------------------------------
revno: 11179
committer: Benjamin Wolsey <bwy@benjaminwolsey.de>
branch nick: trunk
timestamp: Mon 2009-06-29 13:40:42 +0200
message:
Go the whole hog with setting Global as the prototype in the absence of
any testing.
modified:
libcore/parser/abc_block.cpp
------------------------------------------------------------
revno: 11169.1.6
committer: Benjamin Wolsey <bwy@benjaminwolsey.de>
branch nick: work
timestamp: Mon 2009-06-29 13:36:39 +0200
message:
The last script, not the first, is the entry script. Set all script
prototypes to global as the apparently most likely implementation; there
is no easy way of testing it yet.
modified:
libcore/parser/abc_block.cpp
["r11179.diff" (r11179.diff)]
=== modified file 'libcore/parser/abc_block.cpp'
--- a/libcore/parser/abc_block.cpp 2009-06-29 09:42:53 +0000
+++ b/libcore/parser/abc_block.cpp 2009-06-29 11:36:39 +0000
@@ -339,18 +339,17 @@
std::for_each(_classes.begin(), _classes.end(),
std::mem_fun(&asClass::initPrototype));
- // The first (entry) script has Global as its prototype.
+ // The last (entry) script has Global as its prototype.
// This can be deduced because the global classes are initialized with a
// slot on script 0 (entry script). OpNewClass then attempts to set the
// corresponding slot once the class has been constructed. At this point,
// global should verifiably be on the stack, so the slots are expected
// to be set on the global object.
- if (!_scripts.empty()) {
- _scripts.front()->setPrototype(mach->global());
-
- std::for_each(_scripts.begin() + 1, _scripts.end(),
- std::mem_fun(&asClass::initPrototype));
- }
+ // It seems likely, though testing it is not straightforward, that all
+ // scripts have Global as a target object (prototype), so for now we
+ // will do that.
+ std::for_each(_scripts.begin(), _scripts.end(),
+ boost::bind(&asClass::setPrototype, _1, mach->global()));
std::for_each(_methods.begin(), _methods.end(),
boost::bind(&asMethod::initPrototype, _1, mach));
_______________________________________________
Gnash-commit mailing list
Gnash-commit@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic