gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9644: Only print the current stack w


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9644: Only print the current stack when an opcode has finished executing.
Date: Mon, 27 Oct 2008 13:16:17 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9644
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Mon 2008-10-27 13:16:17 +0800
message:
  Only print the current stack when an opcode has finished executing.
modified:
  libcore/vm/Machine.cpp
  libcore/vm/Machine.h
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2008-10-21 16:58:11 +0000
+++ b/libcore/vm/Machine.cpp    2008-10-27 05:16:17 +0000
@@ -2450,6 +2450,7 @@
        }
        } // end of switch statement
                LOG_DEBUG_AVM("* DONE *");
+               IF_VERBOSE_ACTION(print_stack());
        } // end of AS3 conditional
        else // beginning of !AS3 (this code is AS2)
        {
@@ -2818,13 +2819,11 @@
 void Machine::print_stack(){
 
        std::stringstream ss;
-       ss << "Stack: size=";
-       ss<< mStack.size()<<" Items: ";
+       ss << "Stack: ";
        for(unsigned int i=0;i<mStack.size();++i){
-               as_value value = mStack.value(i);
-               ss << mStack.top(i).toDebugString();
+               if (i!=0) ss << " | ";
+               ss << mStack.value(i).toDebugString();
        }
-//     printf("\n");
        LOG_DEBUG_AVM("%s", ss.str());
 }
 

=== modified file 'libcore/vm/Machine.h'
--- a/libcore/vm/Machine.h      2008-10-10 16:09:32 +0000
+++ b/libcore/vm/Machine.h      2008-10-27 05:16:17 +0000
@@ -281,13 +281,11 @@
        void push_stack(as_value object){
                LOG_DEBUG_AVM("Pushing value %s onto 
stack.",object.toDebugString());
                mStack.push(object);
-               print_stack();
        }
 
        as_value pop_stack(){
                as_value value = mStack.pop();
                LOG_DEBUG_AVM("Poping value %s off the 
stack.",value.toDebugString());
-               print_stack();
                return value;
        }
 


reply via email to

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