[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11636: Drop two constructors of as_
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11636: Drop two constructors of as_object, reducing the number of places that |
Date: |
Wed, 18 Nov 2009 15:59:48 +0100 |
User-agent: |
Bazaar (1.16.1) |
------------------------------------------------------------
revno: 11636 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-11-18 15:59:48 +0100
message:
Drop two constructors of as_object, reducing the number of places that
add properties to objects.
Use Global_as functions more.
Drop lots of useless types.
Initial implementation of some Transform functions.
removed:
libcore/asobj/flash/text/TextFormat_as.cpp
libcore/asobj/flash/text/TextFormat_as.h
renamed:
libcore/asobj/TextFormat_as.cpp => libcore/asobj/flash/text/TextFormat_as.cpp
libcore/asobj/TextFormat_as.h => libcore/asobj/flash/text/TextFormat_as.h
modified:
libcore/Button.cpp
libcore/ClassHierarchy.cpp
libcore/MovieClip.cpp
libcore/TextField.cpp
libcore/Video.cpp
libcore/as_function.cpp
libcore/as_function.h
libcore/as_object.cpp
libcore/as_object.h
libcore/as_value.cpp
libcore/asobj/Array_as.cpp
libcore/asobj/AsBroadcaster.cpp
libcore/asobj/Boolean_as.cpp
libcore/asobj/Color_as.cpp
libcore/asobj/CustomActions.cpp
libcore/asobj/Date_as.cpp
libcore/asobj/Error_as.cpp
libcore/asobj/Global_as.h
libcore/asobj/Globals.cpp
libcore/asobj/LoadVars_as.cpp
libcore/asobj/Makefile.am
libcore/asobj/Math_as.cpp
libcore/asobj/MovieClipLoader.cpp
libcore/asobj/Namespace_as.cpp
libcore/asobj/Number_as.cpp
libcore/asobj/Object.cpp
libcore/asobj/Object.h
libcore/asobj/QName_as.cpp
libcore/asobj/Selection_as.cpp
libcore/asobj/String_as.cpp
libcore/asobj/flash.am
libcore/asobj/flash/accessibility/Accessibility_as.cpp
libcore/asobj/flash/desktop/ClipboardFormats_as.cpp
libcore/asobj/flash/desktop/ClipboardTransferMode_as.cpp
libcore/asobj/flash/desktop/Clipboard_as.cpp
libcore/asobj/flash/display/AVM1Movie_as.cpp
libcore/asobj/flash/display/ActionScriptVersion_as.cpp
libcore/asobj/flash/display/BitmapDataChannel_as.cpp
libcore/asobj/flash/display/BitmapData_as.cpp
libcore/asobj/flash/display/Bitmap_as.cpp
libcore/asobj/flash/display/BlendMode_as.cpp
libcore/asobj/flash/display/CapsStyle_as.cpp
libcore/asobj/flash/display/DisplayObject_as.cpp
libcore/asobj/flash/display/FrameLabel_as.cpp
libcore/asobj/flash/display/GradientType_as.cpp
libcore/asobj/flash/display/Graphics_as.cpp
libcore/asobj/flash/display/IBitmapDrawable_as.cpp
libcore/asobj/flash/display/InteractiveObject_as.cpp
libcore/asobj/flash/display/InterpolationMethod_as.cpp
libcore/asobj/flash/display/JointStyle_as.cpp
libcore/asobj/flash/display/LineScaleMode_as.cpp
libcore/asobj/flash/display/LoaderInfo_as.cpp
libcore/asobj/flash/display/Loader_as.cpp
libcore/asobj/flash/display/MorphShape_as.cpp
libcore/asobj/flash/display/MovieClip_as.cpp
libcore/asobj/flash/display/PixelSnapping_as.cpp
libcore/asobj/flash/display/SWFVersion_as.cpp
libcore/asobj/flash/display/Scene_as.cpp
libcore/asobj/flash/display/Shape_as.cpp
libcore/asobj/flash/display/SimpleButton_as.cpp
libcore/asobj/flash/display/SpreadMethod_as.cpp
libcore/asobj/flash/display/Sprite_as.cpp
libcore/asobj/flash/display/StageAlign_as.cpp
libcore/asobj/flash/display/StageDisplayState_as.cpp
libcore/asobj/flash/display/StageQuality_as.cpp
libcore/asobj/flash/display/StageScaleMode_as.cpp
libcore/asobj/flash/display/Stage_as.cpp
libcore/asobj/flash/display/display_pkg.cpp
libcore/asobj/flash/external/ExternalInterface_as.cpp
libcore/asobj/flash/external/external_pkg.cpp
libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp
libcore/asobj/flash/filters/BitmapFilterType_as.cpp
libcore/asobj/flash/filters/BitmapFilter_as.cpp
libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp
libcore/asobj/flash/filters/filters_pkg.cpp
libcore/asobj/flash/flash_pkg.cpp
libcore/asobj/flash/geom/ColorTransform_as.cpp
libcore/asobj/flash/geom/Matrix_as.cpp
libcore/asobj/flash/geom/Point_as.cpp
libcore/asobj/flash/geom/Rectangle_as.cpp
libcore/asobj/flash/geom/Transform_as.cpp
libcore/asobj/flash/geom/geom_pkg.cpp
libcore/asobj/flash/media/Camera_as.cpp
libcore/asobj/flash/media/ID3Info_as.cpp
libcore/asobj/flash/media/Microphone_as.cpp
libcore/asobj/flash/media/SoundChannel_as.cpp
libcore/asobj/flash/media/SoundLoaderContext_as.cpp
libcore/asobj/flash/media/SoundMixer_as.cpp
libcore/asobj/flash/media/SoundTransform_as.cpp
libcore/asobj/flash/media/Sound_as.cpp
libcore/asobj/flash/net/FileFilter_as.cpp
libcore/asobj/flash/net/FileReferenceList_as.cpp
libcore/asobj/flash/net/FileReference_as.cpp
libcore/asobj/flash/net/IDynamicPropertyOutput_as.cpp
libcore/asobj/flash/net/IDynamicPropertyWriter_as.cpp
libcore/asobj/flash/net/LocalConnection_as.cpp
libcore/asobj/flash/net/NetConnection_as.cpp
libcore/asobj/flash/net/NetStream_as.cpp
libcore/asobj/flash/net/ObjectEncoding_as.cpp
libcore/asobj/flash/net/Responder_as.cpp
libcore/asobj/flash/net/SharedObjectFlushStatus_as.cpp
libcore/asobj/flash/net/SharedObject_as.cpp
libcore/asobj/flash/net/Socket_as.cpp
libcore/asobj/flash/net/URLLoaderDataFormat_as.cpp
libcore/asobj/flash/net/URLLoader_as.cpp
libcore/asobj/flash/net/URLRequestHeader_as.cpp
libcore/asobj/flash/net/URLRequestMethod_as.cpp
libcore/asobj/flash/net/URLStream_as.cpp
libcore/asobj/flash/net/XMLSocket_as.cpp
libcore/asobj/flash/net/net_pkg.cpp
libcore/asobj/flash/printing/PrintJobOptions_as.cpp
libcore/asobj/flash/printing/PrintJobOrientation_as.cpp
libcore/asobj/flash/printing/PrintJob_as.cpp
libcore/asobj/flash/sampler/DeleteObjectSample_as.cpp
libcore/asobj/flash/sampler/NewObjectSample_as.cpp
libcore/asobj/flash/sampler/Sample_as.cpp
libcore/asobj/flash/sampler/StackFrame_as.cpp
libcore/asobj/flash/system/ApplicationDomain_as.cpp
libcore/asobj/flash/system/Capabilities_as.cpp
libcore/asobj/flash/system/IMEConversionMode_as.cpp
libcore/asobj/flash/system/IME_as.cpp
libcore/asobj/flash/system/LoaderContext_as.cpp
libcore/asobj/flash/system/SecurityDomain_as.cpp
libcore/asobj/flash/system/SecurityPanel_as.cpp
libcore/asobj/flash/system/System_as.cpp
libcore/asobj/flash/text/AntiAliasType_as.cpp
libcore/asobj/flash/text/CSMSettings_as.cpp
libcore/asobj/flash/text/FontStyle_as.cpp
libcore/asobj/flash/text/FontType_as.cpp
libcore/asobj/flash/text/Font_as.cpp
libcore/asobj/flash/text/GridFitType_as.cpp
libcore/asobj/flash/text/StaticText_as.cpp
libcore/asobj/flash/text/StyleSheet_as.cpp
libcore/asobj/flash/text/TextColorType_as.cpp
libcore/asobj/flash/text/TextDisplayMode_as.cpp
libcore/asobj/flash/text/TextFieldAutoSize_as.cpp
libcore/asobj/flash/text/TextFieldType_as.cpp
libcore/asobj/flash/text/TextField_as.cpp
libcore/asobj/flash/text/TextFormatAlign_as.cpp
libcore/asobj/flash/text/TextLineMetrics_as.cpp
libcore/asobj/flash/text/TextRenderer_as.cpp
libcore/asobj/flash/text/TextSnapshot_as.cpp
libcore/asobj/flash/text/text.am
libcore/asobj/flash/text/text_pkg.cpp
libcore/asobj/flash/ui/ContextMenuItem_as.cpp
libcore/asobj/flash/ui/ContextMenu_as.cpp
libcore/asobj/flash/ui/Keyboard_as.cpp
libcore/asobj/flash/ui/Mouse_as.cpp
libcore/asobj/flash/xml/XMLDocument_as.cpp
libcore/asobj/flash/xml/XMLNodeType_as.cpp
libcore/asobj/flash/xml/XMLNode_as.cpp
libcore/asobj/gen-asclass.pl
libcore/asobj/int_as.cpp
libcore/swf_function.cpp
libcore/vm/ASHandlers.cpp
libcore/vm/Machine.cpp
testsuite/actionscript.all/MovieClip.as
testsuite/actionscript.all/Transform.as
libcore/asobj/flash/text/TextFormat_as.cpp
=== modified file 'libcore/Button.cpp'
--- a/libcore/Button.cpp 2009-11-13 14:02:21 +0000
+++ b/libcore/Button.cpp 2009-11-18 11:51:35 +0000
@@ -35,7 +35,6 @@
#include "fn_call.h"
#include "ExecutableCode.h"
#include "namedStrings.h"
-#include "Object.h" // for getObjectInterface
#include "StringPredicates.h"
#include "GnashKey.h"
#include "SoundInfoRecord.h"
=== modified file 'libcore/ClassHierarchy.cpp'
--- a/libcore/ClassHierarchy.cpp 2009-11-17 11:31:45 +0000
+++ b/libcore/ClassHierarchy.cpp 2009-11-18 11:51:35 +0000
@@ -25,7 +25,6 @@
#include "builtin_function.h"
#include "Class.h"
#include "Global_as.h"
-#include "Object.h"
#include "extension.h"
namespace gnash {
@@ -108,16 +107,9 @@
if (mExtension->initModuleWithFunc(mDeclaration.file_name,
mDeclaration.init_name, *mTarget))
{
- Global_as& gl = getGlobal(fn);
// Successfully loaded it, now find it, set its proto, and return.
as_value us;
mTarget->get_member(mDeclaration.name, &us);
- if (mDeclaration.super_name &&
- !us.to_object(gl)->hasOwnProperty(NSV::PROP_uuPROTOuu))
- {
- us.to_object(gl)->set_prototype(
- super.to_function()->getPrototype());
- }
return us;
}
// Error here -- not successful in loading.
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp 2009-11-16 12:34:46 +0000
+++ b/libcore/MovieClip.cpp 2009-11-18 11:51:35 +0000
@@ -48,7 +48,6 @@
#include "StreamProvider.h"
#include "LoadVariablesThread.h"
#include "ExecutableCode.h" // for inheritance of ConstructEvent
-#include "Object.h" // for getObjectInterface
#include "DynamicShape.h" // for composition
#include "namedStrings.h"
#include "styles.h" // for cap_style_e and join_style_e enums
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp 2009-11-16 12:34:46 +0000
+++ b/libcore/TextField.cpp 2009-11-18 11:51:35 +0000
@@ -45,11 +45,10 @@
#include "NativeFunction.h"
#include "Font.h"
#include "fontlib.h"
-#include "Object.h" // for getObjectInterface
#include "namedStrings.h"
#include "AsBroadcaster.h" // for initializing self as a broadcaster
#include "StringPredicates.h"
-#include "TextFormat_as.h"
+#include "flash/text/TextFormat_as.h"
#include "GnashKey.h" // key::code
#include "TextRecord.h"
#include "Global_as.h"
@@ -135,7 +134,7 @@
if (!ctor) return 0;
fn_call::Args args;
as_environment env(getVM(gl));
- return ctor->constructInstance(env, args).get();
+ return ctor->constructInstance(env, args);
}
@@ -3290,7 +3289,7 @@
if (!ctor) return as_value();
fn_call::Args args;
- as_object* textformat = ctor->constructInstance(fn.env(), args).get();
+ as_object* textformat = ctor->constructInstance(fn.env(), args);
TextFormat_as* tf;
if (!isNativeType(textformat, tf)) {
=== modified file 'libcore/Video.cpp'
--- a/libcore/Video.cpp 2009-11-04 18:25:13 +0000
+++ b/libcore/Video.cpp 2009-11-18 11:51:35 +0000
@@ -28,7 +28,6 @@
#include "NativeFunction.h"
#include "movie_root.h"
#include "VM.h"
-#include "Object.h"
#include "MediaHandler.h" // for setting up embedded video decoder
#include "VideoDecoder.h" // for setting up embedded video decoder
#include "namedStrings.h"
=== modified file 'libcore/as_function.cpp'
--- a/libcore/as_function.cpp 2009-10-23 06:33:22 +0000
+++ b/libcore/as_function.cpp 2009-11-18 12:00:44 +0000
@@ -27,9 +27,9 @@
#include "fn_call.h"
#include "GnashException.h"
#include "VM.h"
-#include "Object.h" // for getObjectInterface
#include "namedStrings.h"
#include "NativeFunction.h"
+#include "Object.h"
#include <iostream>
@@ -81,8 +81,8 @@
void
as_function::extends(as_function& superclass)
{
- as_object* newproto = new as_object(superclass.getPrototype().get());
- newproto->init_member(NSV::PROP_uuPROTOuu,
superclass.getPrototype().get());
+ as_object* newproto = new as_object();
+ newproto->set_prototype(superclass.getPrototype().get());
if (getSWFVersion(superclass) > 5) {
const int flags = PropFlags::dontEnum;
@@ -122,7 +122,7 @@
return func;
}
-boost::intrusive_ptr<as_object>
+as_object*
as_function::constructInstance(const as_environment& env, fn_call::Args& args)
{
=== modified file 'libcore/as_function.h'
--- a/libcore/as_function.h 2009-10-15 14:40:38 +0000
+++ b/libcore/as_function.h 2009-11-18 09:33:28 +0000
@@ -86,7 +86,7 @@
/// @param args
/// Arguments for the constructor invocation
///
- boost::intrusive_ptr<as_object> constructInstance(const as_environment&
env,
+ as_object* constructInstance(const as_environment& env,
fn_call::Args& args);
/// Get this function's "prototype" member (exported interface).
=== modified file 'libcore/as_object.cpp'
--- a/libcore/as_object.cpp 2009-11-16 14:42:56 +0000
+++ b/libcore/as_object.cpp 2009-11-18 13:09:52 +0000
@@ -32,7 +32,6 @@
#include "VM.h"
#include "GnashException.h"
#include "fn_call.h"
-#include "Object.h"
#include "Array_as.h"
#include "as_function.h"
#include "Global_as.h"
@@ -285,28 +284,6 @@
{
}
-as_object::as_object(as_object* proto)
- :
- _displayObject(0),
- _array(false),
- _relay(0),
- _vm(VM::get()),
- _members(_vm)
-{
- init_member(NSV::PROP_uuPROTOuu, as_value(proto));
-}
-
-as_object::as_object(boost::intrusive_ptr<as_object> proto)
- :
- _displayObject(0),
- _array(false),
- _relay(0),
- _vm(VM::get()),
- _members(_vm)
-{
- init_member(NSV::PROP_uuPROTOuu, as_value(proto));
-}
-
std::pair<bool,bool>
as_object::delProperty(string_table::key name, string_table::key nsname)
{
=== modified file 'libcore/as_object.h'
--- a/libcore/as_object.h 2009-11-16 14:42:56 +0000
+++ b/libcore/as_object.h 2009-11-18 13:09:52 +0000
@@ -184,14 +184,6 @@
/// Construct an ActionScript object with no prototype associated.
as_object();
- /// \brief
- /// Construct an ActionScript object based on the given prototype.
- /// Adds a reference to the prototype, if any.
- explicit as_object(as_object* proto);
-
- /// Construct an ActionScript object based on the given prototype.
- explicit as_object(boost::intrusive_ptr<as_object> proto);
-
/// The most common flags for built-in properties.
//
/// Most API properties, including classes and objects, have these flags.
=== modified file 'libcore/as_value.cpp'
--- a/libcore/as_value.cpp 2009-11-16 12:34:46 +0000
+++ b/libcore/as_value.cpp 2009-11-18 11:51:35 +0000
@@ -31,7 +31,6 @@
#include "namedStrings.h"
#include "element.h"
#include "GnashException.h"
-#include "Object.h"
#include "amf.h"
#include "Array_as.h"
#include "Date_as.h" // for Date type (readAMF0)
@@ -1755,7 +1754,7 @@
#ifdef GNASH_DEBUG_AMF_DESERIALIZE
log_debug("as_value(Element&) : AMF type OBJECT");
#endif
- as_object* obj = new as_object(getObjectInterface());
+ as_object* obj = gl.createObject();
if (el.propertySize()) {
for (size_t i=0; i < el.propertySize(); i++) {
const boost::shared_ptr<amf::Element> prop =
el.getProperty(i);
@@ -2093,47 +2092,47 @@
case amf::Element::OBJECT_AMF0:
{
- string_table& st = vm.getStringTable();
-
- as_object* obj = new
as_object(getObjectInterface()); // GC-managed
-
- // set the value immediately, so if there's any problem parsing
- // (like premature end of buffer) we still get something.
- ret.set_as_object(obj);
+ string_table& st = vm.getStringTable();
+
+ as_object* obj = gl.createObject();
+
+ // set the value immediately, so if there's any problem parsing
+ // (like premature end of buffer) we still get something.
+ ret.set_as_object(obj);
#ifdef GNASH_DEBUG_AMF_DESERIALIZE
- log_debug("amf0 starting read of OBJECT");
+ log_debug("amf0 starting read of OBJECT");
#endif
- objRefs.push_back(obj);
-
- as_value tmp;
- std::string keyString;
- for(;;)
- {
- if ( ! amf0_read_value(b, end, tmp,
- amf::Element::STRING_AMF0, objRefs, vm) )
- {
- return false;
- }
- keyString = tmp.to_string();
-
- if ( keyString.empty() )
- {
- if (b < end) {
- b += 1; // AMF0 has a
redundant "object end" byte
- } else {
- log_error("AMF buffer
terminated just before "
- "object end byte. continuing anyway.");
- }
- return true;
- }
-
- if ( ! amf0_read_value(b, end, tmp, -1,
objRefs, vm) )
- {
- return false;
- }
- obj->set_member(st.find(keyString),
tmp);
- }
+ objRefs.push_back(obj);
+
+ as_value tmp;
+ std::string keyString;
+ for(;;)
+ {
+ if ( ! amf0_read_value(b, end, tmp,
+ amf::Element::STRING_AMF0, objRefs, vm) )
+ {
+ return false;
+ }
+ keyString = tmp.to_string();
+
+ if ( keyString.empty() )
+ {
+ if (b < end) {
+ b += 1; // AMF0 has a redundant "object end" byte
+ } else {
+ log_error("AMF buffer terminated just before "
+ "object end byte. continuing anyway.");
+ }
+ return true;
+ }
+
+ if ( ! amf0_read_value(b, end, tmp, -1, objRefs, vm) )
+ {
+ return false;
+ }
+ obj->set_member(st.find(keyString), tmp);
+ }
}
case amf::Element::UNDEFINED_AMF0:
=== modified file 'libcore/asobj/Array_as.cpp'
--- a/libcore/asobj/Array_as.cpp 2009-11-16 12:34:46 +0000
+++ b/libcore/asobj/Array_as.cpp 2009-11-18 11:51:35 +0000
@@ -32,7 +32,6 @@
#include "Global_as.h"
#include "GnashException.h"
#include "VM.h"
-#include "Object.h"
#include "GnashNumeric.h"
#include <string>
=== modified file 'libcore/asobj/AsBroadcaster.cpp'
--- a/libcore/asobj/AsBroadcaster.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/AsBroadcaster.cpp 2009-11-18 11:51:35 +0000
@@ -28,7 +28,6 @@
#include "builtin_function.h"
#include "NativeFunction.h"
#include "VM.h" // for getPlayerVersion()
-#include "Object.h" // for getObjectInterface
#include "Global_as.h"
#include "namedStrings.h"
=== modified file 'libcore/asobj/Boolean_as.cpp'
--- a/libcore/asobj/Boolean_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/Boolean_as.cpp 2009-11-18 11:51:35 +0000
@@ -30,7 +30,6 @@
#include "NativeFunction.h"
#include "GnashException.h"
#include "VM.h"
-#include "Object.h" // for getObjectInterface
namespace gnash {
=== modified file 'libcore/asobj/Color_as.cpp'
--- a/libcore/asobj/Color_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/Color_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
#include "cxform.h" // for composition
#include "VM.h"
#include "MovieClip.h"
=== modified file 'libcore/asobj/CustomActions.cpp'
--- a/libcore/asobj/CustomActions.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/CustomActions.cpp 2009-11-18 11:51:35 +0000
@@ -27,7 +27,6 @@
#include "fn_call.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h" // for getObjectInterface
#include "Global_as.h"
namespace gnash {
=== modified file 'libcore/asobj/Date_as.cpp'
--- a/libcore/asobj/Date_as.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/Date_as.cpp 2009-11-18 11:51:35 +0000
@@ -75,7 +75,6 @@
#include "GnashException.h"
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
#include "ClockTime.h"
#include "VM.h"
=== modified file 'libcore/asobj/Error_as.cpp'
--- a/libcore/asobj/Error_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/Error_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/Global_as.h'
--- a/libcore/asobj/Global_as.h 2009-11-16 12:18:30 +0000
+++ b/libcore/asobj/Global_as.h 2009-11-18 11:51:35 +0000
@@ -20,7 +20,6 @@
#define GNASH_GLOBAL_H
#include "as_object.h" // for inheritance
-#include "Object.h"
#include "fn_call.h"
#include "GnashException.h"
#include "as_function.h"
=== modified file 'libcore/asobj/Globals.cpp'
--- a/libcore/asobj/Globals.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/Globals.cpp 2009-11-18 12:01:08 +0000
@@ -38,7 +38,6 @@
#include "String_as.h"
#include "Selection_as.h"
#include "Number_as.h"
-#include "Object.h"
#include "Math_as.h"
#include "flash/accessibility/Accessibility_as.h"
#include "flash/ui/ContextMenu_as.h"
@@ -79,13 +78,13 @@
#include "flash/text/TextDisplayMode_as.h"
#include "flash/text/TextFieldType_as.h"
#include "flash/text/TextFormatAlign_as.h"
+#include "flash/text/TextFormat_as.h"
#include "flash/text/TextLineMetrics_as.h"
#include "flash/text/TextRenderer_as.h"
#include "flash/xml/XMLDocument_as.h"
#include "flash/xml/XMLNode_as.h"
#include "MovieClipLoader.h"
#include "movie_definition.h"
-#include "TextFormat_as.h"
#include "Video.h"
#include "extension.h"
#include "VM.h"
@@ -105,6 +104,7 @@
#include "LoadVars_as.h"
#include "Namespace_as.h"
#include "QName_as.h"
+#include "Object.h"
#include <limits>
#include <sstream>
@@ -200,7 +200,9 @@
as_object*
AVM1Global::createObject()
{
- return new as_object(getObjectInterface());
+ as_object* obj = new as_object(*this);
+ obj->set_prototype(getObjectInterface());
+ return obj;
}
builtin_function*
@@ -284,7 +286,9 @@
as_object*
AVM2Global::createObject()
{
- return new as_object(getObjectInterface());
+ as_object* obj = new as_object(*this);
+ obj->set_prototype(getObjectInterface());
+ return obj;
}
builtin_function*
@@ -1259,7 +1263,7 @@
as_function* ctor = gl.getMember(NSV::CLASS_ERROR).to_function();
if (ctor) {
fn_call::Args args;
- as_object* proto = ctor->constructInstance(fn.env(), args).get();
+ as_object* proto = ctor->constructInstance(fn.env(), args);
// Not really sure what the point of this is.
gl.createClass(local_errorConstructor, proto);
@@ -1479,7 +1483,7 @@
args += arg;
as_environment env(getVM(gl));
- as_object* ret = ctor->constructInstance(env, args).get();
+ as_object* ret = ctor->constructInstance(env, args);
return ret;
@@ -1491,7 +1495,7 @@
VM& vm = getVM(global);
- // ASNew was dropped as a builtin function but exists
+ // ASNew was dropped as an API function but exists
// as ASnative.
vm.registerNative(global_assetpropflags, 1, 0);
vm.registerNative(global_asnew, 2, 0);
=== modified file 'libcore/asobj/LoadVars_as.cpp'
--- a/libcore/asobj/LoadVars_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/LoadVars_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "as_function.h" // for calling event handlers
#include "as_value.h" // for setting up a fn_call
#include "VM.h"
-#include "Object.h" // for getObjectInterface
#include "namedStrings.h"
#include "PropertyList.h"
#include "Global_as.h"
=== modified file 'libcore/asobj/Makefile.am'
--- a/libcore/asobj/Makefile.am 2009-11-17 09:36:06 +0000
+++ b/libcore/asobj/Makefile.am 2009-11-18 10:58:04 +0000
@@ -74,7 +74,6 @@
PlayHead.cpp \
Selection_as.cpp \
Namespace_as.cpp \
- TextFormat_as.cpp \
TextSnapshot_as.cpp \
MovieClipLoader.cpp\
String_as.cpp \
@@ -101,7 +100,6 @@
Number_as.h \
PlayHead.h \
Selection_as.h \
- TextFormat_as.h \
TextSnapshot_as.h \
String_as.h \
LoadableObject.h \
=== modified file 'libcore/asobj/Math_as.cpp'
--- a/libcore/asobj/Math_as.cpp 2009-08-18 11:13:25 +0000
+++ b/libcore/asobj/Math_as.cpp 2009-11-18 11:51:35 +0000
@@ -28,7 +28,6 @@
#include "log.h"
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
#include "GnashNumeric.h"
#include <cmath>
=== modified file 'libcore/asobj/MovieClipLoader.cpp'
--- a/libcore/asobj/MovieClipLoader.cpp 2009-11-15 15:46:12 +0000
+++ b/libcore/asobj/MovieClipLoader.cpp 2009-11-18 11:51:35 +0000
@@ -35,7 +35,6 @@
#include "VM.h" // for the string table.
#include "string_table.h" // for the string table.
#include "builtin_function.h"
-#include "Object.h" // for getObjectInterface
#include "AsBroadcaster.h" // for initializing self as a broadcaster
#include "namedStrings.h"
#include "ExecutableCode.h"
=== modified file 'libcore/asobj/Namespace_as.cpp'
--- a/libcore/asobj/Namespace_as.cpp 2009-10-07 06:18:09 +0000
+++ b/libcore/asobj/Namespace_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
#include "GnashException.h"
-#include "Object.h"
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/Number_as.cpp'
--- a/libcore/asobj/Number_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/Number_as.cpp 2009-11-18 11:51:35 +0000
@@ -28,7 +28,6 @@
#include "builtin_function.h"
#include "NativeFunction.h"
#include "VM.h"
-#include "Object.h" // for getObjectInterface
#include <sstream>
#include <cmath>
=== modified file 'libcore/asobj/Object.cpp'
--- a/libcore/asobj/Object.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/Object.cpp 2009-11-18 11:43:03 +0000
@@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h"
#include "Movie.h"
#include "DisplayObject.h"
#include "smart_ptr.h"
@@ -30,6 +29,7 @@
#include "VM.h"
#include "namedStrings.h" // for NSV::PROP_TO_STRING
#include "Global_as.h"
+#include "Object.h"
#include "log.h"
@@ -58,12 +58,6 @@
}
-as_object*
-init_object_instance()
-{
- return new as_object(getObjectInterface());
-}
-
void
registerObjectNative(as_object& global)
{
=== modified file 'libcore/asobj/Object.h'
--- a/libcore/asobj/Object.h 2009-07-30 11:33:29 +0000
+++ b/libcore/asobj/Object.h 2009-11-18 11:34:54 +0000
@@ -28,9 +28,6 @@
/// Initialize the global Object class
void object_class_init(as_object& global, const ObjectURI& uri);
-/// Return an Object instance
-as_object* init_object_instance();
-
as_object* getObjectInterface();
void registerObjectNative(as_object& global);
=== modified file 'libcore/asobj/QName_as.cpp'
--- a/libcore/asobj/QName_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/QName_as.cpp 2009-11-18 13:04:36 +0000
@@ -28,7 +28,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
#include "VM.h"
#include <sstream>
@@ -39,25 +38,10 @@
as_value qname_ctor(const fn_call& fn);
as_value qname_uri(const fn_call& fn);
as_value qname_localName(const fn_call& fn);
-
- as_object* getQNameInterface();
void attachQNameInterface(as_object& o);
}
-class QName_as : public as_object
-{
-
-public:
-
- QName_as()
- :
- as_object(getQNameInterface())
- {}
-
-};
-
-
// extern
void
qname_class_init(as_object& where, const ObjectURI& uri)
=== modified file 'libcore/asobj/Selection_as.cpp'
--- a/libcore/asobj/Selection_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/Selection_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
#include "AsBroadcaster.h"
#include "TextField.h"
=== modified file 'libcore/asobj/String_as.cpp'
--- a/libcore/asobj/String_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/String_as.cpp 2009-11-18 11:51:35 +0000
@@ -32,7 +32,6 @@
#include "GnashException.h"
#include "movie_definition.h"
#include "VM.h"
-#include "Object.h" // for getObjectInterface
#include "namedStrings.h"
#include "utf8.h"
#include "String_as.h"
=== modified file 'libcore/asobj/flash.am'
--- a/libcore/asobj/flash.am 2009-08-27 10:35:23 +0000
+++ b/libcore/asobj/flash.am 2009-11-18 10:58:04 +0000
@@ -42,7 +42,6 @@
asobj/Selection_as.cpp \
asobj/QName_as.cpp \
asobj/Namespace_as.cpp \
- asobj/TextFormat_as.cpp \
asobj/MovieClipLoader.cpp\
asobj/String_as.cpp \
asobj/LoadableObject.cpp \
@@ -64,7 +63,6 @@
asobj/Number_as.h \
asobj/PlayHead.h \
asobj/Selection_as.h \
- asobj/TextFormat_as.h \
asobj/String_as.h \
asobj/LoadableObject.h \
asobj/QName_as.h \
=== modified file 'libcore/asobj/flash/accessibility/Accessibility_as.cpp'
--- a/libcore/asobj/flash/accessibility/Accessibility_as.cpp 2009-10-23
06:25:25 +0000
+++ b/libcore/asobj/flash/accessibility/Accessibility_as.cpp 2009-11-18
11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h" // for AS inheritance
namespace gnash {
=== modified file 'libcore/asobj/flash/desktop/ClipboardFormats_as.cpp'
--- a/libcore/asobj/flash/desktop/ClipboardFormats_as.cpp 2009-08-18
11:07:45 +0000
+++ b/libcore/asobj/flash/desktop/ClipboardFormats_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
namespace gnash {
=== modified file 'libcore/asobj/flash/desktop/ClipboardTransferMode_as.cpp'
--- a/libcore/asobj/flash/desktop/ClipboardTransferMode_as.cpp 2009-08-18
11:07:45 +0000
+++ b/libcore/asobj/flash/desktop/ClipboardTransferMode_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
// Added to the Flash Player 10 API from AIR.
=== modified file 'libcore/asobj/flash/desktop/Clipboard_as.cpp'
--- a/libcore/asobj/flash/desktop/Clipboard_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/desktop/Clipboard_as.cpp 2009-11-18 11:51:35
+0000
@@ -28,7 +28,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h"
namespace gnash {
@@ -45,7 +44,7 @@
void clipboard_class_init(as_object& where, const ObjectURI& uri)
{
Global_as& gl = getGlobal(where);
- as_object* proto = getObjectInterface();
+ as_object* proto = gl.createObject();
as_object* cl = gl.createClass(&clipboard_ctor, proto);
=== modified file 'libcore/asobj/flash/display/AVM1Movie_as.cpp'
--- a/libcore/asobj/flash/display/AVM1Movie_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/display/AVM1Movie_as.cpp 2009-11-18 12:07:32
+0000
@@ -40,17 +40,6 @@
}
-class AVM1Movie_as : public as_object
-{
-
-public:
-
- AVM1Movie_as()
- :
- as_object(getAVM1MovieInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
avm1movie_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +61,10 @@
}
-as_object*
-getAVM1MovieInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachAVM1MovieInterface(*o);
- }
- return o.get();
-}
-
as_value
avm1movie_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new AVM1Movie_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/ActionScriptVersion_as.cpp'
--- a/libcore/asobj/flash/display/ActionScriptVersion_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/display/ActionScriptVersion_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.ActionScriptVersion class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/BitmapDataChannel_as.cpp'
--- a/libcore/asobj/flash/display/BitmapDataChannel_as.cpp 2009-08-18
11:07:45 +0000
+++ b/libcore/asobj/flash/display/BitmapDataChannel_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.BitmapDataChannel class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/BitmapData_as.cpp'
--- a/libcore/asobj/flash/display/BitmapData_as.cpp 2009-11-16 11:16:48
+0000
+++ b/libcore/asobj/flash/display/BitmapData_as.cpp 2009-11-18 11:51:35
+0000
@@ -33,7 +33,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h" // for addStatics
#include <vector>
=== modified file 'libcore/asobj/flash/display/Bitmap_as.cpp'
--- a/libcore/asobj/flash/display/Bitmap_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/display/Bitmap_as.cpp 2009-11-18 12:07:32 +0000
@@ -36,21 +36,8 @@
as_value bitmap_ctor(const fn_call& fn);
void attachBitmapInterface(as_object& o);
void attachBitmapStaticInterface(as_object& o);
- as_object* getBitmapInterface();
-
}
-class Bitmap_as : public as_object
-{
-
-public:
-
- Bitmap_as()
- :
- as_object(getBitmapInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
bitmap_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getBitmapInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachBitmapInterface(*o);
- }
- return o.get();
-}
-
as_value
bitmap_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Bitmap_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/BlendMode_as.cpp'
--- a/libcore/asobj/flash/display/BlendMode_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/display/BlendMode_as.cpp 2009-11-18 12:07:32
+0000
@@ -40,23 +40,11 @@
}
-class BlendMode_as : public as_object
-{
-
-public:
-
- BlendMode_as()
- :
- as_object(getBlendModeInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
blendmode_class_init(as_object& where, const ObjectURI& uri)
{
- registerBuiltinClass(where, blendmode_ctor, attachBlendModeInterface,
- attachBlendModeStaticInterface, uri);
+ registerBuiltinObject(where, attachBlendModeInterface, uri);
}
namespace {
@@ -66,31 +54,6 @@
{
}
-void
-attachBlendModeStaticInterface(as_object& /*o*/)
-{
-
-}
-
-as_object*
-getBlendModeInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachBlendModeInterface(*o);
- }
- return o.get();
-}
-
-as_value
-blendmode_ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new BlendMode_as;
-
- return as_value(obj.get()); // will keep alive
-}
-
} // anonymous namespace
} // gnash namespace
=== modified file 'libcore/asobj/flash/display/CapsStyle_as.cpp'
--- a/libcore/asobj/flash/display/CapsStyle_as.cpp 2009-08-18 11:07:45
+0000
+++ b/libcore/asobj/flash/display/CapsStyle_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.CapsStyle class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/DisplayObject_as.cpp'
--- a/libcore/asobj/flash/display/DisplayObject_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/display/DisplayObject_as.cpp 2009-11-18 13:05:53
+0000
@@ -1,4 +1,4 @@
-// DisplayObject_as.cpp: ActionScript "DisplayObject" class, for Gnash.
+// as_object.cpp: ActionScript "DisplayObject" class, for Gnash.
//
// Copyright (C) 2009 Free Software Foundation, Inc.
//
@@ -47,35 +47,20 @@
as_value displayobject_ctor(const fn_call& fn);
void attachDisplayObjectInterface(as_object& o);
void attachDisplayObjectStaticInterface(as_object& o);
- as_object* getDisplayObjectInterface();
-
}
-class DisplayObject_as : public as_object
-{
-
-public:
-
- DisplayObject_as()
- :
- as_object(getDisplayObjectInterface())
- {}
-};
-
// extern (used by Global.cpp)
-void displayobject_class_init(as_object& where, const ObjectURI& uri)
+void
+displayobject_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getDisplayObjectInterface();
- cl = gl.createClass(&displayobject_ctor, proto);
- attachDisplayObjectStaticInterface(*cl);
- }
+ Global_as& gl = getGlobal(where);
+ as_object* proto = gl.createObject();
+ attachDisplayObjectInterface(*proto);
+ as_object* cl = gl.createClass(&displayobject_ctor, proto);
+ attachDisplayObjectStaticInterface(*cl);
// Register _global.DisplayObject
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
@@ -104,21 +89,10 @@
{
}
-as_object*
-getDisplayObjectInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachDisplayObjectInterface(*o);
- }
- return o.get();
-}
-
as_value
displayobject_getRect(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -127,7 +101,7 @@
as_value
displayobject_globalToLocal(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -136,7 +110,7 @@
as_value
displayobject_hitTestObject(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -145,7 +119,7 @@
as_value
displayobject_hitTestPoint(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -154,7 +128,7 @@
as_value
displayobject_localToGlobal(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -163,7 +137,7 @@
as_value
displayobject_added(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -172,7 +146,7 @@
as_value
displayobject_addedToStage(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -181,7 +155,7 @@
as_value
displayobject_enterFrame(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -190,7 +164,7 @@
as_value
displayobject_removed(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -199,7 +173,7 @@
as_value
displayobject_removedFromStage(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -208,7 +182,7 @@
as_value
displayobject_render(const fn_call& fn)
{
- DisplayObject_as* ptr = ensure<ThisIs<DisplayObject_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -217,9 +191,7 @@
as_value
displayobject_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new DisplayObject_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/FrameLabel_as.cpp'
--- a/libcore/asobj/flash/display/FrameLabel_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/display/FrameLabel_as.cpp 2009-11-18 12:32:41
+0000
@@ -36,21 +36,8 @@
as_value framelabel_ctor(const fn_call& fn);
void attachFrameLabelInterface(as_object& o);
void attachFrameLabelStaticInterface(as_object& o);
- as_object* getFrameLabelInterface();
-
}
-class FrameLabel_as : public as_object
-{
-
-public:
-
- FrameLabel_as()
- :
- as_object(getFrameLabelInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
framelabel_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getFrameLabelInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachFrameLabelInterface(*o);
- }
- return o.get();
-}
-
as_value
framelabel_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new FrameLabel_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/GradientType_as.cpp'
--- a/libcore/asobj/flash/display/GradientType_as.cpp 2009-08-18 11:02:07
+0000
+++ b/libcore/asobj/flash/display/GradientType_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.GradientType class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/Graphics_as.cpp'
--- a/libcore/asobj/flash/display/Graphics_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/display/Graphics_as.cpp 2009-11-18 12:32:41
+0000
@@ -1,4 +1,4 @@
-// Graphics_as.cpp: ActionScript "Graphics" class, for Gnash.
+// as_object.cpp: ActionScript "Graphics" class, for Gnash.
//
// Copyright (C) 2009 Free Software Foundation, Inc.
//
@@ -49,35 +49,20 @@
as_value graphics_ctor(const fn_call& fn);
void attachGraphicsInterface(as_object& o);
void attachGraphicsStaticInterface(as_object& o);
- as_object* getGraphicsInterface();
-
}
-class Graphics_as : public as_object
-{
-
-public:
-
- Graphics_as()
- :
- as_object(getGraphicsInterface())
- {}
-};
-
// extern (used by Global.cpp)
-void graphics_class_init(as_object& where, const ObjectURI& uri)
+void
+graphics_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getGraphicsInterface();
- cl = gl.createClass(&graphics_ctor, proto);
- attachGraphicsStaticInterface(*cl);
- }
+ Global_as& gl = getGlobal(where);
+ as_object* proto = gl.createObject();
+ as_object* cl = gl.createClass(&graphics_ctor, proto);
+ attachGraphicsInterface(*proto);
+ attachGraphicsStaticInterface(*cl);
// Register _global.Graphics
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
@@ -107,21 +92,10 @@
{
}
-as_object*
-getGraphicsInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachGraphicsInterface(*o);
- }
- return o.get();
-}
-
as_value
graphics_beginFill(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -130,7 +104,7 @@
as_value
graphics_beginGradientFill(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -139,7 +113,7 @@
as_value
graphics_clear(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -148,7 +122,7 @@
as_value
graphics_curveTo(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -157,7 +131,7 @@
as_value
graphics_drawCircle(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -166,7 +140,7 @@
as_value
graphics_drawEllipse(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -175,7 +149,7 @@
as_value
graphics_drawRect(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -184,7 +158,7 @@
as_value
graphics_drawRoundRect(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -193,7 +167,7 @@
as_value
graphics_endFill(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -202,7 +176,7 @@
as_value
graphics_lineGradientStyle(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -211,7 +185,7 @@
as_value
graphics_lineStyle(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -220,7 +194,7 @@
as_value
graphics_lineTo(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -229,7 +203,7 @@
as_value
graphics_moveTo(const fn_call& fn)
{
- Graphics_as* ptr = ensure<ThisIs<Graphics_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -238,9 +212,7 @@
as_value
graphics_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Graphics_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/IBitmapDrawable_as.cpp'
--- a/libcore/asobj/flash/display/IBitmapDrawable_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/display/IBitmapDrawable_as.cpp 2009-11-18
12:32:41 +0000
@@ -40,23 +40,13 @@
}
-class IBitmapDrawable_as : public as_object
-{
-
-public:
-
- IBitmapDrawable_as()
- :
- as_object(getIBitmapDrawableInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
ibitmapdrawable_class_init(as_object& where, const ObjectURI& uri)
{
- registerBuiltinClass(where, ibitmapdrawable_ctor,
attachIBitmapDrawableInterface,
- attachIBitmapDrawableStaticInterface, uri);
+ registerBuiltinClass(where, ibitmapdrawable_ctor,
+ attachIBitmapDrawableInterface,
+ attachIBitmapDrawableStaticInterface, uri);
}
namespace {
@@ -72,23 +62,10 @@
}
-as_object*
-getIBitmapDrawableInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachIBitmapDrawableInterface(*o);
- }
- return o.get();
-}
-
as_value
ibitmapdrawable_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new IBitmapDrawable_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/InteractiveObject_as.cpp'
--- a/libcore/asobj/flash/display/InteractiveObject_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/display/InteractiveObject_as.cpp 2009-11-18
12:32:41 +0000
@@ -40,23 +40,13 @@
}
-class InteractiveObject_as : public as_object
-{
-
-public:
-
- InteractiveObject_as()
- :
- as_object(getInteractiveObjectInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
interactiveobject_class_init(as_object& where, const ObjectURI& uri)
{
- registerBuiltinClass(where, interactiveobject_ctor,
attachInteractiveObjectInterface,
- attachInteractiveObjectStaticInterface, uri);
+ registerBuiltinClass(where, interactiveobject_ctor,
+ attachInteractiveObjectInterface,
+ attachInteractiveObjectStaticInterface, uri);
}
namespace {
@@ -72,23 +62,10 @@
}
-as_object*
-getInteractiveObjectInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachInteractiveObjectInterface(*o);
- }
- return o.get();
-}
-
as_value
interactiveobject_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new InteractiveObject_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/InterpolationMethod_as.cpp'
--- a/libcore/asobj/flash/display/InterpolationMethod_as.cpp 2009-08-18
11:02:07 +0000
+++ b/libcore/asobj/flash/display/InterpolationMethod_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.InterpolationMethod class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/JointStyle_as.cpp'
--- a/libcore/asobj/flash/display/JointStyle_as.cpp 2009-08-18 11:02:07
+0000
+++ b/libcore/asobj/flash/display/JointStyle_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.JointStyle class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/LineScaleMode_as.cpp'
--- a/libcore/asobj/flash/display/LineScaleMode_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/display/LineScaleMode_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.LineScaleMode class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/LoaderInfo_as.cpp'
--- a/libcore/asobj/flash/display/LoaderInfo_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/display/LoaderInfo_as.cpp 2009-11-18 12:32:41
+0000
@@ -47,31 +47,18 @@
}
-class LoaderInfo_as : public as_object
-{
-
-public:
-
- LoaderInfo_as()
- :
- as_object(getLoaderInfoInterface())
- {}
-};
-
// extern (used by Global.cpp)
-void loaderinfo_class_init(as_object& where, const ObjectURI& uri)
+void
+loaderinfo_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getLoaderInfoInterface();
- cl = gl.createClass(&loaderinfo_ctor, proto);
- attachLoaderInfoStaticInterface(*cl);
- }
+ Global_as& gl = getGlobal(where);
+ as_object* proto = gl.createObject();
+ as_object* cl = gl.createClass(&loaderinfo_ctor, proto);
+ attachLoaderInfoInterface(*proto);
+ attachLoaderInfoStaticInterface(*cl);
// Register _global.LoaderInfo
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
@@ -95,21 +82,10 @@
{
}
-as_object*
-getLoaderInfoInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachLoaderInfoInterface(*o);
- }
- return o.get();
-}
-
as_value
loaderinfo_complete(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -118,7 +94,7 @@
as_value
loaderinfo_httpStatus(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -127,7 +103,7 @@
as_value
loaderinfo_init(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -136,7 +112,7 @@
as_value
loaderinfo_ioError(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -145,7 +121,7 @@
as_value
loaderinfo_open(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -154,7 +130,7 @@
as_value
loaderinfo_progress(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -163,7 +139,7 @@
as_value
loaderinfo_unload(const fn_call& fn)
{
- LoaderInfo_as* ptr = ensure<ThisIs<LoaderInfo_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -172,9 +148,7 @@
as_value
loaderinfo_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new LoaderInfo_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value(); // will keep alive
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/Loader_as.cpp'
--- a/libcore/asobj/flash/display/Loader_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/display/Loader_as.cpp 2009-11-18 12:32:41 +0000
@@ -39,21 +39,8 @@
as_value loader_ctor(const fn_call& fn);
void attachLoaderInterface(as_object& o);
void attachLoaderStaticInterface(as_object& o);
- as_object* getLoaderInterface();
-
}
-class Loader_as : public as_object
-{
-
-public:
-
- Loader_as()
- :
- as_object(getLoaderInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
loader_class_init(as_object& where, const ObjectURI& uri)
@@ -79,21 +66,10 @@
}
-as_object*
-getLoaderInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachLoaderInterface(*o);
- }
- return o.get();
-}
-
as_value
loader_load(const fn_call& fn)
{
- Loader_as* ptr = ensure<ThisIs<Loader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -102,7 +78,7 @@
as_value
loader_loadBytes(const fn_call& fn)
{
- Loader_as* ptr = ensure<ThisIs<Loader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -111,7 +87,7 @@
as_value
loader_unload(const fn_call& fn)
{
- Loader_as* ptr = ensure<ThisIs<Loader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -120,9 +96,7 @@
as_value
loader_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Loader_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/MorphShape_as.cpp'
--- a/libcore/asobj/flash/display/MorphShape_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/display/MorphShape_as.cpp 2009-11-18 12:32:41
+0000
@@ -36,21 +36,8 @@
as_value morphshape_ctor(const fn_call& fn);
void attachMorphShapeInterface(as_object& o);
void attachMorphShapeStaticInterface(as_object& o);
- as_object* getMorphShapeInterface();
-
}
-class MorphShape_as : public as_object
-{
-
-public:
-
- MorphShape_as()
- :
- as_object(getMorphShapeInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
morphshape_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getMorphShapeInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachMorphShapeInterface(*o);
- }
- return o.get();
-}
-
as_value
morphshape_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new MorphShape_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/MovieClip_as.cpp'
--- a/libcore/asobj/flash/display/MovieClip_as.cpp 2009-11-16 11:16:48
+0000
+++ b/libcore/asobj/flash/display/MovieClip_as.cpp 2009-11-18 12:32:41
+0000
@@ -30,7 +30,6 @@
#include "movie_root.h"
#include "GnashNumeric.h"
#include "as_value.h"
-#include "Object.h"
#include "log.h"
#include "fn_call.h"
#include "Global_as.h"
@@ -127,7 +126,8 @@
as_object* proto = gl.createObject();
if (isAS3(getVM(where))) {
- as_object* cl = new as_object(proto);
+ as_object* cl = new as_object();
+ cl->set_prototype(proto);
attachMovieClipAS3Interface(*proto);
// TODO: fix AVM2Global::createClass to work for AVM2.
=== modified file 'libcore/asobj/flash/display/PixelSnapping_as.cpp'
--- a/libcore/asobj/flash/display/PixelSnapping_as.cpp 2009-08-18 11:07:45
+0000
+++ b/libcore/asobj/flash/display/PixelSnapping_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.PixelSnapping class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/SWFVersion_as.cpp'
--- a/libcore/asobj/flash/display/SWFVersion_as.cpp 2009-08-18 11:02:07
+0000
+++ b/libcore/asobj/flash/display/SWFVersion_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.SWFVersion class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/Scene_as.cpp'
--- a/libcore/asobj/flash/display/Scene_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/display/Scene_as.cpp 2009-11-18 12:32:41 +0000
@@ -40,17 +40,6 @@
}
-class Scene_as : public as_object
-{
-
-public:
-
- Scene_as()
- :
- as_object(getSceneInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
scene_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +61,10 @@
}
-as_object*
-getSceneInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSceneInterface(*o);
- }
- return o.get();
-}
-
as_value
scene_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Scene_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/Shape_as.cpp'
--- a/libcore/asobj/flash/display/Shape_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/display/Shape_as.cpp 2009-11-18 12:32:41 +0000
@@ -36,21 +36,8 @@
as_value shape_ctor(const fn_call& fn);
void attachShapeInterface(as_object& o);
void attachShapeStaticInterface(as_object& o);
- as_object* getShapeInterface();
-
}
-class Shape_as : public as_object
-{
-
-public:
-
- Shape_as()
- :
- as_object(getShapeInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
shape_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getShapeInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachShapeInterface(*o);
- }
- return o.get();
-}
-
as_value
shape_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Shape_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/SimpleButton_as.cpp'
--- a/libcore/asobj/flash/display/SimpleButton_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/display/SimpleButton_as.cpp 2009-11-18 12:32:41
+0000
@@ -40,17 +40,6 @@
}
-class SimpleButton_as : public as_object
-{
-
-public:
-
- SimpleButton_as()
- :
- as_object(getSimpleButtonInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
simplebutton_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +61,10 @@
}
-as_object*
-getSimpleButtonInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSimpleButtonInterface(*o);
- }
- return o.get();
-}
-
as_value
simplebutton_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SimpleButton_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/SpreadMethod_as.cpp'
--- a/libcore/asobj/flash/display/SpreadMethod_as.cpp 2009-08-18 11:07:45
+0000
+++ b/libcore/asobj/flash/display/SpreadMethod_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.display.SpreadMethod class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/display/Sprite_as.cpp'
--- a/libcore/asobj/flash/display/Sprite_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/display/Sprite_as.cpp 2009-11-18 12:32:41 +0000
@@ -37,22 +37,8 @@
as_value sprite_ctor(const fn_call& fn);
void attachSpriteInterface(as_object& o);
void attachSpriteStaticInterface(as_object& o);
- as_object* getSpriteInterface();
-
}
-class Sprite_as : public as_object
-{
-
-public:
-
- Sprite_as()
- :
- as_object(getSpriteInterface())
- {}
-};
-
-// extern (used by Global.cpp)
void
sprite_class_init(as_object& where, const ObjectURI& uri)
{
@@ -74,21 +60,10 @@
{
}
-as_object*
-getSpriteInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSpriteInterface(*o);
- }
- return o.get();
-}
-
as_value
sprite_stopDrag(const fn_call& fn)
{
- Sprite_as* ptr = ensure<ThisIs<Sprite_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -97,9 +72,7 @@
as_value
sprite_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Sprite_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/display/StageAlign_as.cpp'
--- a/libcore/asobj/flash/display/StageAlign_as.cpp 2009-08-18 11:02:07
+0000
+++ b/libcore/asobj/flash/display/StageAlign_as.cpp 2009-11-18 11:51:35
+0000
@@ -28,7 +28,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h"
/// StageAlign is an AVM2-only class
=== modified file 'libcore/asobj/flash/display/StageDisplayState_as.cpp'
--- a/libcore/asobj/flash/display/StageDisplayState_as.cpp 2009-08-18
10:55:56 +0000
+++ b/libcore/asobj/flash/display/StageDisplayState_as.cpp 2009-11-18
11:51:35 +0000
@@ -28,7 +28,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h"
namespace gnash {
=== modified file 'libcore/asobj/flash/display/StageQuality_as.cpp'
--- a/libcore/asobj/flash/display/StageQuality_as.cpp 2009-08-18 11:02:07
+0000
+++ b/libcore/asobj/flash/display/StageQuality_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
namespace gnash {
=== modified file 'libcore/asobj/flash/display/StageScaleMode_as.cpp'
--- a/libcore/asobj/flash/display/StageScaleMode_as.cpp 2009-08-18 11:02:07
+0000
+++ b/libcore/asobj/flash/display/StageScaleMode_as.cpp 2009-11-18 11:51:35
+0000
@@ -28,7 +28,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h"
namespace gnash {
=== modified file 'libcore/asobj/flash/display/Stage_as.cpp'
--- a/libcore/asobj/flash/display/Stage_as.cpp 2009-10-22 14:56:18 +0000
+++ b/libcore/asobj/flash/display/Stage_as.cpp 2009-11-18 11:51:35 +0000
@@ -31,7 +31,6 @@
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h" // for ActionException
#include "VM.h"
-#include "Object.h" // for getObjectInterface()
#include "AsBroadcaster.h" // for initializing self as a broadcaster
#include "namedStrings.h"
#include "StringPredicates.h"
=== modified file 'libcore/asobj/flash/display/display_pkg.cpp'
--- a/libcore/asobj/flash/display/display_pkg.cpp 2009-07-16 09:44:26
+0000
+++ b/libcore/asobj/flash/display/display_pkg.cpp 2009-11-18 11:41:56
+0000
@@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h" // for getObjectInterface
#include "as_object.h"
#include "string_table.h"
@@ -27,6 +26,7 @@
#include "display/BitmapData_as.h"
#include "namedStrings.h"
#include "display_pkg.h"
+#include "Global_as.h"
namespace gnash {
@@ -35,7 +35,9 @@
{
log_debug("Loading flash.display package");
- as_object *pkg = new as_object(getObjectInterface());
+ Global_as& gl = getGlobal(fn);
+
+ as_object* pkg = gl.createObject();
string_table& st = getStringTable(fn);
const string_table::key global = 0;
=== modified file 'libcore/asobj/flash/external/ExternalInterface_as.cpp'
--- a/libcore/asobj/flash/external/ExternalInterface_as.cpp 2009-10-23
06:25:25 +0000
+++ b/libcore/asobj/flash/external/ExternalInterface_as.cpp 2009-11-18
11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/flash/external/external_pkg.cpp'
--- a/libcore/asobj/flash/external/external_pkg.cpp 2009-08-20 10:11:01
+0000
+++ b/libcore/asobj/flash/external/external_pkg.cpp 2009-11-18 11:51:35
+0000
@@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h" // for getObjectInterface
#include "as_object.h"
#include "string_table.h"
#include "VM.h"
@@ -25,6 +24,7 @@
#include "ExternalInterface_as.h"
#include "namedStrings.h"
#include "external_pkg.h"
+#include "Global_as.h"
namespace gnash {
@@ -36,7 +36,9 @@
log_debug("Loading flash.external package");
- as_object *pkg = new as_object(getObjectInterface());
+ Global_as& gl = getGlobal(fn);
+
+ as_object* pkg = gl.createObject();
string_table& st = getStringTable(fn);
const string_table::key global = 0;
=== modified file 'libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp'
--- a/libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp 2009-08-18
11:07:45 +0000
+++ b/libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp 2009-11-18
11:51:35 +0000
@@ -25,7 +25,6 @@
#include "log.h"
#include "fn_call.h"
#include "Global_as.h"
-#include "Object.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
=== modified file 'libcore/asobj/flash/filters/BitmapFilterType_as.cpp'
--- a/libcore/asobj/flash/filters/BitmapFilterType_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/filters/BitmapFilterType_as.cpp 2009-11-18
11:51:35 +0000
@@ -25,7 +25,6 @@
#include "log.h"
#include "fn_call.h"
#include "Global_as.h"
-#include "Object.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
=== modified file 'libcore/asobj/flash/filters/BitmapFilter_as.cpp'
--- a/libcore/asobj/flash/filters/BitmapFilter_as.cpp 2009-11-16 11:16:48
+0000
+++ b/libcore/asobj/flash/filters/BitmapFilter_as.cpp 2009-11-18 11:51:35
+0000
@@ -21,7 +21,6 @@
#include "VM.h"
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h"
#include "Global_as.h"
namespace gnash {
@@ -86,7 +85,7 @@
if (constructor) {
fn_call::Args args;
VM& vm = getVM(where);
- proto = constructor->constructInstance(as_environment(vm), args).get();
+ proto = constructor->constructInstance(as_environment(vm), args);
}
else proto = 0;
=== modified file 'libcore/asobj/flash/filters/ConvolutionFilter_as.cpp'
--- a/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp 2009-10-22
14:56:18 +0000
+++ b/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp 2009-11-18
11:51:35 +0000
@@ -22,7 +22,6 @@
#include "Global_as.h"
#include "BitmapFilter_as.h"
#include "builtin_function.h"
-#include "Object.h"
namespace gnash {
=== modified file 'libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp'
--- a/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
2009-08-18 11:07:45 +0000
+++ b/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
2009-11-18 11:51:35 +0000
@@ -25,7 +25,6 @@
#include "log.h"
#include "fn_call.h"
#include "Global_as.h"
-#include "Object.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
=== modified file 'libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp'
--- a/libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp 2009-10-23
06:25:25 +0000
+++ b/libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp 2009-11-18
11:51:35 +0000
@@ -28,7 +28,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h" // for AS inheritance
#include "BitmapFilter_as.h"
#include <sstream>
=== modified file 'libcore/asobj/flash/filters/filters_pkg.cpp'
--- a/libcore/asobj/flash/filters/filters_pkg.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/filters/filters_pkg.cpp 2009-11-18 11:51:35
+0000
@@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h" // for getObjectInterface
#include "as_object.h"
#include "string_table.h"
#include "VM.h"
=== modified file 'libcore/asobj/flash/flash_pkg.cpp'
--- a/libcore/asobj/flash/flash_pkg.cpp 2009-07-16 10:07:08 +0000
+++ b/libcore/asobj/flash/flash_pkg.cpp 2009-11-18 11:40:43 +0000
@@ -21,7 +21,6 @@
#include "VM.h"
#include "fn_call.h"
#include "namedStrings.h"
-#include "Object.h" // for getObjectInterface
#include "flash_pkg.h"
#include "display/display_pkg.h"
#include "external/external_pkg.h"
@@ -29,6 +28,7 @@
#include "geom/geom_pkg.h"
#include "net/net_pkg.h"
#include "text/text_pkg.h"
+#include "Global_as.h"
namespace gnash {
@@ -38,7 +38,9 @@
static as_value
get_flash_package(const fn_call& fn)
{
- as_object *pkg = new as_object(getObjectInterface());
+ Global_as& gl = getGlobal(fn);
+
+ as_object* pkg = gl.createObject();
string_table& st = getStringTable(fn);
=== modified file 'libcore/asobj/flash/geom/ColorTransform_as.cpp'
--- a/libcore/asobj/flash/geom/ColorTransform_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/geom/ColorTransform_as.cpp 2009-11-18 11:51:35
+0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/flash/geom/Matrix_as.cpp'
--- a/libcore/asobj/flash/geom/Matrix_as.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/flash/geom/Matrix_as.cpp 2009-11-18 11:51:35 +0000
@@ -25,7 +25,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include <cmath>
@@ -164,7 +163,7 @@
return as_value();
}
- as_object* o = ctor->constructInstance(fn.env(), args).get();
+ as_object* o = ctor->constructInstance(fn.env(), args);
return as_value(o);
}
=== modified file 'libcore/asobj/flash/geom/Point_as.cpp'
--- a/libcore/asobj/flash/geom/Point_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/geom/Point_as.cpp 2009-11-18 11:51:35 +0000
@@ -25,7 +25,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include "GnashNumeric.h"
@@ -72,7 +71,7 @@
fn_call::Args args;
args += x, y;
- return ctor->constructInstance(fn.env(), args).get();
+ return ctor->constructInstance(fn.env(), args);
}
void
=== modified file 'libcore/asobj/flash/geom/Rectangle_as.cpp'
--- a/libcore/asobj/flash/geom/Rectangle_as.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/flash/geom/Rectangle_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include "as_value.h"
#include "namedStrings.h"
@@ -139,7 +138,7 @@
fn_call::Args args;
args += x, y, w, h;
- return ctor->constructInstance(fn.env(), args).get();
+ return ctor->constructInstance(fn.env(), args);
}
as_value
=== modified file 'libcore/asobj/flash/geom/Transform_as.cpp'
--- a/libcore/asobj/flash/geom/Transform_as.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/flash/geom/Transform_as.cpp 2009-11-18 11:51:35 +0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include "MovieClip.h" // For MovieClip
#include "ColorTransform_as.h"
@@ -78,8 +77,16 @@
_movieClip(movieClip)
{}
+ SWFMatrix getWorldMatrix() const {
+ return _movieClip.getWorldMatrix();
+ }
const SWFMatrix& getMatrix() const { return _movieClip.getMatrix(); }
const cxform& getColorTransform() const { return _movieClip.get_cxform(); }
+
+ cxform getWorldColorTransform() const {
+ return _movieClip.get_world_cxform();
+ }
+
void setMatrix(const SWFMatrix& mat) { _movieClip.setMatrix(mat); }
void setColorTransform(const cxform& cx) { _movieClip.set_cxform(cx); }
@@ -123,8 +130,7 @@
// If it's not found, construction will fail.
as_value colorTrans(fn.env().find_object("flash.geom.ColorTransform"));
- boost::intrusive_ptr<as_function> colorTransformCtor =
- colorTrans.to_function();
+ as_function* colorTransformCtor = colorTrans.to_function();
if (!colorTransformCtor) {
log_error("Failed to construct flash.geom.ColorTransform!");
@@ -138,10 +144,10 @@
args += c.ra / factor, c.ga / factor, c.ba / factor, c.aa / factor,
c.rb, c.gb, c.bb, c.ab;
- boost::intrusive_ptr<as_object> colorTransformObj =
+ as_object* colorTransformObj =
colorTransformCtor->constructInstance(fn.env(), args);
- return as_value(colorTransformObj.get());
+ return as_value(colorTransformObj);
}
// Setter
@@ -156,7 +162,7 @@
);
}
- boost::intrusive_ptr<as_object> obj = fn.arg(0).to_object(getGlobal(fn));
+ as_object* obj = fn.arg(0).to_object(getGlobal(fn));
if (!obj)
{
IF_VERBOSE_ASCODING_ERRORS(
@@ -172,7 +178,7 @@
// or whether it can be any object.
ColorTransform_as* transform;
- if (!isNativeType(obj.get(), transform)) {
+ if (!isNativeType(obj, transform)) {
IF_VERBOSE_ASCODING_ERRORS(
std::ostringstream ss;
@@ -201,18 +207,74 @@
as_value
transform_concatenatedColorTransform(const fn_call& fn)
{
+ const double factor = 256.0;
+
Transform_as* relay = ensure<ThisIsNative<Transform_as> >(fn);
- UNUSED(relay);
- LOG_ONCE(log_unimpl (__FUNCTION__));
+
+ if (!fn.nargs) {
+
+ // If it's not found, construction will fail.
+ as_value colorTrans(fn.env().find_object("flash.geom.ColorTransform"));
+
+ as_function* colorTransformCtor = colorTrans.to_function();
+
+ if (!colorTransformCtor) {
+ log_error("Failed to construct flash.geom.ColorTransform!");
+ return as_value();
+ }
+
+ // Construct a ColorTransform from the sprite cxform.
+ const cxform& c = relay->getWorldColorTransform();
+
+ fn_call::Args args;
+ args += c.ra / factor, c.ga / factor, c.ba / factor, c.aa / factor,
+ c.rb, c.gb, c.bb, c.ab;
+
+ as_object* colorTransformObj =
+ colorTransformCtor->constructInstance(fn.env(), args);
+
+ return as_value(colorTransformObj);
+ }
+
return as_value();
}
as_value
transform_concatenatedMatrix(const fn_call& fn)
{
+
+ const double factor = 65536.0;
+
Transform_as* relay = ensure<ThisIsNative<Transform_as> >(fn);
- UNUSED(relay);
- LOG_ONCE( log_unimpl (__FUNCTION__) );
+
+ if (!fn.nargs)
+ {
+
+ // If it's not found, construction will fail.
+ as_value matrix(fn.env().find_object("flash.geom.Matrix"));
+
+ as_function* matrixCtor = matrix.to_function();
+
+ if (!matrixCtor) {
+ log_error("Failed to construct flash.geom.Matrix!");
+ return as_value();
+ }
+
+ const SWFMatrix& m = relay->getWorldMatrix();
+
+ fn_call::Args args;
+ args += m.sx / factor,
+ m.shx / factor,
+ m.shy / factor,
+ m.sy / factor,
+ twipsToPixels(m.tx),
+ twipsToPixels(m.ty);
+
+ as_object* matrixObj = matrixCtor->constructInstance(fn.env(), args);
+
+ return as_value(matrixObj);
+ }
+
return as_value();
}
@@ -235,7 +297,7 @@
// If it's not found, construction will fail.
as_value matrix(fn.env().find_object("flash.geom.Matrix"));
- boost::intrusive_ptr<as_function> matrixCtor = matrix.to_function();
+ as_function* matrixCtor = matrix.to_function();
if (!matrixCtor) {
log_error("Failed to construct flash.geom.Matrix!");
@@ -252,10 +314,9 @@
twipsToPixels(m.tx),
twipsToPixels(m.ty);
- boost::intrusive_ptr<as_object> matrixObj =
- matrixCtor->constructInstance(fn.env(), args);
+ as_object* matrixObj = matrixCtor->constructInstance(fn.env(), args);
- return as_value(matrixObj.get());
+ return as_value(matrixObj);
}
// Setter
@@ -271,7 +332,7 @@
}
- boost::intrusive_ptr<as_object> obj = fn.arg(0).to_object(getGlobal(fn));
+ as_object* obj = fn.arg(0).to_object(getGlobal(fn));
if (!obj)
{
IF_VERBOSE_ASCODING_ERRORS(
@@ -370,12 +431,11 @@
o.init_property("matrix", transform_matrix, transform_matrix,
protectedFlags);
- o.init_property("concatenatedMatrix", transform_concatenatedMatrix,
- transform_concatenatedMatrix, protectedFlags);
+ o.init_readonly_property("concatenatedMatrix",
transform_concatenatedMatrix,
+ protectedFlags);
o.init_property("colorTransform", transform_colorTransform,
transform_colorTransform, protectedFlags);
- o.init_property("concatenatedColorTransform",
- transform_concatenatedColorTransform,
+ o.init_readonly_property("concatenatedColorTransform",
transform_concatenatedColorTransform, protectedFlags);
o.init_property("pixelBounds", transform_pixelBounds,
transform_pixelBounds, protectedFlags);
=== modified file 'libcore/asobj/flash/geom/geom_pkg.cpp'
--- a/libcore/asobj/flash/geom/geom_pkg.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/geom/geom_pkg.cpp 2009-11-18 11:51:35 +0000
@@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h"
#include "Global_as.h"
#include "as_object.h"
#include "string_table.h"
=== modified file 'libcore/asobj/flash/media/Camera_as.cpp'
--- a/libcore/asobj/flash/media/Camera_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/flash/media/Camera_as.cpp 2009-11-18 13:01:28 +0000
@@ -29,9 +29,9 @@
#include "smart_ptr.h"
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h"
#include "MediaHandler.h"
#include "VideoInput.h"
+#include "Object.h"
#include <sstream>
@@ -139,7 +139,8 @@
static boost::intrusive_ptr<as_object> o;
if ( ! o )
{
- o = new as_object(getObjectInterface());
+ o = new as_object();
+ o->set_prototype(getObjectInterface());
attachCameraInterface(*o);
}
return o.get();
@@ -151,10 +152,10 @@
Camera_as(media::VideoInput* input)
:
- as_object(getCameraInterface()),
_input(input),
_loopback(false)
{
+ set_prototype(getCameraInterface());
assert(input);
}
=== modified file 'libcore/asobj/flash/media/ID3Info_as.cpp'
--- a/libcore/asobj/flash/media/ID3Info_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/media/ID3Info_as.cpp 2009-11-18 13:01:28 +0000
@@ -36,21 +36,8 @@
as_value id3info_ctor(const fn_call& fn);
void attachID3InfoInterface(as_object& o);
void attachID3InfoStaticInterface(as_object& o);
- as_object* getID3InfoInterface();
-
}
-class ID3Info_as : public as_object
-{
-
-public:
-
- ID3Info_as()
- :
- as_object(getID3InfoInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
id3info_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getID3InfoInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachID3InfoInterface(*o);
- }
- return o.get();
-}
-
as_value
id3info_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new ID3Info_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/media/Microphone_as.cpp'
--- a/libcore/asobj/flash/media/Microphone_as.cpp 2009-11-13 12:29:42
+0000
+++ b/libcore/asobj/flash/media/Microphone_as.cpp 2009-11-18 13:09:21
+0000
@@ -29,7 +29,7 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
+#include "Object.h"
#include <cmath>
#ifdef USE_GST
@@ -131,7 +131,8 @@
static boost::intrusive_ptr<as_object> o;
if ( ! o )
{
- o = new as_object(getObjectInterface());
+ o = new as_object();
+ o->set_prototype(getObjectInterface());
attachMicrophoneInterface(*o);
}
return o.get();
@@ -144,9 +145,8 @@
public:
Microphone_as()
- :
- as_object(getMicrophoneInterface())
{
+ set_prototype(getCameraInterface());
attachMicrophoneProperties(*get_prototype());
}
@@ -162,9 +162,8 @@
public:
Microphone_as()
- :
- as_object(getMicrophoneInterface())
{
+ set_prototype(getMicrophoneInterface());
attachMicrophoneProperties(*get_prototype());
}
=== modified file 'libcore/asobj/flash/media/SoundChannel_as.cpp'
--- a/libcore/asobj/flash/media/SoundChannel_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/media/SoundChannel_as.cpp 2009-11-18 13:01:28
+0000
@@ -37,21 +37,8 @@
as_value soundchannel_ctor(const fn_call& fn);
void attachSoundChannelInterface(as_object& o);
void attachSoundChannelStaticInterface(as_object& o);
- as_object* getSoundChannelInterface();
-
}
-class SoundChannel_as : public as_object
-{
-
-public:
-
- SoundChannel_as()
- :
- as_object(getSoundChannelInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
soundchannel_class_init(as_object& where, const ObjectURI& uri)
@@ -74,21 +61,10 @@
{
}
-as_object*
-getSoundChannelInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSoundChannelInterface(*o);
- }
- return o.get();
-}
-
as_value
soundchannel_soundComplete(const fn_call& fn)
{
- SoundChannel_as* ptr = ensure<ThisIs<SoundChannel_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -97,9 +73,7 @@
as_value
soundchannel_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SoundChannel_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/media/SoundLoaderContext_as.cpp'
--- a/libcore/asobj/flash/media/SoundLoaderContext_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/media/SoundLoaderContext_as.cpp 2009-11-18
13:01:28 +0000
@@ -36,21 +36,8 @@
as_value soundloadercontext_ctor(const fn_call& fn);
void attachSoundLoaderContextInterface(as_object& o);
void attachSoundLoaderContextStaticInterface(as_object& o);
- as_object* getSoundLoaderContextInterface();
-
}
-class SoundLoaderContext_as : public as_object
-{
-
-public:
-
- SoundLoaderContext_as()
- :
- as_object(getSoundLoaderContextInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
soundloadercontext_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getSoundLoaderContextInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSoundLoaderContextInterface(*o);
- }
- return o.get();
-}
-
as_value
soundloadercontext_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SoundLoaderContext_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/media/SoundMixer_as.cpp'
--- a/libcore/asobj/flash/media/SoundMixer_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/media/SoundMixer_as.cpp 2009-11-18 13:01:28
+0000
@@ -38,21 +38,8 @@
as_value soundmixer_ctor(const fn_call& fn);
void attachSoundMixerInterface(as_object& o);
void attachSoundMixerStaticInterface(as_object& o);
- as_object* getSoundMixerInterface();
-
}
-class SoundMixer_as : public as_object
-{
-
-public:
-
- SoundMixer_as()
- :
- as_object(getSoundMixerInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
soundmixer_class_init(as_object& where, const ObjectURI& uri)
@@ -76,21 +63,10 @@
{
}
-as_object*
-getSoundMixerInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSoundMixerInterface(*o);
- }
- return o.get();
-}
-
as_value
soundmixer_computeSpectrum(const fn_call& fn)
{
- SoundMixer_as* ptr = ensure<ThisIs<SoundMixer_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -99,7 +75,7 @@
as_value
soundmixer_stopAll(const fn_call& fn)
{
- SoundMixer_as* ptr = ensure<ThisIs<SoundMixer_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -108,9 +84,7 @@
as_value
soundmixer_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SoundMixer_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/media/SoundTransform_as.cpp'
--- a/libcore/asobj/flash/media/SoundTransform_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/media/SoundTransform_as.cpp 2009-11-18 13:01:28
+0000
@@ -36,21 +36,8 @@
as_value soundtransform_ctor(const fn_call& fn);
void attachSoundTransformInterface(as_object& o);
void attachSoundTransformStaticInterface(as_object& o);
- as_object* getSoundTransformInterface();
-
}
-class SoundTransform_as : public as_object
-{
-
-public:
-
- SoundTransform_as()
- :
- as_object(getSoundTransformInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
soundtransform_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getSoundTransformInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSoundTransformInterface(*o);
- }
- return o.get();
-}
-
as_value
soundtransform_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SoundTransform_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/media/Sound_as.cpp'
--- a/libcore/asobj/flash/media/Sound_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/flash/media/Sound_as.cpp 2009-11-18 11:51:35 +0000
@@ -35,7 +35,6 @@
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h" // need builtin_function
#include "smart_ptr.h" // for boost intrusive_ptr
-#include "Object.h"
#include "VM.h"
#include "namedStrings.h"
#include "ExportableResource.h"
@@ -79,7 +78,6 @@
as_value sound_progress(const fn_call& fn);
as_value sound_ctor(const fn_call& fn);
void attachSoundInterface(as_object& o);
- as_object* getSoundInterface();
}
Sound_as::Sound_as(as_object* owner)
@@ -119,10 +117,12 @@
sound_class_init(as_object& where, const ObjectURI& uri)
{
- as_object* iface = getSoundInterface();
Global_as& gl = getGlobal(where);
- as_object* cl = gl.createClass(&sound_new, iface);
- iface->set_member_flags(NSV::PROP_CONSTRUCTOR, PropFlags::readOnly);
+ as_object* proto = gl.createObject();
+ as_object* cl = gl.createClass(&sound_new, proto);
+ attachSoundInterface(*proto);
+ proto->set_member_flags(NSV::PROP_CONSTRUCTOR, PropFlags::readOnly);
+ proto->set_member_flags(NSV::PROP_uuPROTOuu, PropFlags::readOnly, 0);
// Register _global.String
where.init_member(getName(uri), cl, as_object::DefaultFlags,
@@ -773,22 +773,6 @@
}
-as_object*
-getSoundInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( o == NULL )
- {
- o = new as_object(getObjectInterface());
- attachSoundInterface(*o);
-
- // TODO: make this an additional second arg to as_object(__proto__)
ctor !
- o->set_member_flags(NSV::PROP_uuPROTOuu, PropFlags::readOnly, 0);
- }
-
- return o.get();
-}
-
as_value
sound_new(const fn_call& fn)
{
=== modified file 'libcore/asobj/flash/net/FileFilter_as.cpp'
--- a/libcore/asobj/flash/net/FileFilter_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/net/FileFilter_as.cpp 2009-11-18 12:47:26 +0000
@@ -36,21 +36,8 @@
as_value filefilter_ctor(const fn_call& fn);
void attachFileFilterInterface(as_object& o);
void attachFileFilterStaticInterface(as_object& o);
- as_object* getFileFilterInterface();
-
}
-class FileFilter_as : public as_object
-{
-
-public:
-
- FileFilter_as()
- :
- as_object(getFileFilterInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
filefilter_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getFileFilterInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachFileFilterInterface(*o);
- }
- return o.get();
-}
-
as_value
filefilter_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new FileFilter_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/FileReferenceList_as.cpp'
--- a/libcore/asobj/flash/net/FileReferenceList_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/net/FileReferenceList_as.cpp 2009-11-18 11:51:35
+0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/flash/net/FileReference_as.cpp'
--- a/libcore/asobj/flash/net/FileReference_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/net/FileReference_as.cpp 2009-11-18 11:51:35
+0000
@@ -29,7 +29,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/flash/net/IDynamicPropertyOutput_as.cpp'
--- a/libcore/asobj/flash/net/IDynamicPropertyOutput_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/net/IDynamicPropertyOutput_as.cpp 2009-11-18
12:47:26 +0000
@@ -36,21 +36,8 @@
as_value idynamicpropertyoutput_ctor(const fn_call& fn);
void attachIDynamicPropertyOutputInterface(as_object& o);
void attachIDynamicPropertyOutputStaticInterface(as_object& o);
- as_object* getIDynamicPropertyOutputInterface();
-
}
-class IDynamicPropertyOutput_as : public as_object
-{
-
-public:
-
- IDynamicPropertyOutput_as()
- :
- as_object(getIDynamicPropertyOutputInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
idynamicpropertyoutput_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getIDynamicPropertyOutputInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachIDynamicPropertyOutputInterface(*o);
- }
- return o.get();
-}
-
as_value
idynamicpropertyoutput_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new IDynamicPropertyOutput_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/IDynamicPropertyWriter_as.cpp'
--- a/libcore/asobj/flash/net/IDynamicPropertyWriter_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/net/IDynamicPropertyWriter_as.cpp 2009-11-18
12:47:26 +0000
@@ -36,21 +36,8 @@
as_value idynamicpropertywriter_ctor(const fn_call& fn);
void attachIDynamicPropertyWriterInterface(as_object& o);
void attachIDynamicPropertyWriterStaticInterface(as_object& o);
- as_object* getIDynamicPropertyWriterInterface();
-
}
-class IDynamicPropertyWriter_as : public as_object
-{
-
-public:
-
- IDynamicPropertyWriter_as()
- :
- as_object(getIDynamicPropertyWriterInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
idynamicpropertywriter_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getIDynamicPropertyWriterInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachIDynamicPropertyWriterInterface(*o);
- }
- return o.get();
-}
-
as_value
idynamicpropertywriter_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new IDynamicPropertyWriter_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/LocalConnection_as.cpp'
--- a/libcore/asobj/flash/net/LocalConnection_as.cpp 2009-10-22 14:56:18
+0000
+++ b/libcore/asobj/flash/net/LocalConnection_as.cpp 2009-11-18 11:51:35
+0000
@@ -37,7 +37,6 @@
#include "NativeFunction.h"
#include "amf.h"
#include "lcshm.h"
-#include "Object.h" // for getObjectInterface
#include "namedStrings.h"
#include "StringPredicates.h"
=== modified file 'libcore/asobj/flash/net/NetConnection_as.cpp'
--- a/libcore/asobj/flash/net/NetConnection_as.cpp 2009-11-13 12:29:42
+0000
+++ b/libcore/asobj/flash/net/NetConnection_as.cpp 2009-11-18 11:51:35
+0000
@@ -28,7 +28,6 @@
#include "GnashException.h"
#include "builtin_function.h"
#include "movie_root.h"
-#include "Object.h" // for getObjectInterface
#include "StreamProvider.h"
#include "URLAccessManager.h"
#include "URL.h"
=== modified file 'libcore/asobj/flash/net/NetStream_as.cpp'
--- a/libcore/asobj/flash/net/NetStream_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/flash/net/NetStream_as.cpp 2009-11-18 11:51:35 +0000
@@ -32,7 +32,6 @@
#include "NativeFunction.h"
#include "GnashException.h"
#include "NetConnection_as.h"
-#include "Object.h" // for getObjectInterface
#include "VM.h"
#include "namedStrings.h"
#include "movie_root.h"
=== modified file 'libcore/asobj/flash/net/ObjectEncoding_as.cpp'
--- a/libcore/asobj/flash/net/ObjectEncoding_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/net/ObjectEncoding_as.cpp 2009-11-18 12:47:26
+0000
@@ -36,22 +36,9 @@
as_value objectencoding_ctor(const fn_call& fn);
void attachObjectEncodingInterface(as_object& o);
void attachObjectEncodingStaticInterface(as_object& o);
- as_object* getObjectEncodingInterface();
-
}
-class ObjectEncoding_as : public as_object
-{
-
-public:
-
- ObjectEncoding_as()
- :
- as_object(getObjectEncodingInterface())
- {}
-};
-
-// extern (used by Global.cpp)
+
void
objectencoding_class_init(as_object& where, const ObjectURI& uri)
{
@@ -72,23 +59,10 @@
}
-as_object*
-getObjectEncodingInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachObjectEncodingInterface(*o);
- }
- return o.get();
-}
-
as_value
objectencoding_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new ObjectEncoding_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/Responder_as.cpp'
--- a/libcore/asobj/flash/net/Responder_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/net/Responder_as.cpp 2009-11-18 12:47:26 +0000
@@ -36,21 +36,8 @@
as_value responder_ctor(const fn_call& fn);
void attachResponderInterface(as_object& o);
void attachResponderStaticInterface(as_object& o);
- as_object* getResponderInterface();
-
}
-class Responder_as : public as_object
-{
-
-public:
-
- Responder_as()
- :
- as_object(getResponderInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
responder_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getResponderInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachResponderInterface(*o);
- }
- return o.get();
-}
-
as_value
responder_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Responder_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/SharedObjectFlushStatus_as.cpp'
--- a/libcore/asobj/flash/net/SharedObjectFlushStatus_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/net/SharedObjectFlushStatus_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.net.SharedObjectFlushStatus class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/net/SharedObject_as.cpp'
--- a/libcore/asobj/flash/net/SharedObject_as.cpp 2009-11-16 12:34:46
+0000
+++ b/libcore/asobj/flash/net/SharedObject_as.cpp 2009-11-18 13:03:33
+0000
@@ -37,7 +37,6 @@
#include "Global_as.h"
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
#include "VM.h"
#include "Property.h"
#include "string_table.h"
@@ -47,6 +46,7 @@
#include "rtmp_client.h"
#include "URL.h"
#include "NetConnection_as.h"
+#include "Object.h"
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
@@ -231,11 +231,12 @@
~SharedObject_as();
SharedObject_as()
- : as_object(getSharedObjectInterface()),
- _data(0),
- _persistance(0),
- _connected(false)
+ :
+ _data(0),
+ _persistance(0),
+ _connected(false)
{
+ set_prototype(getSharedObjectInterface());
}
bool flush(int space = 0) const;
@@ -809,7 +810,8 @@
static boost::intrusive_ptr<as_object> o;
if ( ! o ) {
- o = new as_object(getObjectInterface());
+ o = new as_object();
+ o->set_prototype(getObjectInterface());
attachSharedObjectInterface(*o);
}
return o.get();
@@ -1134,10 +1136,12 @@
#ifdef BUFFERED_AMF_SOL
+ Global_as& gl = *vm.getGlobal();
+
// The 'data' member is initialized only on getLocal() (and probably
// getRemote()): i.e. when there is some data, or when it's ready to
// be added.
- as_object* data = new as_object(getObjectInterface());
+ as_object* data = gl.createObject();
struct stat st;
=== modified file 'libcore/asobj/flash/net/Socket_as.cpp'
--- a/libcore/asobj/flash/net/Socket_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/net/Socket_as.cpp 2009-11-18 13:05:53 +0000
@@ -68,35 +68,20 @@
as_value socket_ctor(const fn_call& fn);
void attachSocketInterface(as_object& o);
void attachSocketStaticInterface(as_object& o);
- as_object* getSocketInterface();
-
}
-class Socket_as : public as_object
-{
-
-public:
-
- Socket_as()
- :
- as_object(getSocketInterface())
- {}
-};
-
// extern (used by Global.cpp)
-void socket_class_init(as_object& where, const ObjectURI& uri)
+void
+socket_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getSocketInterface();
- cl = gl.createClass(&socket_ctor, proto);
- attachSocketStaticInterface(*cl);
- }
+ Global_as& gl = getGlobal(where);
+ as_object* proto = gl.createObject();
+ attachSocketInterface(*proto);
+ as_object* cl = gl.createClass(&socket_ctor, proto);
+ attachSocketStaticInterface(*cl);
// Register _global.Socket
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
@@ -146,21 +131,10 @@
{
}
-as_object*
-getSocketInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSocketInterface(*o);
- }
- return o.get();
-}
-
as_value
socket_connect(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -169,7 +143,7 @@
as_value
socket_flush(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -178,7 +152,7 @@
as_value
socket_readBoolean(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -187,7 +161,7 @@
as_value
socket_readByte(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -196,7 +170,7 @@
as_value
socket_readBytes(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -205,7 +179,7 @@
as_value
socket_readDouble(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -214,7 +188,7 @@
as_value
socket_readFloat(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -223,7 +197,7 @@
as_value
socket_readInt(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -232,7 +206,7 @@
as_value
socket_readMultiByte(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -241,7 +215,7 @@
as_value
socket_readObject(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -250,7 +224,7 @@
as_value
socket_readShort(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -259,7 +233,7 @@
as_value
socket_readUnsignedByte(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -268,7 +242,7 @@
as_value
socket_readUnsignedInt(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -277,7 +251,7 @@
as_value
socket_readUnsignedShort(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -286,7 +260,7 @@
as_value
socket_readUTF(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -295,7 +269,7 @@
as_value
socket_readUTFBytes(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -304,7 +278,7 @@
as_value
socket_writeBoolean(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -313,7 +287,7 @@
as_value
socket_writeByte(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -322,7 +296,7 @@
as_value
socket_writeBytes(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -331,7 +305,7 @@
as_value
socket_writeDouble(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -340,7 +314,7 @@
as_value
socket_writeFloat(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -349,7 +323,7 @@
as_value
socket_writeInt(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -358,7 +332,7 @@
as_value
socket_writeMultiByte(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -367,7 +341,7 @@
as_value
socket_writeObject(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -376,7 +350,7 @@
as_value
socket_writeShort(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -385,7 +359,7 @@
as_value
socket_writeUnsignedInt(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -394,7 +368,7 @@
as_value
socket_writeUTF(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -403,7 +377,7 @@
as_value
socket_writeUTFBytes(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -412,7 +386,7 @@
as_value
socket_close(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -421,7 +395,7 @@
as_value
socket_ioError(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -430,7 +404,7 @@
as_value
socket_securityError(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -439,7 +413,7 @@
as_value
socket_socketData(const fn_call& fn)
{
- Socket_as* ptr = ensure<ThisIs<Socket_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -448,9 +422,7 @@
as_value
socket_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Socket_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/URLLoaderDataFormat_as.cpp'
--- a/libcore/asobj/flash/net/URLLoaderDataFormat_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/net/URLLoaderDataFormat_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.net.URLLoaderDataFormat class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/net/URLLoader_as.cpp'
--- a/libcore/asobj/flash/net/URLLoader_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/net/URLLoader_as.cpp 2009-11-18 13:05:53 +0000
@@ -44,35 +44,20 @@
as_value urlloader_ctor(const fn_call& fn);
void attachURLLoaderInterface(as_object& o);
void attachURLLoaderStaticInterface(as_object& o);
- as_object* getURLLoaderInterface();
-
}
-class URLLoader_as : public as_object
-{
-
-public:
-
- URLLoader_as()
- :
- as_object(getURLLoaderInterface())
- {}
-};
-
// extern (used by Global.cpp)
-void urlloader_class_init(as_object& where, const ObjectURI& uri)
+void
+urlloader_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getURLLoaderInterface();
- cl = gl.createClass(&urlloader_ctor, proto);
- attachURLLoaderStaticInterface(*cl);
- }
+ Global_as& gl = getGlobal(where);
+ as_object* proto = gl.createObject();
+ attachURLLoaderInterface(*proto);
+ as_object* cl = gl.createClass(&urlloader_ctor, proto);
+ attachURLLoaderStaticInterface(*cl);
// Register _global.URLLoader
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
@@ -97,21 +82,10 @@
{
}
-as_object*
-getURLLoaderInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachURLLoaderInterface(*o);
- }
- return o.get();
-}
-
as_value
urlloader_close(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -120,7 +94,7 @@
as_value
urlloader_load(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -129,7 +103,7 @@
as_value
urlloader_complete(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -138,7 +112,7 @@
as_value
urlloader_httpStatus(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -147,7 +121,7 @@
as_value
urlloader_ioError(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -156,7 +130,7 @@
as_value
urlloader_open(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -165,7 +139,7 @@
as_value
urlloader_progress(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -174,7 +148,7 @@
as_value
urlloader_securityError(const fn_call& fn)
{
- URLLoader_as* ptr = ensure<ThisIs<URLLoader_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -183,9 +157,7 @@
as_value
urlloader_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new URLLoader_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/URLRequestHeader_as.cpp'
--- a/libcore/asobj/flash/net/URLRequestHeader_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/net/URLRequestHeader_as.cpp 2009-11-18 13:03:33
+0000
@@ -36,21 +36,8 @@
as_value urlrequestheader_ctor(const fn_call& fn);
void attachURLRequestHeaderInterface(as_object& o);
void attachURLRequestHeaderStaticInterface(as_object& o);
- as_object* getURLRequestHeaderInterface();
-
}
-class URLRequestHeader_as : public as_object
-{
-
-public:
-
- URLRequestHeader_as()
- :
- as_object(getURLRequestHeaderInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
urlrequestheader_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getURLRequestHeaderInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachURLRequestHeaderInterface(*o);
- }
- return o.get();
-}
-
as_value
urlrequestheader_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new URLRequestHeader_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/URLRequestMethod_as.cpp'
--- a/libcore/asobj/flash/net/URLRequestMethod_as.cpp 2009-08-27 06:13:42
+0000
+++ b/libcore/asobj/flash/net/URLRequestMethod_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.net.URLRequestMethod class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/net/URLStream_as.cpp'
--- a/libcore/asobj/flash/net/URLStream_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/net/URLStream_as.cpp 2009-11-18 13:03:33 +0000
@@ -57,22 +57,8 @@
as_value urlstream_ctor(const fn_call& fn);
void attachURLStreamInterface(as_object& o);
void attachURLStreamStaticInterface(as_object& o);
- as_object* getURLStreamInterface();
-
}
-class URLStream_as : public as_object
-{
-
-public:
-
- URLStream_as()
- :
- as_object(getURLStreamInterface())
- {}
-};
-
-// extern (used by Global.cpp)
void
urlstream_class_init(as_object& where, const ObjectURI& uri)
{
@@ -115,21 +101,10 @@
}
-as_object*
-getURLStreamInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachURLStreamInterface(*o);
- }
- return o.get();
-}
-
as_value
urlstream_load(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -138,7 +113,7 @@
as_value
urlstream_readBoolean(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -147,7 +122,7 @@
as_value
urlstream_readByte(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -156,7 +131,7 @@
as_value
urlstream_readBytes(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -165,7 +140,7 @@
as_value
urlstream_readDouble(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -174,7 +149,7 @@
as_value
urlstream_readFloat(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -183,7 +158,7 @@
as_value
urlstream_readInt(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -192,7 +167,7 @@
as_value
urlstream_readMultiByte(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -201,7 +176,7 @@
as_value
urlstream_readObject(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -210,7 +185,7 @@
as_value
urlstream_readShort(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -219,7 +194,7 @@
as_value
urlstream_readUnsignedByte(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -228,7 +203,7 @@
as_value
urlstream_readUnsignedInt(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -237,7 +212,7 @@
as_value
urlstream_readUnsignedShort(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -246,7 +221,7 @@
as_value
urlstream_readUTF(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -255,7 +230,7 @@
as_value
urlstream_readUTFBytes(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -264,7 +239,7 @@
as_value
urlstream_complete(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -273,7 +248,7 @@
as_value
urlstream_httpStatus(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -282,7 +257,7 @@
as_value
urlstream_ioError(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -291,7 +266,7 @@
as_value
urlstream_open(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -300,7 +275,7 @@
as_value
urlstream_progress(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -309,7 +284,7 @@
as_value
urlstream_securityError(const fn_call& fn)
{
- URLStream_as* ptr = ensure<ThisIs<URLStream_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -318,9 +293,7 @@
as_value
urlstream_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new URLStream_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/net/XMLSocket_as.cpp'
--- a/libcore/asobj/flash/net/XMLSocket_as.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/flash/net/XMLSocket_as.cpp 2009-11-18 11:51:35 +0000
@@ -33,7 +33,6 @@
#include "builtin_function.h"
#include "NativeFunction.h"
#include "URLAccessManager.h"
-#include "Object.h" // for getObjectInterface
#include "Global_as.h"
#include "log.h"
=== modified file 'libcore/asobj/flash/net/net_pkg.cpp'
--- a/libcore/asobj/flash/net/net_pkg.cpp 2009-07-16 10:07:08 +0000
+++ b/libcore/asobj/flash/net/net_pkg.cpp 2009-11-18 11:51:35 +0000
@@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h" // for getObjectInterface
#include "as_object.h"
#include "string_table.h"
#include "VM.h"
@@ -26,6 +25,7 @@
#include "FileReferenceList_as.h"
#include "FileReference_as.h"
#include "net_pkg.h"
+#include "Global_as.h"
namespace gnash {
@@ -33,8 +33,10 @@
get_flash_net_package(const fn_call& fn)
{
log_debug("Loading flash.net package");
-
- as_object *pkg = new as_object(getObjectInterface());
+
+ Global_as& gl = getGlobal(fn);
+
+ as_object* pkg = gl.createObject();
string_table& st = getStringTable(fn);
const string_table::key global = 0;
=== modified file 'libcore/asobj/flash/printing/PrintJobOptions_as.cpp'
--- a/libcore/asobj/flash/printing/PrintJobOptions_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/printing/PrintJobOptions_as.cpp 2009-11-18
13:05:53 +0000
@@ -36,21 +36,8 @@
as_value printjoboptions_ctor(const fn_call& fn);
void attachPrintJobOptionsInterface(as_object& o);
void attachPrintJobOptionsStaticInterface(as_object& o);
- as_object* getPrintJobOptionsInterface();
-
}
-class PrintJobOptions_as : public as_object
-{
-
-public:
-
- PrintJobOptions_as()
- :
- as_object(getPrintJobOptionsInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
printjoboptions_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getPrintJobOptionsInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachPrintJobOptionsInterface(*o);
- }
- return o.get();
-}
-
as_value
printjoboptions_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new PrintJobOptions_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/printing/PrintJobOrientation_as.cpp'
--- a/libcore/asobj/flash/printing/PrintJobOrientation_as.cpp 2009-08-18
11:13:25 +0000
+++ b/libcore/asobj/flash/printing/PrintJobOrientation_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.printing.PrintJobOrientation class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/printing/PrintJob_as.cpp'
--- a/libcore/asobj/flash/printing/PrintJob_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/printing/PrintJob_as.cpp 2009-11-18 13:05:53
+0000
@@ -38,21 +38,8 @@
as_value printjob_ctor(const fn_call& fn);
void attachPrintJobInterface(as_object& o);
void attachPrintJobStaticInterface(as_object& o);
- as_object* getPrintJobInterface();
-
}
-class PrintJob_as : public as_object
-{
-
-public:
-
- PrintJob_as()
- :
- as_object(getPrintJobInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
printjob_class_init(as_object& where, const ObjectURI& uri)
@@ -76,21 +63,10 @@
{
}
-as_object*
-getPrintJobInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachPrintJobInterface(*o);
- }
- return o.get();
-}
-
as_value
printjob_send(const fn_call& fn)
{
- PrintJob_as* ptr = ensure<ThisIs<PrintJob_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -99,7 +75,7 @@
as_value
printjob_start(const fn_call& fn)
{
- PrintJob_as* ptr = ensure<ThisIs<PrintJob_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -108,9 +84,7 @@
as_value
printjob_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new PrintJob_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/sampler/DeleteObjectSample_as.cpp'
--- a/libcore/asobj/flash/sampler/DeleteObjectSample_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/sampler/DeleteObjectSample_as.cpp 2009-11-18
13:00:58 +0000
@@ -36,21 +36,8 @@
as_value deleteobjectsample_ctor(const fn_call& fn);
void attachDeleteObjectSampleInterface(as_object& o);
void attachDeleteObjectSampleStaticInterface(as_object& o);
- as_object* getDeleteObjectSampleInterface();
-
}
-class DeleteObjectSample_as : public as_object
-{
-
-public:
-
- DeleteObjectSample_as()
- :
- as_object(getDeleteObjectSampleInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
deleteobjectsample_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getDeleteObjectSampleInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachDeleteObjectSampleInterface(*o);
- }
- return o.get();
-}
-
as_value
deleteobjectsample_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new DeleteObjectSample_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/sampler/NewObjectSample_as.cpp'
--- a/libcore/asobj/flash/sampler/NewObjectSample_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/sampler/NewObjectSample_as.cpp 2009-11-18
13:00:58 +0000
@@ -36,21 +36,8 @@
as_value newobjectsample_ctor(const fn_call& fn);
void attachNewObjectSampleInterface(as_object& o);
void attachNewObjectSampleStaticInterface(as_object& o);
- as_object* getNewObjectSampleInterface();
-
}
-class NewObjectSample_as : public as_object
-{
-
-public:
-
- NewObjectSample_as()
- :
- as_object(getNewObjectSampleInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
newobjectsample_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getNewObjectSampleInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachNewObjectSampleInterface(*o);
- }
- return o.get();
-}
-
as_value
newobjectsample_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new NewObjectSample_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/sampler/Sample_as.cpp'
--- a/libcore/asobj/flash/sampler/Sample_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/sampler/Sample_as.cpp 2009-11-18 13:00:58 +0000
@@ -36,21 +36,8 @@
as_value sample_ctor(const fn_call& fn);
void attachSampleInterface(as_object& o);
void attachSampleStaticInterface(as_object& o);
- as_object* getSampleInterface();
-
}
-class Sample_as : public as_object
-{
-
-public:
-
- Sample_as()
- :
- as_object(getSampleInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
sample_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getSampleInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSampleInterface(*o);
- }
- return o.get();
-}
-
as_value
sample_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Sample_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/sampler/StackFrame_as.cpp'
--- a/libcore/asobj/flash/sampler/StackFrame_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/sampler/StackFrame_as.cpp 2009-11-18 13:00:58
+0000
@@ -39,21 +39,8 @@
as_value stackframe_ctor(const fn_call& fn);
void attachStackFrameInterface(as_object& o);
void attachStackFrameStaticInterface(as_object& o);
- as_object* getStackFrameInterface();
-
}
-class StackFrame_as : public as_object
-{
-
-public:
-
- StackFrame_as()
- :
- as_object(getStackFrameInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
stackframe_class_init(as_object& where, const ObjectURI& uri)
@@ -79,21 +66,10 @@
}
-as_object*
-getStackFrameInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachStackFrameInterface(*o);
- }
- return o.get();
-}
-
as_value
stackframe_file(const fn_call& fn)
{
- StackFrame_as* ptr = ensure<ThisIs<StackFrame_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -102,7 +78,7 @@
as_value
stackframe_line(const fn_call& fn)
{
- StackFrame_as* ptr = ensure<ThisIs<StackFrame_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -111,7 +87,7 @@
as_value
stackframe_name(const fn_call& fn)
{
- StackFrame_as* ptr = ensure<ThisIs<StackFrame_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -120,9 +96,7 @@
as_value
stackframe_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new StackFrame_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/ApplicationDomain_as.cpp'
--- a/libcore/asobj/flash/system/ApplicationDomain_as.cpp 2009-10-23
06:25:25 +0000
+++ b/libcore/asobj/flash/system/ApplicationDomain_as.cpp 2009-11-18
13:01:13 +0000
@@ -37,21 +37,8 @@
as_value applicationdomain_ctor(const fn_call& fn);
void attachApplicationDomainInterface(as_object& o);
void attachApplicationDomainStaticInterface(as_object& o);
- as_object* getApplicationDomainInterface();
-
}
-class ApplicationDomain_as : public as_object
-{
-
-public:
-
- ApplicationDomain_as()
- :
- as_object(getApplicationDomainInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
applicationdomain_class_init(as_object& where, const ObjectURI& uri)
@@ -74,21 +61,10 @@
{
}
-as_object*
-getApplicationDomainInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachApplicationDomainInterface(*o);
- }
- return o.get();
-}
-
as_value
applicationdomain_hasDefinition(const fn_call& fn)
{
- ApplicationDomain_as* ptr = ensure<ThisIs<ApplicationDomain_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -97,9 +73,7 @@
as_value
applicationdomain_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new ApplicationDomain_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/Capabilities_as.cpp'
--- a/libcore/asobj/flash/system/Capabilities_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/system/Capabilities_as.cpp 2009-11-18 13:01:13
+0000
@@ -36,22 +36,8 @@
as_value capabilities_ctor(const fn_call& fn);
void attachCapabilitiesInterface(as_object& o);
void attachCapabilitiesStaticInterface(as_object& o);
- as_object* getCapabilitiesInterface();
-
}
-class Capabilities_as : public as_object
-{
-
-public:
-
- Capabilities_as()
- :
- as_object(getCapabilitiesInterface())
- {}
-};
-
-// extern (used by Global.cpp)
void
capabilities_class_init(as_object& where, const ObjectURI& uri)
{
@@ -72,23 +58,10 @@
}
-as_object*
-getCapabilitiesInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachCapabilitiesInterface(*o);
- }
- return o.get();
-}
-
as_value
capabilities_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Capabilities_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/IMEConversionMode_as.cpp'
--- a/libcore/asobj/flash/system/IMEConversionMode_as.cpp 2009-08-20
08:57:16 +0000
+++ b/libcore/asobj/flash/system/IMEConversionMode_as.cpp 2009-11-18
11:51:35 +0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.system.IMEConversionMode class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/system/IME_as.cpp'
--- a/libcore/asobj/flash/system/IME_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/system/IME_as.cpp 2009-11-18 13:01:13 +0000
@@ -38,21 +38,8 @@
as_value ime_ctor(const fn_call& fn);
void attachIMEInterface(as_object& o);
void attachIMEStaticInterface(as_object& o);
- as_object* getIMEInterface();
-
}
-class IME_as : public as_object
-{
-
-public:
-
- IME_as()
- :
- as_object(getIMEInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
ime_class_init(as_object& where, const ObjectURI& uri)
@@ -76,21 +63,10 @@
{
}
-as_object*
-getIMEInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachIMEInterface(*o);
- }
- return o.get();
-}
-
as_value
ime_setCompositionString(const fn_call& fn)
{
- IME_as* ptr = ensure<ThisIs<IME_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -99,7 +75,7 @@
as_value
ime_imeComposition(const fn_call& fn)
{
- IME_as* ptr = ensure<ThisIs<IME_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -108,9 +84,7 @@
as_value
ime_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new IME_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/LoaderContext_as.cpp'
--- a/libcore/asobj/flash/system/LoaderContext_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/system/LoaderContext_as.cpp 2009-11-18 13:01:13
+0000
@@ -36,21 +36,8 @@
as_value loadercontext_ctor(const fn_call& fn);
void attachLoaderContextInterface(as_object& o);
void attachLoaderContextStaticInterface(as_object& o);
- as_object* getLoaderContextInterface();
-
}
-class LoaderContext_as : public as_object
-{
-
-public:
-
- LoaderContext_as()
- :
- as_object(getLoaderContextInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
loadercontext_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getLoaderContextInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachLoaderContextInterface(*o);
- }
- return o.get();
-}
-
as_value
loadercontext_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new LoaderContext_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/SecurityDomain_as.cpp'
--- a/libcore/asobj/flash/system/SecurityDomain_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/system/SecurityDomain_as.cpp 2009-11-18 13:01:13
+0000
@@ -36,21 +36,8 @@
as_value securitydomain_ctor(const fn_call& fn);
void attachSecurityDomainInterface(as_object& o);
void attachSecurityDomainStaticInterface(as_object& o);
- as_object* getSecurityDomainInterface();
-
}
-class SecurityDomain_as : public as_object
-{
-
-public:
-
- SecurityDomain_as()
- :
- as_object(getSecurityDomainInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
securitydomain_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getSecurityDomainInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSecurityDomainInterface(*o);
- }
- return o.get();
-}
-
as_value
securitydomain_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SecurityDomain_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/SecurityPanel_as.cpp'
--- a/libcore/asobj/flash/system/SecurityPanel_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/system/SecurityPanel_as.cpp 2009-11-18 13:01:13
+0000
@@ -36,21 +36,8 @@
as_value securitypanel_ctor(const fn_call& fn);
void attachSecurityPanelInterface(as_object& o);
void attachSecurityPanelStaticInterface(as_object& o);
- as_object* getSecurityPanelInterface();
-
}
-class SecurityPanel_as : public as_object
-{
-
-public:
-
- SecurityPanel_as()
- :
- as_object(getSecurityPanelInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
securitypanel_class_init(as_object& where, const ObjectURI& uri)
@@ -72,23 +59,10 @@
}
-as_object*
-getSecurityPanelInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachSecurityPanelInterface(*o);
- }
- return o.get();
-}
-
as_value
securitypanel_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new SecurityPanel_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/system/System_as.cpp'
--- a/libcore/asobj/flash/system/System_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/system/System_as.cpp 2009-11-18 11:51:35 +0000
@@ -26,7 +26,6 @@
#include "builtin_function.h"
#include "NativeFunction.h"
#include "VM.h" // for getPlayerVersion()
-#include "Object.h" // for getObjectInterface
#include <sstream>
=== modified file 'libcore/asobj/flash/text/AntiAliasType_as.cpp'
--- a/libcore/asobj/flash/text/AntiAliasType_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/AntiAliasType_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.text.AntiAliasType class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/text/CSMSettings_as.cpp'
--- a/libcore/asobj/flash/text/CSMSettings_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/CSMSettings_as.cpp 2009-11-18 10:52:53
+0000
@@ -40,17 +40,6 @@
}
-class CSMSettings_as : public as_object
-{
-
-public:
-
- CSMSettings_as()
- :
- as_object(getCSMSettingsInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
csmsettings_class_init(as_object& where, const ObjectURI& uri)
@@ -69,26 +58,12 @@
void
attachCSMSettingsStaticInterface(as_object& /*o*/)
{
-
-}
-
-as_object*
-getCSMSettingsInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachCSMSettingsInterface(*o);
- }
- return o.get();
}
as_value
csmsettings_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new CSMSettings_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/text/FontStyle_as.cpp'
--- a/libcore/asobj/flash/text/FontStyle_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/text/FontStyle_as.cpp 2009-11-18 10:52:53 +0000
@@ -33,30 +33,14 @@
// Forward declarations
namespace {
- as_value fontstyle_ctor(const fn_call& fn);
void attachFontStyleInterface(as_object& o);
- void attachFontStyleStaticInterface(as_object& o);
- as_object* getFontStyleInterface();
-
}
-class FontStyle_as : public as_object
-{
-
-public:
-
- FontStyle_as()
- :
- as_object(getFontStyleInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
fontstyle_class_init(as_object& where, const ObjectURI& uri)
{
- registerBuiltinClass(where, fontstyle_ctor, attachFontStyleInterface,
- attachFontStyleStaticInterface, uri);
+ registerBuiltinObject(where, attachFontStyleInterface, uri);
}
namespace {
@@ -66,31 +50,6 @@
{
}
-void
-attachFontStyleStaticInterface(as_object& /*o*/)
-{
-
-}
-
-as_object*
-getFontStyleInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachFontStyleInterface(*o);
- }
- return o.get();
-}
-
-as_value
-fontstyle_ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new FontStyle_as;
-
- return as_value(obj.get()); // will keep alive
-}
-
} // anonymous namespace
} // gnash namespace
=== modified file 'libcore/asobj/flash/text/FontType_as.cpp'
--- a/libcore/asobj/flash/text/FontType_as.cpp 2009-08-20 08:57:16 +0000
+++ b/libcore/asobj/flash/text/FontType_as.cpp 2009-11-18 10:52:53 +0000
@@ -33,30 +33,14 @@
// Forward declarations
namespace {
- as_value fonttype_ctor(const fn_call& fn);
void attachFontTypeInterface(as_object& o);
- void attachFontTypeStaticInterface(as_object& o);
- as_object* getFontTypeInterface();
-
}
-class FontType_as : public as_object
-{
-
-public:
-
- FontType_as()
- :
- as_object(getFontTypeInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
fonttype_class_init(as_object& where, const ObjectURI& uri)
{
- registerBuiltinClass(where, fonttype_ctor, attachFontTypeInterface,
- attachFontTypeStaticInterface, uri);
+ registerBuiltinObject(where, attachFontTypeInterface, uri);
}
namespace {
@@ -66,31 +50,6 @@
{
}
-void
-attachFontTypeStaticInterface(as_object& /*o*/)
-{
-
-}
-
-as_object*
-getFontTypeInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachFontTypeInterface(*o);
- }
- return o.get();
-}
-
-as_value
-fonttype_ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new FontType_as;
-
- return as_value(obj.get()); // will keep alive
-}
-
} // anonymous namespace
} // gnash namespace
=== modified file 'libcore/asobj/flash/text/Font_as.cpp'
--- a/libcore/asobj/flash/text/Font_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/text/Font_as.cpp 2009-11-18 10:52:53 +0000
@@ -42,17 +42,6 @@
}
-class Font_as : public as_object
-{
-
-public:
-
- Font_as()
- :
- as_object(getFontInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
font_class_init(as_object& where, const ObjectURI& uri)
@@ -76,21 +65,10 @@
{
}
-as_object*
-getFontInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachFontInterface(*o);
- }
- return o.get();
-}
-
as_value
font_hasGlyphs(const fn_call& fn)
{
- Font_as* ptr = ensure<ThisIs<Font_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -99,7 +77,7 @@
as_value
font_registerFont(const fn_call& fn)
{
- Font_as* ptr = ensure<ThisIs<Font_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -108,9 +86,7 @@
as_value
font_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new Font_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/text/GridFitType_as.cpp'
--- a/libcore/asobj/flash/text/GridFitType_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/GridFitType_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.text.GridFitType class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/text/StaticText_as.cpp'
--- a/libcore/asobj/flash/text/StaticText_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/text/StaticText_as.cpp 2009-11-18 10:52:53
+0000
@@ -36,36 +36,21 @@
as_value statictext_ctor(const fn_call& fn);
void attachStaticTextInterface(as_object& o);
void attachStaticTextStaticInterface(as_object& o);
- as_object* getStaticTextInterface();
}
-class StaticText_as : public as_object
-{
-
-public:
-
- StaticText_as()
- :
- as_object(getStaticTextInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
statictext_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getStaticTextInterface();
- cl = gl.createClass(&statictext_ctor, proto);
- attachStaticTextStaticInterface(*cl);
- }
+ Global_as& gl = getGlobal(where);
+ as_object* proto = gl.createObject();
+ as_object* cl = gl.createClass(&statictext_ctor, proto);
+ attachStaticTextInterface(*proto);
+ attachStaticTextStaticInterface(*cl);
// Register _global.StaticText
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
@@ -82,23 +67,10 @@
}
-as_object*
-getStaticTextInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachStaticTextInterface(*o);
- }
- return o.get();
-}
-
as_value
statictext_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new StaticText_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/text/StyleSheet_as.cpp'
--- a/libcore/asobj/flash/text/StyleSheet_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/text/StyleSheet_as.cpp 2009-11-18 10:52:53
+0000
@@ -40,36 +40,14 @@
as_value stylesheet_ctor(const fn_call& fn);
void attachStyleSheetInterface(as_object& o);
void attachStyleSheetStaticInterface(as_object& o);
- as_object* getStyleSheetInterface();
-
}
-class StyleSheet_as : public as_object
-{
-
-public:
-
- StyleSheet_as()
- :
- as_object(getStyleSheetInterface())
- {}
-};
-
// extern (used by Global.cpp)
-void stylesheet_class_init(as_object& where, const ObjectURI& uri)
+void
+stylesheet_class_init(as_object& where, const ObjectURI& uri)
{
- static boost::intrusive_ptr<as_object> cl;
-
- if (!cl) {
- Global_as& gl = getGlobal(where);
- as_object* proto = getStyleSheetInterface();
- cl = gl.createClass(&stylesheet_ctor, proto);
- attachStyleSheetStaticInterface(*cl);
- }
-
- // Register _global.StyleSheet
- where.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
- getNamespace(uri));
+ registerBuiltinClass(where, stylesheet_ctor, attachStyleSheetInterface,
+ attachStyleSheetStaticInterface, uri);
}
namespace {
@@ -89,21 +67,10 @@
{
}
-as_object*
-getStyleSheetInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachStyleSheetInterface(*o);
- }
- return o.get();
-}
-
as_value
stylesheet_getStyle(const fn_call& fn)
{
- StyleSheet_as* ptr = ensure<ThisIs<StyleSheet_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -112,7 +79,7 @@
as_value
stylesheet_parseCSS(const fn_call& fn)
{
- StyleSheet_as* ptr = ensure<ThisIs<StyleSheet_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -121,7 +88,7 @@
as_value
stylesheet_setStyle(const fn_call& fn)
{
- StyleSheet_as* ptr = ensure<ThisIs<StyleSheet_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -130,7 +97,7 @@
as_value
stylesheet_transform(const fn_call& fn)
{
- StyleSheet_as* ptr = ensure<ThisIs<StyleSheet_as> >(fn);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -139,9 +106,7 @@
as_value
stylesheet_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new StyleSheet_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/text/TextColorType_as.cpp'
--- a/libcore/asobj/flash/text/TextColorType_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/TextColorType_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.text.TextColorType class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/text/TextDisplayMode_as.cpp'
--- a/libcore/asobj/flash/text/TextDisplayMode_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/TextDisplayMode_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.text.TextDisplayMode class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/text/TextFieldAutoSize_as.cpp'
--- a/libcore/asobj/flash/text/TextFieldAutoSize_as.cpp 2009-08-27 06:13:42
+0000
+++ b/libcore/asobj/flash/text/TextFieldAutoSize_as.cpp 2009-11-18 11:51:35
+0000
@@ -22,7 +22,6 @@
#include "Global_as.h"
#include "as_object.h" // for inheritance
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
#include "log.h"
/// TextFieldAutoSize is an AVM2-only class
=== modified file 'libcore/asobj/flash/text/TextFieldType_as.cpp'
--- a/libcore/asobj/flash/text/TextFieldType_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/TextFieldType_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
/// TextFieldType is an AVM2-only class
=== modified file 'libcore/asobj/flash/text/TextField_as.cpp'
--- a/libcore/asobj/flash/text/TextField_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/text/TextField_as.cpp 2009-11-18 11:24:51 +0000
@@ -56,21 +56,8 @@
as_value textfield_ctor(const fn_call& fn);
void attachTextFieldInterface(as_object& o);
void attachTextFieldStaticInterface(as_object& o);
- as_object* getTextFieldInterface();
-
}
-class TextField_as : public as_object
-{
-
-public:
-
- TextField_as()
- :
- as_object(getTextFieldInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
textfield_class_init(as_object& where, const ObjectURI& uri)
@@ -109,26 +96,12 @@
void
attachTextFieldStaticInterface(as_object& o)
{
- Global_as& gl = getGlobal(o);
-
-}
-
-as_object*
-getTextFieldInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachTextFieldInterface(*o);
- }
- return o.get();
}
as_value
textfield_getCharBoundaries(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -137,8 +110,7 @@
as_value
textfield_getCharIndexAtPoint(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -147,8 +119,7 @@
as_value
textfield_getFirstCharInParagraph(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -157,8 +128,7 @@
as_value
textfield_getImageReference(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -167,8 +137,7 @@
as_value
textfield_getLineIndexAtPoint(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -177,8 +146,7 @@
as_value
textfield_getLineIndexOfChar(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -187,8 +155,7 @@
as_value
textfield_getLineLength(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -197,8 +164,7 @@
as_value
textfield_getLineMetrics(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -207,8 +173,7 @@
as_value
textfield_getLineOffset(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -217,8 +182,7 @@
as_value
textfield_getLineText(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -227,8 +191,7 @@
as_value
textfield_getParagraphLength(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -237,8 +200,7 @@
as_value
textfield_getTextFormat(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -247,8 +209,7 @@
as_value
textfield_replaceSelectedText(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -257,8 +218,7 @@
as_value
textfield_replaceText(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -267,8 +227,7 @@
as_value
textfield_setSelection(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -277,8 +236,7 @@
as_value
textfield_setTextFormat(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -287,8 +245,7 @@
as_value
textfield_change(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -297,8 +254,7 @@
as_value
textfield_link(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -307,8 +263,7 @@
as_value
textfield_scroll(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -317,8 +272,7 @@
as_value
textfield_textInput(const fn_call& fn)
{
- boost::intrusive_ptr<TextField_as> ptr =
- ensureType<TextField_as>(fn.this_ptr);
+ as_object* ptr = ensure<ValidThis>(fn);
UNUSED(ptr);
log_unimpl (__FUNCTION__);
return as_value();
@@ -327,9 +281,7 @@
as_value
textfield_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new TextField_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/text/TextFormatAlign_as.cpp'
--- a/libcore/asobj/flash/text/TextFormatAlign_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/TextFormatAlign_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
/// TextFormatAlign is an AVM2-only class containing constants.
=== renamed file 'libcore/asobj/TextFormat_as.cpp' =>
'libcore/asobj/flash/text/TextFormat_as.cpp'
--- a/libcore/asobj/TextFormat_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/flash/text/TextFormat_as.cpp 2009-11-18 11:51:35
+0000
@@ -18,7 +18,6 @@
//
#include "log.h"
-#include "Object.h" // for getObjectInterface
#include "TextFormat_as.h"
#include "fn_call.h"
#include "Global_as.h"
=== removed file 'libcore/asobj/flash/text/TextFormat_as.cpp'
--- a/libcore/asobj/flash/text/TextFormat_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/TextFormat_as.cpp 1970-01-01 00:00:00
+0000
@@ -1,101 +0,0 @@
-// TextFormat_as.cpp: ActionScript "TextFormat" class, for Gnash.
-//
-// Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-#include "text/TextFormat_as.h"
-#include "log.h"
-#include "fn_call.h"
-#include "Global_as.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "GnashException.h" // for ActionException
-
-namespace gnash {
-
-// Forward declarations
-namespace {
- as_value textformat_ctor(const fn_call& fn);
- void attachTextFormatInterface(as_object& o);
- void attachTextFormatStaticInterface(as_object& o);
- as_object* getTextFormatInterface();
-
-}
-
-class TextFormat_as : public as_object
-{
-
-public:
-
- TextFormat_as()
- :
- as_object(getTextFormatInterface())
- {}
-};
-
-// extern (used by Global.cpp)
-void
-textformat_class_init(as_object& where, const ObjectURI& uri)
-{
- registerBuiltinClass(where, textformat_ctor, attachTextFormatInterface,
- attachTextFormatStaticInterface, uri);
-}
-
-namespace {
-
-void
-attachTextFormatInterface(as_object& /*o*/)
-{
-}
-
-void
-attachTextFormatStaticInterface(as_object& /*o*/)
-{
-
-}
-
-as_object*
-getTextFormatInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachTextFormatInterface(*o);
- }
- return o.get();
-}
-
-as_value
-textformat_ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new TextFormat_as;
-
- return as_value(obj.get()); // will keep alive
-}
-
-} // anonymous namespace
-} // gnash namespace
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
=== renamed file 'libcore/asobj/TextFormat_as.h' =>
'libcore/asobj/flash/text/TextFormat_as.h'
=== removed file 'libcore/asobj/flash/text/TextFormat_as.h'
--- a/libcore/asobj/flash/text/TextFormat_as.h 2009-07-28 11:58:27 +0000
+++ b/libcore/asobj/flash/text/TextFormat_as.h 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-// TextFormat_as.h: ActionScript 3 "TextFormat" class, for Gnash.
-//
-// Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifndef GNASH_ASOBJ3_TEXTFORMAT_H
-#define GNASH_ASOBJ3_TEXTFORMAT_H
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-
-namespace gnash {
-
-// Forward declarations
-class as_object;
-class ObjectURI;
-
-/// Initialize the global TextFormat class
-void textformat_class_init(as_object& where, const ObjectURI& uri);
-
-} // gnash namespace
-
-// GNASH_ASOBJ3_TEXTFORMAT_H
-#endif
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
=== modified file 'libcore/asobj/flash/text/TextLineMetrics_as.cpp'
--- a/libcore/asobj/flash/text/TextLineMetrics_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/text/TextLineMetrics_as.cpp 2009-11-18 10:52:53
+0000
@@ -36,27 +36,15 @@
as_value textlinemetrics_ctor(const fn_call& fn);
void attachTextLineMetricsInterface(as_object& o);
void attachTextLineMetricsStaticInterface(as_object& o);
- as_object* getTextLineMetricsInterface();
-
}
-class TextLineMetrics_as : public as_object
-{
-
-public:
-
- TextLineMetrics_as()
- :
- as_object(getTextLineMetricsInterface())
- {}
-};
-
// extern (used by Global.cpp)
void
textlinemetrics_class_init(as_object& where, const ObjectURI& uri)
{
- registerBuiltinClass(where, textlinemetrics_ctor,
attachTextLineMetricsInterface,
- attachTextLineMetricsStaticInterface, uri);
+ registerBuiltinClass(where, textlinemetrics_ctor,
+ attachTextLineMetricsInterface,
+ attachTextLineMetricsStaticInterface, uri);
}
namespace {
@@ -72,23 +60,10 @@
}
-as_object*
-getTextLineMetricsInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o ) {
- o = new as_object();
- attachTextLineMetricsInterface(*o);
- }
- return o.get();
-}
-
as_value
textlinemetrics_ctor(const fn_call& /*fn*/)
{
- boost::intrusive_ptr<as_object> obj = new TextLineMetrics_as;
-
- return as_value(obj.get()); // will keep alive
+ return as_value();
}
} // anonymous namespace
=== modified file 'libcore/asobj/flash/text/TextRenderer_as.cpp'
--- a/libcore/asobj/flash/text/TextRenderer_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/text/TextRenderer_as.cpp 2009-11-18 11:51:35
+0000
@@ -28,7 +28,6 @@
#include "Global_as.h"
#include "smart_ptr.h"
#include "builtin_function.h"
-#include "Object.h"
#include "VM.h"
#include <sstream>
=== modified file 'libcore/asobj/flash/text/TextSnapshot_as.cpp'
--- a/libcore/asobj/flash/text/TextSnapshot_as.cpp 2009-11-13 12:29:42
+0000
+++ b/libcore/asobj/flash/text/TextSnapshot_as.cpp 2009-11-18 11:51:35
+0000
@@ -31,7 +31,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
#include "NativeFunction.h"
-#include "Object.h" // for getObjectInterface
#include "StaticText.h"
#include "DisplayList.h"
#include "MovieClip.h"
=== modified file 'libcore/asobj/flash/text/text.am'
--- a/libcore/asobj/flash/text/text.am 2009-07-16 11:04:13 +0000
+++ b/libcore/asobj/flash/text/text.am 2009-11-18 10:59:15 +0000
@@ -96,7 +96,7 @@
# FIXME: already exists
if BUILD_TEXTFORMAT_AS3
-# TEXT_SOURCES += asobj/flash/text/TextFormat_as.cpp
+TEXT_SOURCES += asobj/flash/text/TextFormat_as.cpp
TEXT_HEADERS += asobj/flash/text/TextFormat_as.h
endif
=== modified file 'libcore/asobj/flash/text/text_pkg.cpp'
--- a/libcore/asobj/flash/text/text_pkg.cpp 2009-07-16 09:46:59 +0000
+++ b/libcore/asobj/flash/text/text_pkg.cpp 2009-11-18 11:51:35 +0000
@@ -17,13 +17,13 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "Object.h" // for getObjectInterface
#include "as_object.h"
#include "string_table.h"
#include "fn_call.h"
#include "TextRenderer_as.h"
#include "namedStrings.h"
#include "text_pkg.h"
+#include "Global_as.h"
namespace gnash {
@@ -31,8 +31,10 @@
get_flash_text_package(const fn_call& fn)
{
log_debug("Loading flash.text package");
-
- as_object *pkg = new as_object(getObjectInterface());
+
+ Global_as& gl = getGlobal(fn);
+
+ as_object* pkg = gl.createObject();
string_table& st = getStringTable(fn);
const string_table::key global = 0;
=== modified file 'libcore/asobj/flash/ui/ContextMenuItem_as.cpp'
--- a/libcore/asobj/flash/ui/ContextMenuItem_as.cpp 2009-11-16 11:16:48
+0000
+++ b/libcore/asobj/flash/ui/ContextMenuItem_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
-#include "Object.h"
namespace gnash {
=== modified file 'libcore/asobj/flash/ui/ContextMenu_as.cpp'
--- a/libcore/asobj/flash/ui/ContextMenu_as.cpp 2009-11-16 11:16:48 +0000
+++ b/libcore/asobj/flash/ui/ContextMenu_as.cpp 2009-11-18 11:51:35 +0000
@@ -28,7 +28,6 @@
#include "Global_as.h"
#include "smart_ptr.h"
#include "builtin_function.h"
-#include "Object.h"
#include "namedStrings.h"
#include "Array_as.h"
@@ -133,7 +132,7 @@
}
fn_call::Args args;
- as_object* o = ctor->constructInstance(fn.env(), args).get();
+ as_object* o = ctor->constructInstance(fn.env(), args);
if (!o) return as_value();
@@ -159,7 +158,7 @@
as_function* arrayctor = getClassConstructor(fn, "Array");
if (arrayctor) {
fn_call::Args args;
- as_object* arr = arrayctor->constructInstance(fn.env(), args).get();
+ as_object* arr = arrayctor->constructInstance(fn.env(), args);
if (arr) {
as_object* customs;
if (customItems.is_object() &&
=== modified file 'libcore/asobj/flash/ui/Keyboard_as.cpp'
--- a/libcore/asobj/flash/ui/Keyboard_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/flash/ui/Keyboard_as.cpp 2009-11-18 11:51:35 +0000
@@ -30,7 +30,6 @@
#include "VM.h" // for registerNative
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h"
-#include "Object.h"
#include "AsBroadcaster.h" //for initializing self as a broadcaster
#include "namedStrings.h"
#include "GnashKey.h"
=== modified file 'libcore/asobj/flash/ui/Mouse_as.cpp'
--- a/libcore/asobj/flash/ui/Mouse_as.cpp 2009-08-18 10:55:56 +0000
+++ b/libcore/asobj/flash/ui/Mouse_as.cpp 2009-11-18 11:51:35 +0000
@@ -26,7 +26,6 @@
#include "builtin_function.h" // need builtin_function
#include "NativeFunction.h"
#include "VM.h" // for registerNative
-#include "Object.h" // for getObjectInterface
#include "AsBroadcaster.h" // for initializing self as a broadcaster
#include "movie_root.h" // for GUI callback
=== modified file 'libcore/asobj/flash/xml/XMLDocument_as.cpp'
--- a/libcore/asobj/flash/xml/XMLDocument_as.cpp 2009-11-16 11:16:48
+0000
+++ b/libcore/asobj/flash/xml/XMLDocument_as.cpp 2009-11-18 13:05:53
+0000
@@ -36,6 +36,7 @@
#include "StringPredicates.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "GnashException.h" // for ActionException
+#include "Object.h"
#include <string>
#include <sstream>
@@ -82,19 +83,19 @@
XMLDocument_as::XMLDocument_as()
:
- as_object(getXMLInterface()),
_loaded(XML_LOADED_UNDEFINED),
_status(XML_OK)
{
+ set_prototype(getXMLInterface());
}
// Parse the ASCII XML string into an XMLNode tree
XMLDocument_as::XMLDocument_as(const std::string& xml)
:
- as_object(getXMLInterface()),
_loaded(XML_LOADED_UNDEFINED),
_status(XML_OK)
{
+ set_prototype(getXMLInterface());
parseXML(xml);
}
=== modified file 'libcore/asobj/flash/xml/XMLNodeType_as.cpp'
--- a/libcore/asobj/flash/xml/XMLNodeType_as.cpp 2009-08-20 08:57:16
+0000
+++ b/libcore/asobj/flash/xml/XMLNodeType_as.cpp 2009-11-18 11:51:35
+0000
@@ -27,7 +27,6 @@
#include "Global_as.h"
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h"
-#include "Object.h"
/// The flash.xml.XMLNodeType class is AS3 only. It enumerates
/// constants for use in other classes.
=== modified file 'libcore/asobj/flash/xml/XMLNode_as.cpp'
--- a/libcore/asobj/flash/xml/XMLNode_as.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/asobj/flash/xml/XMLNode_as.cpp 2009-11-18 13:05:53 +0000
@@ -23,7 +23,6 @@
#include "xml/XMLNode_as.h"
#include "xml/XMLDocument_as.h"
-#include "Object.h"
#include "VM.h"
#include "log.h"
#include "fn_call.h"
@@ -34,6 +33,7 @@
#include "string_table.h"
#include "PropertyList.h"
#include "Global_as.h"
+#include "Object.h"
#include <boost/bind.hpp>
#include <string>
@@ -80,26 +80,23 @@
}
XMLNode_as::XMLNode_as()
- : as_object(getXMLNodeInterface()),
- _parent(0),
- _attributes(new as_object),
- _type(Element)
+ :
+ _parent(0),
+ _attributes(new as_object),
+ _type(Element)
{
- //log_debug("%s: %p", __PRETTY_FUNCTION__, this);
-#ifdef DEBUG_MEMORY_ALLOCATION
- log_debug(_("\tCreating XMLNode data at %p"), this);
-#endif
+ set_prototype(getXMLNodeInterface());
}
XMLNode_as::XMLNode_as(const XMLNode_as& tpl, bool deep)
:
- as_object(getXMLNodeInterface()),
_parent(0), // _parent is never implicitly copied
_attributes(0),
_name(tpl._name),
_value(tpl._value),
_type(tpl._type)
{
+ set_prototype(getXMLNodeInterface());
// only clone children if in deep mode
if (deep) {
const Children& from=tpl._children;
@@ -452,7 +449,8 @@
{
static boost::intrusive_ptr<as_object> o;
if ( o == NULL ) {
- o = new as_object(getObjectInterface());
+ o = new as_object();
+ o->set_prototype(getObjectInterface());
attachXMLNodeInterface(*o);
}
return o.get();
=== modified file 'libcore/asobj/gen-asclass.pl'
--- a/libcore/asobj/gen-asclass.pl 2009-10-22 14:56:18 +0000
+++ b/libcore/asobj/gen-asclass.pl 2009-11-18 11:51:35 +0000
@@ -243,7 +243,6 @@
#include "smart_ptr.h" // for boost intrusive_ptr
#include "builtin_function.h" // need builtin_function
#include "GnashException.h" // for ActionException
-#include "Object.h" // for AS inheritance
#include "VM.h" // for addStatics
#include <sstream>
=== modified file 'libcore/asobj/int_as.cpp'
--- a/libcore/asobj/int_as.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/asobj/int_as.cpp 2009-11-18 11:51:35 +0000
@@ -20,9 +20,8 @@
#include "smart_ptr.h"
#include "fn_call.h"
#include "Global_as.h"
-#include "as_object.h" // for inheritance
-#include "builtin_function.h" // need builtin_function
-#include "Object.h"
+#include "as_object.h"
+#include "builtin_function.h"
#include "log.h"
@@ -30,62 +29,47 @@
#include <sstream>
namespace gnash {
-class int_as_object : public as_object
+
+class int_as : public Relay
{
-
public:
+ int_as(int32_t v)
+ :
+ _int(v)
+ {}
- int_as_object()
- :
- as_object()
- {
- }
+private:
+ boost::int32_t _int;
};
-static as_value
+as_value
int_ctor(const fn_call& fn)
{
- boost::intrusive_ptr<as_object> obj = new int_as_object();
+ as_object* obj = ensure<ValidThis>(fn);
- if ( fn.nargs )
- {
+ if (fn.nargs) {
LOG_ONCE( log_unimpl("Arguments passed to int() ctor unhandled") );
}
- return as_value(obj.get()); // will keep alive
-}
-
-as_object*
-getintInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o )
- {
- o = new as_object(getObjectInterface());
- }
- return o.get();
-}
-
-// extern (used by Global.cpp)
-void int_class_init(as_object& global, const ObjectURI& uri)
-{
- static boost::intrusive_ptr<as_object> cl;
-
- Global_as& gl = getGlobal(global);
- as_object* proto = getintInterface();
- cl = gl.createClass(&int_ctor, proto);
+ obj->setRelay(new int_as(fn.nargs ? fn.arg(0).to_int() : 0));
+ return as_value();
+}
+
+// Note that this class can be constructed but is not usable!
+//
+// It needs support in as_value first.
+void
+int_class_init(as_object& global, const ObjectURI& uri)
+{
+
+ Global_as& gl = getGlobal(global);
+ as_object* proto = gl.createObject();
+ as_object* cl = gl.createClass(&int_ctor, proto);
// Register _global.DisplayObject
- global.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ global.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
-std::auto_ptr<as_object>
-init_int_instance()
-{
- return std::auto_ptr<as_object>(new int_as_object);
-}
-
-
}
=== modified file 'libcore/swf_function.cpp'
--- a/libcore/swf_function.cpp 2009-11-13 12:29:42 +0000
+++ b/libcore/swf_function.cpp 2009-11-18 11:34:54 +0000
@@ -23,8 +23,7 @@
#include "ActionExec.h" // for operator()
#include "VM.h" // for storing _global in a local register
#include "NativeFunction.h" // for Function constructor
-#include "Object.h" // for getObjectInterface
-#include "Global_as.h" // for getObjectInterface
+#include "Global_as.h"
#include "namedStrings.h"
#include <typeinfo>
=== modified file 'libcore/vm/ASHandlers.cpp'
--- a/libcore/vm/ASHandlers.cpp 2009-11-16 12:42:06 +0000
+++ b/libcore/vm/ASHandlers.cpp 2009-11-18 11:51:35 +0000
@@ -37,7 +37,6 @@
#include "URL.h"
#include "action_buffer.h"
#include "as_object.h"
-#include "Object.h"
#include "drag_state.h"
#include "VM.h" // for getting the root
#include "movie_root.h" // for set_drag_state (ActionStartDragMovie)
@@ -3775,7 +3774,7 @@
for (size_t i = 0; i < nargs; ++i) {
args += env.pop();
}
- return ctor_as_func->constructInstance(env, args).get();
+ return ctor_as_func->constructInstance(env, args);
}
// Common code for GetUrl and GetUrl2. See:
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp 2009-11-16 14:42:56 +0000
+++ b/libcore/vm/Machine.cpp 2009-11-18 11:51:35 +0000
@@ -25,7 +25,6 @@
#include "MultiName.h"
#include "fn_call.h"
#include "abc_function.h"
-#include "Object.h"
#include "VM.h"
#include "Globals.h"
#include "Global_as.h"
=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as 2009-10-13 08:12:25 +0000
+++ b/testsuite/actionscript.all/MovieClip.as 2009-11-18 14:59:48 +0000
@@ -1667,11 +1667,11 @@
check_equals(typeof(_root.transform.colorTransform), 'object');
// TODO: test colorTransform
-xcheck_equals(typeof(_root.transform.concatenatedColorTransform), 'object');
+check_equals(typeof(_root.transform.concatenatedColorTransform), 'object');
// TODO: test concatenatedColorTransform
-xcheck_equals(typeof(_root.transform.concatenatedMatrix), 'object');
-xcheck(_root.transform.concatenatedMatrix instanceOf Matrix);
+check_equals(typeof(_root.transform.concatenatedMatrix), 'object');
+check(_root.transform.concatenatedMatrix instanceOf Matrix);
check_equals(typeof(_root.transform.matrix), 'object');
check(_root.transform.matrix instanceOf Matrix);
=== modified file 'testsuite/actionscript.all/Transform.as'
--- a/testsuite/actionscript.all/Transform.as 2009-09-29 10:10:20 +0000
+++ b/testsuite/actionscript.all/Transform.as 2009-11-18 14:59:48 +0000
@@ -63,14 +63,14 @@
check(t instanceOf Transform);
check(t.matrix instanceOf Matrix);
-xcheck(t.concatenatedMatrix instanceOf Matrix);
+check(t.concatenatedMatrix instanceOf Matrix);
check(t.colorTransform instanceOf ColorTransform);
-xcheck(t.concatenatedColorTransform instanceOf ColorTransform);
+check(t.concatenatedColorTransform instanceOf ColorTransform);
xcheck(t.pixelBounds instanceOf Rectangle);
check_equals(t.matrix.toString(), "(a=1, b=0, c=0, d=1, tx=0, ty=0)");
check_equals(t.colorTransform.toString(), "(redMultiplier=1,
greenMultiplier=1, blueMultiplier=1, alphaMultiplier=1, redOffset=0,
greenOffset=0, blueOffset=0, alphaOffset=0)");
-xcheck_equals(t.concatenatedColorTransform.toString(), "(redMultiplier=1,
greenMultiplier=1, blueMultiplier=1, alphaMultiplier=1, redOffset=0,
greenOffset=0, blueOffset=0, alphaOffset=0)");
+check_equals(t.concatenatedColorTransform.toString(), "(redMultiplier=1,
greenMultiplier=1, blueMultiplier=1, alphaMultiplier=1, redOffset=0,
greenOffset=0, blueOffset=0, alphaOffset=0)");
// These vary slightly with the pp
//check_equals(t.concatenatedMatrix.toString(), "(a=1, b=0, c=0, d=1, tx=0,
ty=0)");
//check_equals(t.pixelBounds.toString(), "(x=-2, y=48, w=804, h=804)");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11636: Drop two constructors of as_object, reducing the number of places that,
Benjamin Wolsey <=