[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9450: Add class constructor to new c
From: |
Tom Stellard |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9450: Add class constructor to new classes created by the NEWCLASS opcode. |
Date: |
Sun, 10 Aug 2008 23:52:41 +0800 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9450
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Sun 2008-08-10 23:52:41 +0800
message:
Add class constructor to new classes created by the NEWCLASS opcode.
modified:
libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp 2008-08-08 03:07:53 +0000
+++ b/libcore/vm/Machine.cpp 2008-08-10 15:52:41 +0000
@@ -24,6 +24,7 @@
#include "array.h"
#include "abc_block.h"
#include "fn_call.h"
+#include "abc_function.h"
//#define PRETEND
namespace gnash {
@@ -1361,8 +1362,11 @@
asClass *c = pool_class(cid, mPoolObject);
LOG_DEBUG_AVM("Creating new class id=%u
name=%s",c->getName(),mPoolObject->mStringPool[c->getName()]);
+ as_object* new_class = new as_object();
//Create the class.
- as_object* new_class = new as_object();
+ abc_function* constructor = new
abc_function(c->getConstructor()->getBody());
+
new_class->init_member(NSV::PROP_uuCONSTRUCTORuu,as_value(constructor),0);
+
push_stack(as_value(new_class));
//Call the class's static constructor.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/avm2 r9450: Add class constructor to new classes created by the NEWCLASS opcode.,
Tom Stellard <=