Fix 'become'
							parent
							
								
									cb6205e9d4
								
							
						
					
					
						commit
						461ddfac1a
					
				| 
						 | 
					@ -3,6 +3,8 @@ sequences tools.test words namespaces layouts classes
 | 
				
			||||||
classes.builtin arrays quotations io.launcher system ;
 | 
					classes.builtin arrays quotations io.launcher system ;
 | 
				
			||||||
IN: memory.tests
 | 
					IN: memory.tests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ ] [ { } { } become ] unit-test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
! LOL
 | 
					! LOL
 | 
				
			||||||
[ ] [
 | 
					[ ] [
 | 
				
			||||||
    vm
 | 
					    vm
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -564,6 +564,8 @@ void primitive_clear_gc_stats(void)
 | 
				
			||||||
	clear_gc_stats();
 | 
						clear_gc_stats();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* classes.tuple uses this to reshape tuples; tools.deploy.shaker uses this
 | 
				
			||||||
 | 
					   to coalesce equal but distinct quotations and wrappers. */
 | 
				
			||||||
void primitive_become(void)
 | 
					void primitive_become(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	F_ARRAY *new_objects = untag_array(dpop());
 | 
						F_ARRAY *new_objects = untag_array(dpop());
 | 
				
			||||||
| 
						 | 
					@ -585,5 +587,9 @@ void primitive_become(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gc();
 | 
						gc();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* If a word's definition quotation was in old_objects and the
 | 
				
			||||||
 | 
						   quotation in new_objects is not compiled, we might leak memory
 | 
				
			||||||
 | 
						   by referencing the old quotation unless we recompile all
 | 
				
			||||||
 | 
						   unoptimized words. */
 | 
				
			||||||
	compile_all_words();
 | 
						compile_all_words();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -532,7 +532,8 @@ void compile_all_words(void)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		F_WORD *word = untag_word(array_nth(untag_array(words),i));
 | 
							F_WORD *word = untag_word(array_nth(untag_array(words),i));
 | 
				
			||||||
		REGISTER_UNTAGGED(word);
 | 
							REGISTER_UNTAGGED(word);
 | 
				
			||||||
		jit_compile_word(word,word->def,false);
 | 
							if(word->optimizedp == F)
 | 
				
			||||||
 | 
								jit_compile_word(word,word->def,false);
 | 
				
			||||||
		UNREGISTER_UNTAGGED(word);
 | 
							UNREGISTER_UNTAGGED(word);
 | 
				
			||||||
		update_word_xt(word);
 | 
							update_word_xt(word);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue