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
100// name: get_scope()100// name: get_scope()
101// desc: get current scope (added 1.3.0.0)101// desc: get current scope (added 1.3.0.0)
102//-----------------------------------------------------------------------------102//-----------------------------------------------------------------------------
103void Chuck_Frame::get_scope( vector<Chuck_Local *> & out ) const103void Chuck_Frame::get_scope( vector<Chuck_Local *> & out, bool localOnly ) const
104{104{
105 // sanity105 // sanity
106 assert( this->stack.size() > 0 );106 assert( this->stack.size() > 0 );
@@ -111,8 +111,13 @@ void Chuck_Frame::get_scope( vector<Chuck_Local *> & out ) const · 4 unmodified lines
111 t_CKINT index = this->stack.size() - 1;111 t_CKINT index = this->stack.size() - 1;
112 112
113 // loop113 // loop
114 while( index >= 0 && this->stack[index] != NULL )114 while( index >= 0 )
115 {115 {
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
116 // last thing121 // last thing
117 local = stack[index];122 local = stack[index];
118 // move123 // 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