 Chromium Code Reviews
 Chromium Code Reviews Issue 10103035:
  Share optimized code for closures.  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
    
  
    Issue 10103035:
  Share optimized code for closures.  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/| Index: src/runtime.cc | 
| =================================================================== | 
| --- src/runtime.cc (revision 11527) | 
| +++ src/runtime.cc (working copy) | 
| @@ -8251,8 +8251,12 @@ | 
| PrintF("]\n"); | 
| } | 
| function->ReplaceCode(function->shared()->code()); | 
| + // Flush optimized code cache for this function. | 
| + function->shared()->set_optimized_code_map(Smi::FromInt(0)); | 
| 
Michael Starzinger
2012/05/23 11:16:29
It seems we can hoist that out of the condition.
 
fschneider
2012/06/14 11:08:23
Done.
 | 
| } else { | 
| Deoptimizer::DeoptimizeFunction(*function); | 
| + // Flush optimized code cache for this function. | 
| + function->shared()->set_optimized_code_map(Smi::FromInt(0)); | 
| } | 
| return isolate->heap()->undefined_value(); | 
| } |