Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: src/runtime.cc

Issue 10103035: Share optimized code for closures. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 8348 matching lines...) Expand 10 before | Expand all | Expand 10 after
8359 if (!has_other_activations) { 8359 if (!has_other_activations) {
8360 if (FLAG_trace_deopt) { 8360 if (FLAG_trace_deopt) {
8361 PrintF("[removing optimized code for: "); 8361 PrintF("[removing optimized code for: ");
8362 function->PrintName(); 8362 function->PrintName();
8363 PrintF("]\n"); 8363 PrintF("]\n");
8364 } 8364 }
8365 function->ReplaceCode(function->shared()->code()); 8365 function->ReplaceCode(function->shared()->code());
8366 } else { 8366 } else {
8367 Deoptimizer::DeoptimizeFunction(*function); 8367 Deoptimizer::DeoptimizeFunction(*function);
8368 } 8368 }
8369 // Flush optimized code cache for this function.
8370 function->shared()->ClearOptimizedCodeMap();
8371
8369 return isolate->heap()->undefined_value(); 8372 return isolate->heap()->undefined_value();
8370 } 8373 }
8371 8374
8372 8375
8373 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyOSR) { 8376 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyOSR) {
8374 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); 8377 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
8375 delete deoptimizer; 8378 delete deoptimizer;
8376 return isolate->heap()->undefined_value(); 8379 return isolate->heap()->undefined_value();
8377 } 8380 }
8378 8381
(...skipping 5216 matching lines...) Expand 10 before | Expand all | Expand 10 after
13595 // Handle last resort GC and make sure to allow future allocations 13598 // Handle last resort GC and make sure to allow future allocations
13596 // to grow the heap without causing GCs (if possible). 13599 // to grow the heap without causing GCs (if possible).
13597 isolate->counters()->gc_last_resort_from_js()->Increment(); 13600 isolate->counters()->gc_last_resort_from_js()->Increment();
13598 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13601 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13599 "Runtime::PerformGC"); 13602 "Runtime::PerformGC");
13600 } 13603 }
13601 } 13604 }
13602 13605
13603 13606
13604 } } // namespace v8::internal 13607 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698