Commit 5b5cd79a authored by ulan@chromium.org's avatar ulan@chromium.org

Fix kraken/oscillator performance regression after r19635.

Evict previously optimized code after new optimization.

BUG=v8:3202
LOG=N
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/189263009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b27e6d02
......@@ -5430,6 +5430,11 @@ void JSFunction::ReplaceCode(Code* code) {
bool was_optimized = IsOptimized();
bool is_optimized = code->kind() == Code::OPTIMIZED_FUNCTION;
if (was_optimized && is_optimized) {
shared()->EvictFromOptimizedCodeMap(this->code(),
"Replacing with another optimized code");
}
set_code(code);
// Add/remove the function from the list of optimized functions for this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment