gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9506: Give each function its own loc


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9506: Give each function its own local registers.
Date: Fri, 22 Aug 2008 01:09:23 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9506
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Fri 2008-08-22 01:09:23 +0800
message:
  Give each function its own local registers.
modified:
  libcore/vm/Machine.cpp
  libcore/vm/Machine.h
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2008-08-21 15:15:20 +0000
+++ b/libcore/vm/Machine.cpp    2008-08-21 17:09:23 +0000
@@ -2548,6 +2548,7 @@
 //     mScopeStack.setAllSizes(s.mScopeTotalSize, s.mScopeStackDepth);
        mAsValueScopeStack.setAllSizes(s.mScopeTotalSize, s.mScopeStackDepth);
        mStream = s.mStream;
+       mRegisters = s.mRegisters;
 //     mDefaultXMLNamespace = s.mDefaultXMLNamespace;
 //     mCurrentScope = s.mCurrentScope;
 //     mGlobalReturn = s.mGlobalReturn;
@@ -2570,6 +2571,7 @@
 //     s.mScopeTotalSize = mScopeStack.totalSize();
        s.mStream = mStream;
        s.to_debug_string();
+       s.mRegisters = mRegisters;
 //     s.mDefaultXMLNamespace = mDefaultXMLNamespace;
 //     s.mCurrentScope = mCurrentScope;
 //     s.mGlobalReturn = mGlobalReturn;

=== modified file 'libcore/vm/Machine.h'
--- a/libcore/vm/Machine.h      2008-08-21 05:07:42 +0000
+++ b/libcore/vm/Machine.h      2008-08-21 17:09:23 +0000
@@ -226,6 +226,7 @@
                as_object *mCurrentScope;
                as_value *mGlobalReturn;
                as_object *mThis;
+               std::vector<as_value> mRegisters;
 
        void to_debug_string(){
                LOG_DEBUG_AVM("StackDepth=%u StackTotalSize=%u 
ScopeStackDepth=%u 
ScopeTotalSize=%u",mStackDepth,mStackTotalSize,mScopeStackDepth,mScopeTotalSize);
@@ -347,19 +348,9 @@
 
        void load_function(CodeStream* stream){
                saveState();
-               std::stringstream ss;
-               ss << "Loading function:\n";
-               int length = 0;
-               while(int opcode = stream->read_as3op()){
-                       ss << "0x" << std::hex << opcode << " ";
-                       length ++;
-                       if(length%20 == 0){
-                               ss << "\n";
-                       }
-               }
-               LOG_DEBUG_AVM("%s",ss.str());
-               stream->seekTo(0);
                mStream = stream;
+               mRegisters.clear();
+               mRegisters.resize(8);
        }
 
        void executeCodeblock(CodeStream* stream);


reply via email to

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