Commit d00e3225 authored by antonm@chromium.org's avatar antonm@chromium.org

Minor cleanup.

Do not relookup code object and use optimized_code instead
shadowing existing code local.

Review URL: http://codereview.chromium.org/6541020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c52e397d
......@@ -273,7 +273,7 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
// optimizable marker in the code object and optimize anyway. This
// is safe as long as the unoptimized code has deoptimization
// support.
ASSERT(FLAG_always_opt || info->shared_info()->code()->optimizable());
ASSERT(FLAG_always_opt || code->optimizable());
ASSERT(info->shared_info()->has_deoptimization_support());
if (FLAG_trace_hydrogen) {
......@@ -283,8 +283,7 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
}
TypeFeedbackOracle oracle(
Handle<Code>(info->shared_info()->code()),
Handle<Context>(info->closure()->context()->global_context()));
code, Handle<Context>(info->closure()->context()->global_context()));
HGraphBuilder builder(&oracle);
HPhase phase(HPhase::kTotal);
HGraph* graph = builder.CreateGraph(info);
......@@ -294,9 +293,9 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
}
if (graph != NULL && FLAG_build_lithium) {
Handle<Code> code = graph->Compile();
if (!code.is_null()) {
info->SetCode(code);
Handle<Code> optimized_code = graph->Compile();
if (!optimized_code.is_null()) {
info->SetCode(optimized_code);
FinishOptimization(info->closure(), start);
return true;
}
......
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