History

memory system upgrade (part 1); scope-sensitive cleanup for each return statement; clarified reference counting semantics; function argument release for builtin functions; improved post-function call object cleanup; auto-reference-increment on returned objects from all builtin/imported functions; absyn tree printing for instruction dumping abysn2str(); Machine.refcount() and refcount printing for object references

Ge Wang committed 3 years ago

Commit beef6541 parent 2eec4e717 files · +835 −72Browse files

Showing the changes to src/core/chuck_frame.cpp (1 of 17 files). Show all

Unified · Split

src/core/chuck_frame.cpp+7−2
@@ -100,7 +100,7 @@ void Chuck_Frame::push_scope( ) · 99 unmodified lines
100100 // name: get_scope()
101101 // desc: get current scope (added 1.3.0.0)
102102 //-----------------------------------------------------------------------------
103−void Chuck_Frame::get_scope( vector<Chuck_Local *> & out ) const
103+void Chuck_Frame::get_scope( vector<Chuck_Local *> & out, bool localOnly ) const
104104 {
105105 // sanity
106106 assert( this->stack.size() > 0 );
@@ -111,8 +111,13 @@ void Chuck_Frame::get_scope( vector<Chuck_Local *> & out ) const · 4 unmodified lines
111111 t_CKINT index = this->stack.size() - 1;
112112
113113 // loop
114− while( index >= 0 && this->stack[index] != NULL )
114+ while( index >= 0 )
115115 {
116+ // did we hit a stack boundary (delineated by NULL)
117+ // localOnly option added 1.4.2.1 (ge) -- to get all scope in the frame
118+ if( localOnly && this->stack[index] != NULL )
119+ break;
120+
116121 // last thing
117122 local = stack[index];
118123 // move

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t