Commit 63a883aa authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Only flush SharedFunctionInfo optimized code cache when necessary

Port r14650 (d045fbd3)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8050d8b0
// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
......@@ -51,14 +52,13 @@ void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList(
ASSERT(function->IsOptimized());
ASSERT(function->FunctionsInFunctionListShareSameCode());
// The optimized code is going to be patched, so we cannot use it
// any more. Play safe and reset the whole cache.
function->shared()->ClearOptimizedCodeMap("deoptimized function");
// Get the optimized code.
Code* code = function->code();
Address code_start_address = code->instruction_start();
// The optimized code is going to be patched, so we cannot use it any more.
function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function");
// Invalidate the relocation information, as it will become invalid by the
// code patching below, and is not needed any more.
code->InvalidateRelocation();
......
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