[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9449: Added abc_function class for f
From: |
Tom Stellard |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9449: Added abc_function class for functions defined in ABC blocks. |
Date: |
Sun, 10 Aug 2008 23:45:26 +0800 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9449
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Sun 2008-08-10 23:45:26 +0800
message:
Added abc_function class for functions defined in ABC blocks.
added:
libcore/abc_function.cpp
libcore/abc_function.h
modified:
libcore/Makefile.am
=== modified file 'libcore/Makefile.am'
--- a/libcore/Makefile.am 2008-08-05 03:45:40 +0000
+++ b/libcore/Makefile.am 2008-08-10 15:45:26 +0000
@@ -55,6 +55,7 @@
SystemClock.cpp \
as_environment.cpp \
as_function.cpp \
+ abc_function.cpp \
as_object.cpp \
as_value.cpp \
asClass.cpp \
@@ -120,6 +121,7 @@
array.h \
as_environment.h \
as_function.h \
+ abc_function.h \
as_object.h \
as_prop_flags.h \
as_value.h \
=== added file 'libcore/abc_function.cpp'
--- a/libcore/abc_function.cpp 1970-01-01 00:00:00 +0000
+++ b/libcore/abc_function.cpp 2008-08-10 15:45:26 +0000
@@ -0,0 +1,43 @@
+//
+// Copyright (C) 2005, 2006, 2007, 2008 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
+
+#include "log.h"
+#include "abc_function.h"
+#include "fn_call.h"
+
+namespace gnash{
+
+abc_function::abc_function(CodeStream* stream):as_function(){
+ mStream = stream;
+}
+
+// Dispatch.
+as_value
+abc_function::operator()(const fn_call& fn)
+{
+ return as_value();
+}
+
+#ifdef GNASH_USE_GC
+void
+abc_function::markReachableResources() const
+{
+
+}
+#endif // GNASH_USE_GC
+
+}
\ No newline at end of file
=== added file 'libcore/abc_function.h'
--- a/libcore/abc_function.h 1970-01-01 00:00:00 +0000
+++ b/libcore/abc_function.h 2008-08-10 15:45:26 +0000
@@ -0,0 +1,57 @@
+//
+// Copyright (C) 2005, 2006, 2007, 2008 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_ABC_FUNCTION_H__
+#define __GNASH_ABC_FUNCTION_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h" // GNASH_USE_GC
+#endif
+
+#include "as_function.h"
+#include "as_value.h"
+#include "CodeStream.h"
+
+namespace gnash {
+
+/// ABC-defined Function
+class abc_function : public as_function
+{
+
+private:
+ CodeStream* mStream;
+
+public:
+ abc_function(CodeStream* stream);
+
+as_value operator()(const fn_call& fn);
+
+#ifdef GNASH_USE_GC
+ /// Mark reachable resources. Override from as_function.
+ //
+ /// Reachable resources from this object is it's scope stack
+ /// and the prototype.
+ ///
+ virtual void markReachableResources() const;
+#endif // GNASH_USE_GC
+};
+
+
+} // end of gnash namespace
+
+// __GNASH_ABC_FUNCTION_H__
+#endif
- [Gnash-commit] /srv/bzr/gnash/avm2 r9449: Added abc_function class for functions defined in ABC blocks.,
Tom Stellard <=