gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11204: Fix namespace lookups.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11204: Fix namespace lookups.
Date: Mon, 06 Jul 2009 17:14:38 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11204
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-07-06 17:14:38 +0200
message:
  Fix namespace lookups.
removed:
  libcore/asobj/flash/accessibility/accessibilityclasses.h
  libcore/asobj/flash/desktop/desktopclasses.h
  libcore/asobj/flash/errors/errorsclasses.h
  libcore/asobj/flash/events/eventsclasses.h
  libcore/asobj/flash/media/mediaclasses.h
  libcore/asobj/flash/printing/printingclasses.h
  libcore/asobj/flash/sampler/samplerclasses.h
  libcore/asobj/flash/system/systemclasses.h
  libcore/asobj/flash/ui/uiclasses.h
  libcore/asobj/flash/utils/utilsclasses.h
  libcore/asobj/flash/xml/xmlclasses.h
modified:
  libcore/asobj/Global.cpp
  libcore/asobj/flash/accessibility/accessibility.am
  libcore/asobj/flash/desktop/desktop.am
  libcore/asobj/flash/errors/errors.am
  libcore/asobj/flash/events/events.am
  libcore/asobj/flash/media/media.am
  libcore/asobj/flash/printing/printing.am
  libcore/asobj/flash/sampler/sampler.am
  libcore/asobj/flash/system/system.am
  libcore/asobj/flash/ui/ui.am
  libcore/asobj/flash/utils/utils.am
  libcore/asobj/flash/xml/xml.am
  libcore/vm/Machine.cpp
  testsuite/as3compile.all/MovieClip.as
  testsuite/as3compile.all/lookup.as
    ------------------------------------------------------------
    revno: 11203.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:19:53 +0200
    message:
      Another test.
    modified:
      testsuite/as3compile.all/MovieClip.as
    ------------------------------------------------------------
    revno: 11203.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:24:48 +0200
    message:
      Drop unused classes headers.
    removed:
      libcore/asobj/flash/accessibility/accessibilityclasses.h
      libcore/asobj/flash/desktop/desktopclasses.h
      libcore/asobj/flash/errors/errorsclasses.h
      libcore/asobj/flash/media/mediaclasses.h
      libcore/asobj/flash/printing/printingclasses.h
      libcore/asobj/flash/sampler/samplerclasses.h
      libcore/asobj/flash/system/systemclasses.h
      libcore/asobj/flash/ui/uiclasses.h
      libcore/asobj/flash/utils/utilsclasses.h
      libcore/asobj/flash/xml/xmlclasses.h
    ------------------------------------------------------------
    revno: 11203.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:26:25 +0200
    message:
      Drop more unused things.
    removed:
      libcore/asobj/flash/events/eventsclasses.h
    modified:
      libcore/asobj/flash/accessibility/accessibility.am
      libcore/asobj/flash/desktop/desktop.am
      libcore/asobj/flash/errors/errors.am
    ------------------------------------------------------------
    revno: 11203.1.4
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:31:51 +0200
    message:
      Drop more unused things.
    modified:
      libcore/asobj/flash/events/events.am
      libcore/asobj/flash/media/media.am
      libcore/asobj/flash/printing/printing.am
      libcore/asobj/flash/sampler/sampler.am
      libcore/asobj/flash/system/system.am
      libcore/asobj/flash/ui/ui.am
      libcore/asobj/flash/utils/utils.am
      libcore/asobj/flash/xml/xml.am
    ------------------------------------------------------------
    revno: 11203.1.5
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:34:10 +0200
    message:
      More tests.
    modified:
      testsuite/as3compile.all/MovieClip.as
    ------------------------------------------------------------
    revno: 11203.1.6
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:48:20 +0200
    message:
      Use the namespace too when looking up properties to construct, instead of
      using the first matching object name. Fixes as3compile.all/lookup.swf,
      hopefully for everyone.
    modified:
      libcore/vm/Machine.cpp
    ------------------------------------------------------------
    revno: 11203.1.7
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:55:17 +0200
    message:
      Yes, push constructed property.
    modified:
      libcore/vm/Machine.cpp
    ------------------------------------------------------------
    revno: 11203.1.8
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 14:58:21 +0200
    message:
      Test passes now.
    modified:
      testsuite/as3compile.all/lookup.as
    ------------------------------------------------------------
    revno: 11203.1.9
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-06 15:39:37 +0200
    message:
      Error is in the global, not flash.errors namespace.
    modified:
      libcore/asobj/Global.cpp
=== modified file 'libcore/asobj/Global.cpp'
--- a/libcore/asobj/Global.cpp  2009-07-03 09:10:38 +0000
+++ b/libcore/asobj/Global.cpp  2009-07-06 13:39:37 +0000
@@ -398,6 +398,8 @@
         (N(qname_class_init, NSV::CLASS_QNAME, NSV::CLASS_OBJECT,
            NS_GLOBAL, 5))
         (N(Date_as::init, NSV::CLASS_DATE, NSV::CLASS_OBJECT, NS_GLOBAL, 5))
+        (N(Error_class_init, NSV::CLASS_ERROR, NSV::CLASS_OBJECT,
+           NS_GLOBAL, 5))
 
         // System classes
         (N(system_class_init, NSV::CLASS_SYSTEM, NSV::CLASS_OBJECT,
@@ -484,6 +486,8 @@
         (N(NetStream_as::init, NSV::CLASS_NET_STREAM, NSV::CLASS_OBJECT,
            NSV::NS_FLASH_NET, 6))
         
+        // Error classes
+        
         // XML classes
         (N(XMLDocument_as::init, NSV::CLASS_XML, NSV::CLASS_OBJECT,
            NSV::NS_FLASH_XML, 5))
@@ -498,10 +502,6 @@
         (N(contextmenu_class_init, NSV::CLASS_CONTEXTMENU, NSV::CLASS_OBJECT,
            NSV::NS_FLASH_UI, 7))
         
-        // Error classes
-        (N(Error_class_init, NSV::CLASS_ERROR, NSV::CLASS_OBJECT,
-           NSV::NS_FLASH_ERRORS, 5))
-        
         // Accessibility classes
         (N(accessibility_class_init, NSV::CLASS_ACCESSIBILITY,
            NSV::CLASS_OBJECT, NSV::NS_FLASH_ACCESSIBILITY, 5))

=== modified file 'libcore/asobj/flash/accessibility/accessibility.am'
--- a/libcore/asobj/flash/accessibility/accessibility.am        2009-07-02 
09:57:12 +0000
+++ b/libcore/asobj/flash/accessibility/accessibility.am        2009-07-06 
12:26:25 +0000
@@ -31,6 +31,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(ACCESSIBILITY_SOURCES)
-noinst_HEADERS +=  $(ACCESSIBILITY_HEADERS) \
-       asobj/flash/accessibility/accessibilityclasses.h
 

=== removed file 'libcore/asobj/flash/accessibility/accessibilityclasses.h'
--- a/libcore/asobj/flash/accessibility/accessibilityclasses.h  2009-06-07 
00:49:02 +0000
+++ b/libcore/asobj/flash/accessibility/accessibilityclasses.h  1970-01-01 
00:00:00 +0000
@@ -1,10 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_ACCESSIBILITY_H
-#define GNASH_ASOBJ_FLASH_ACCESSIBILITY_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3accessibilityclasses[] = {
-       gnash::accessibilityproperties_class_init,
-       gnash::accessibility_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_ACCESSIBILITY_H

=== modified file 'libcore/asobj/flash/desktop/desktop.am'
--- a/libcore/asobj/flash/desktop/desktop.am    2009-07-02 09:57:31 +0000
+++ b/libcore/asobj/flash/desktop/desktop.am    2009-07-06 12:26:25 +0000
@@ -36,5 +36,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(DESKTOP_SOURCES)
-noinst_HEADERS +=  $(DESKTOP_HEADERS) asobj/flash/desktop/desktopclasses.h
 

=== removed file 'libcore/asobj/flash/desktop/desktopclasses.h'
--- a/libcore/asobj/flash/desktop/desktopclasses.h      2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/desktop/desktopclasses.h      1970-01-01 00:00:00 
+0000
@@ -1,11 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_DESKTOP_H
-#define GNASH_ASOBJ_FLASH_DESKTOP_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3desktopclasses[] = {
-       gnash::clipboardformats_class_init,
-       gnash::clipboardtransfermode_class_init,
-       gnash::clipboard_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_DESKTOP_H

=== modified file 'libcore/asobj/flash/errors/errors.am'
--- a/libcore/asobj/flash/errors/errors.am      2009-07-02 09:56:00 +0000
+++ b/libcore/asobj/flash/errors/errors.am      2009-07-06 12:26:25 +0000
@@ -56,5 +56,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(ERRORS_SOURCES)
-noinst_HEADERS +=  $(ERRORS_HEADERS) asobj/flash/errors/errorsclasses.h
 

=== removed file 'libcore/asobj/flash/errors/errorsclasses.h'
--- a/libcore/asobj/flash/errors/errorsclasses.h        2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/errors/errorsclasses.h        1970-01-01 00:00:00 
+0000
@@ -1,15 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_ERRORS_H
-#define GNASH_ASOBJ_FLASH_ERRORS_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3errorsclasses[] = {
-       gnash::eoferror_class_init,
-       gnash::ioerror_class_init,
-       gnash::illegaloperationerror_class_init,
-       gnash::invalidswferror_class_init,
-       gnash::memoryerror_class_init,
-       gnash::scripttimeouterror_class_init,
-       gnash::stackoverflowerror_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_ERRORS_H

=== modified file 'libcore/asobj/flash/events/events.am'
--- a/libcore/asobj/flash/events/events.am      2009-07-02 09:57:56 +0000
+++ b/libcore/asobj/flash/events/events.am      2009-07-06 12:31:51 +0000
@@ -136,4 +136,3 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(EVENTS_SOURCES)
-noinst_HEADERS +=  $(EVENTS_HEADERS) asobj/flash/events/eventsclasses.h

=== removed file 'libcore/asobj/flash/events/eventsclasses.h'
--- a/libcore/asobj/flash/events/eventsclasses.h        2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/events/eventsclasses.h        1970-01-01 00:00:00 
+0000
@@ -1,31 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_EVENTS_H
-#define GNASH_ASOBJ_FLASH_EVENTS_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3eventsclasses[] = {
-       gnash::activityevent_class_init,
-       gnash::asyncerrorevent_class_init,
-       gnash::contextmenuevent_class_init,
-       gnash::dataevent_class_init,
-       gnash::errorevent_class_init,
-       gnash::eventdispatcher_class_init,
-       gnash::eventphase_class_init,
-       gnash::event_class_init,
-       gnash::focusevent_class_init,
-       gnash::fullscreenevent_class_init,
-       gnash::httpstatusevent_class_init,
-       gnash::ieventdispatcher_class_init,
-       gnash::imeevent_class_init,
-       gnash::ioerrorevent_class_init,
-       gnash::keyboardevent_class_init,
-       gnash::mouseevent_class_init,
-       gnash::netstatusevent_class_init,
-       gnash::progressevent_class_init,
-       gnash::securityerrorevent_class_init,
-       gnash::statusevent_class_init,
-       gnash::syncevent_class_init,
-       gnash::textevent_class_init,
-       gnash::timerevent_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_EVENTS_H

=== modified file 'libcore/asobj/flash/media/media.am'
--- a/libcore/asobj/flash/media/media.am        2009-07-02 09:58:35 +0000
+++ b/libcore/asobj/flash/media/media.am        2009-07-06 12:31:51 +0000
@@ -69,4 +69,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(MEDIA_SOURCES)
-noinst_HEADERS +=  $(MEDIA_HEADERS) asobj/flash/media/mediaclasses.h
+

=== removed file 'libcore/asobj/flash/media/mediaclasses.h'
--- a/libcore/asobj/flash/media/mediaclasses.h  2009-06-10 20:04:51 +0000
+++ b/libcore/asobj/flash/media/mediaclasses.h  1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-#ifndef GNASH_ASOBJ_FLASH_MEDIA_H
-#define GNASH_ASOBJ_FLASH_MEDIA_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3mediaclasses[] = {
-       gnash::id3info_class_init,
-       gnash::microphone_class_init,
-       gnash::camera_class_init,
-       gnash::soundchannel_class_init,
-       gnash::soundloadercontext_class_init,
-       gnash::soundmixer_class_init,
-       gnash::soundtransform_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_MEDIA_H

=== modified file 'libcore/asobj/flash/printing/printing.am'
--- a/libcore/asobj/flash/printing/printing.am  2009-07-02 09:59:01 +0000
+++ b/libcore/asobj/flash/printing/printing.am  2009-07-06 12:31:51 +0000
@@ -36,4 +36,3 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(PRINTING_SOURCES)
-noinst_HEADERS +=  $(PRINTING_HEADERS) asobj/flash/printing/printingclasses.h

=== removed file 'libcore/asobj/flash/printing/printingclasses.h'
--- a/libcore/asobj/flash/printing/printingclasses.h    2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/printing/printingclasses.h    1970-01-01 00:00:00 
+0000
@@ -1,11 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_PRINTING_H
-#define GNASH_ASOBJ_FLASH_PRINTING_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3printingclasses[] = {
-       gnash::printjoboptions_class_init,
-       gnash::printjoborientation_class_init,
-       gnash::printjob_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_PRINTING_H

=== modified file 'libcore/asobj/flash/sampler/sampler.am'
--- a/libcore/asobj/flash/sampler/sampler.am    2009-07-02 10:00:54 +0000
+++ b/libcore/asobj/flash/sampler/sampler.am    2009-07-06 12:31:51 +0000
@@ -41,5 +41,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(SAMPLER_SOURCES)
-noinst_HEADERS +=  $(SAMPLER_HEADERS) asobj/flash/sampler/samplerclasses.h
 

=== removed file 'libcore/asobj/flash/sampler/samplerclasses.h'
--- a/libcore/asobj/flash/sampler/samplerclasses.h      2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/sampler/samplerclasses.h      1970-01-01 00:00:00 
+0000
@@ -1,8 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_SAMPLAR_H
-#define GNASH_ASOBJ_FLASH_SAMPLAR_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3samplerclasses[] = {
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_SAMPLAR_H

=== modified file 'libcore/asobj/flash/system/system.am'
--- a/libcore/asobj/flash/system/system.am      2009-07-02 10:00:54 +0000
+++ b/libcore/asobj/flash/system/system.am      2009-07-06 12:31:51 +0000
@@ -67,4 +67,3 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(SYSTEM_SOURCES)
-noinst_HEADERS +=  $(SYSTEM_HEADERS) asobj/flash/system/systemclasses.h

=== removed file 'libcore/asobj/flash/system/systemclasses.h'
--- a/libcore/asobj/flash/system/systemclasses.h        2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/system/systemclasses.h        1970-01-01 00:00:00 
+0000
@@ -1,16 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_SYSTEM_H
-#define GNASH_ASOBJ_FLASH_SYSTEM_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3systemclasses[] = {
-       gnash::applicationdomain_class_init,
-       gnash::capabilities_class_init,
-       gnash::imeconversionmode_class_init,
-       gnash::ime_class_init,
-       gnash::loadercontext_class_init,
-       gnash::securitydomain_class_init,
-       gnash::securitypanel_class_init,
-       gnash::security_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_SYSTEM_H

=== modified file 'libcore/asobj/flash/ui/ui.am'
--- a/libcore/asobj/flash/ui/ui.am      2009-07-02 10:00:54 +0000
+++ b/libcore/asobj/flash/ui/ui.am      2009-07-06 12:31:51 +0000
@@ -52,5 +52,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(UI_SOURCES)
-noinst_HEADERS +=  $(UI_HEADERS) asobj/flash/ui/uiclasses.h
 

=== removed file 'libcore/asobj/flash/ui/uiclasses.h'
--- a/libcore/asobj/flash/ui/uiclasses.h        2009-06-08 21:40:22 +0000
+++ b/libcore/asobj/flash/ui/uiclasses.h        1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_UI_H
-#define GNASH_ASOBJ_FLASH_UI_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3uiclasses[] = {
-       gnash::contextmenubuiltinitems_class_init,
-       gnash::contextmenuitem_class_init,
-       gnash::keylocation_class_init,
-       gnash::Keyboard_as::init,
-       gnash::mouse_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_UI_H

=== modified file 'libcore/asobj/flash/utils/utils.am'
--- a/libcore/asobj/flash/utils/utils.am        2009-07-02 10:00:54 +0000
+++ b/libcore/asobj/flash/utils/utils.am        2009-07-06 12:31:51 +0000
@@ -61,5 +61,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(UTILS_SOURCES)
-noinst_HEADERS += $(UTILS_HEADERS) asobj/flash/utils/utilsclasses.h
 

=== removed file 'libcore/asobj/flash/utils/utilsclasses.h'
--- a/libcore/asobj/flash/utils/utilsclasses.h  2009-06-07 00:49:02 +0000
+++ b/libcore/asobj/flash/utils/utilsclasses.h  1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_UTILS_H
-#define GNASH_ASOBJ_FLASH_UTILS_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3utilsclasses[] = {
-       gnash::bytearray_class_init,
-       gnash::dictionary_class_init,
-       gnash::endian_class_init,
-       gnash::idatainput_class_init,
-       gnash::idataoutput_class_init,
-       gnash::iexternalizable_class_init,
-       gnash::proxy_class_init,
-       gnash::timer_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_UTILS_H

=== modified file 'libcore/asobj/flash/xml/xml.am'
--- a/libcore/asobj/flash/xml/xml.am    2009-07-02 10:00:54 +0000
+++ b/libcore/asobj/flash/xml/xml.am    2009-07-06 12:31:51 +0000
@@ -43,5 +43,4 @@
 endif
 
 libgnashasobjs_la_SOURCES += $(XML_SOURCES) $(XML_SOURCES_AS3)
-noinst_HEADERS += $(XML_HEADERS) $(XML_HEADERS_AS3) 
asobj/flash/xml/xmlclasses.h
 

=== removed file 'libcore/asobj/flash/xml/xmlclasses.h'
--- a/libcore/asobj/flash/xml/xmlclasses.h      2009-06-08 17:46:55 +0000
+++ b/libcore/asobj/flash/xml/xmlclasses.h      1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
-// Generated by Makefile, don't hand edit!
-#ifndef GNASH_ASOBJ_FLASH_XML_H
-#define GNASH_ASOBJ_FLASH_XML_H 1
-#include "sharedlib.h"
-static gnash::SharedLib::initentry *as3xmlclasses[] = {
-       gnash::XMLDocument_as::init,
-       gnash::XMLNode_as::init,
-       gnash::xmlnodetype_class_init,
-       0
-};
-#endif // end of GNASH_ASOBJ_FLASH_XML_H

=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2009-07-06 07:05:26 +0000
+++ b/libcore/vm/Machine.cpp    2009-07-06 12:55:17 +0000
@@ -1514,6 +1514,7 @@
                 ///   'name_offset'(arg1, ..., argN)
                 case SWF::ABC_ACTION_CONSTRUCTPROP:
                 {
+                    print_stack();
                     as_environment env = as_environment(_vm);
                     asName a = pool_name(mStream->read_V32(), mPoolObject);
                     
@@ -1535,42 +1536,41 @@
                         break;
                     }
                     
-                    as_value constructor_val =
-                        object->getMember(a.getGlobalName());
-
-                    boost::intrusive_ptr<as_function> constructor =
-                        constructor_val.to_as_function();
+                    string_table::key ns = a.getNamespace() ?
+                        a.getNamespace()->getURI() : 0;
+
+                    as_value c = object->getMember(a.getGlobalName(), ns);
+
+                    // TODO: don't do this. Classes should not be functions;
+                    // we should always use the constructor member, most
+                    // likely.
+                    boost::intrusive_ptr<as_function> ctor = 
c.to_as_function();
                     
-                    if (constructor) {
+                    if (ctor) {
                         boost::intrusive_ptr<as_object> newobj =
-                            constructor->constructInstance(env, args);
+                            ctor->constructInstance(env, args);
                         push_stack(as_value(newobj));
                     }
-                    // TODO: This else clause is needed to construct classes
-                    // that aren't builtin into gnash. I don't think this is
-                    // correct, and I think the problem might be how AVM2 adds
-                    // new objects to the Global object.
+
+                    // TODO: This is more or less how everything should be 
done.
                     else {
                         log_abc("The property we found (%s) is not a "
-                                "constructor", constructor_val);
+                                "constructor", c);
 
-                        if (constructor_val.is_null() ||
-                                constructor_val.is_undefined()) {
+                        if (c.is_null() || c.is_undefined()) {
 
                             log_abc("Constructor is undefined, will not "
                                     "construct property.");
                             push_stack(as_value());
                         }
                         else {
-                            as_value val =
-                                constructor_val.to_object().get()->getMember(
+                            as_value val = c.to_object()->getMember(
                                     NSV::PROP_CONSTRUCTOR, 0);
 
-                            call_method(val, env,
-                                    constructor_val.to_object().get(), args);
+                            call_method(val, env, c.to_object().get(), args);
 
-                            // Push the constructed property?
-                            push_stack(constructor_val);
+                            // Push the constructed property
+                            push_stack(c);
                         }
                     }
                     

=== modified file 'testsuite/as3compile.all/MovieClip.as'
--- a/testsuite/as3compile.all/MovieClip.as     2009-07-06 09:28:29 +0000
+++ b/testsuite/as3compile.all/MovieClip.as     2009-07-06 12:34:10 +0000
@@ -27,6 +27,7 @@
 
         public function Main() {
 
+            xcheck_equals(MovieClip, "[class MovieClip]");
             xcheck_equals(MovieClip.prototype, "[object Object]");
             xcheck_equals(MovieClip.constructor, "[class Class]");
             check(!MovieClip.hasOwnProperty("constructor"));
@@ -39,6 +40,18 @@
             
             xcheck(MovieClip.prototype.hasOwnProperty("constructor"));
             
+            check(!MovieClip.hasOwnProperty("nextFrame"));
+            check(!MovieClip.hasOwnProperty("prevFrame"));
+            check(!MovieClip.hasOwnProperty("gotoAndStop"));
+            check(!MovieClip.hasOwnProperty("nextScene"));
+            check(!MovieClip.hasOwnProperty("prevScene"));
+            check(!MovieClip.hasOwnProperty("play"));
+            check(!MovieClip.hasOwnProperty("stop"));
+            check(!MovieClip.hasOwnProperty("addFrameScript"));
+            check(!MovieClip.hasOwnProperty("framesLoaded"));
+            check(!MovieClip.hasOwnProperty("totalFrames"));
+            check(!MovieClip.hasOwnProperty("currentFrame"));
+
             // The prototype seems really to be just an object. Just
             // test the MovieClip properties until there's a reason
             // to check others.
@@ -150,7 +163,7 @@
             xcheck_equals(typeof(m.totalFrames), "number");
             xcheck_equals(typeof(m.currentFrame), "number");
 
-            totals(98);
+            totals(110);
 
             done();
         }

=== modified file 'testsuite/as3compile.all/lookup.as'
--- a/testsuite/as3compile.all/lookup.as        2009-06-25 08:26:16 +0000
+++ b/testsuite/as3compile.all/lookup.as        2009-07-06 12:58:21 +0000
@@ -39,6 +39,8 @@
     import p1.*;
     import p2.*;
 
+    // This is not that hard at all, as the compiler should generate
+    // the code specifying which namespace to look in.
     public function Main() {
 
         var a = new A();
@@ -47,7 +49,7 @@
         check_equals(typeof(a.id()), "string");
 
         // Check non-static function lookup
-        xcheck_equals(a.id(), "p1.A");
+        check_equals(a.id(), "p1.A");
         
         // Check static function lookup.
         check_equals(B.id(), "p1.B");


reply via email to

[Prev in Thread] Current Thread [Next in Thread]