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

Side by Side Diff: src/crankshaft/lithium-codegen.cc

Issue 1490233009: [heap] Make link from optimized code to inlined code explicit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Allow handle deref. Created 5 years 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
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/heap/objects-visiting.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/lithium-codegen.h" 5 #include "src/crankshaft/lithium-codegen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 data->SetArgumentsStackHeight(i, 325 data->SetArgumentsStackHeight(i,
326 Smi::FromInt(env->arguments_stack_height())); 326 Smi::FromInt(env->arguments_stack_height()));
327 data->SetPc(i, Smi::FromInt(env->pc_offset())); 327 data->SetPc(i, Smi::FromInt(env->pc_offset()));
328 } 328 }
329 code->set_deoptimization_data(*data); 329 code->set_deoptimization_data(*data);
330 } 330 }
331 331
332 332
333 void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() { 333 void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() {
334 DCHECK_EQ(0, deoptimization_literals_.length()); 334 DCHECK_EQ(0, deoptimization_literals_.length());
335 for (auto function : chunk()->inlined_functions()) { 335 for (Handle<SharedFunctionInfo> function : chunk()->inlined_functions()) {
336 DefineDeoptimizationLiteral(function); 336 DefineDeoptimizationLiteral(function);
337 } 337 }
338 inlined_function_count_ = deoptimization_literals_.length(); 338 inlined_function_count_ = deoptimization_literals_.length();
339
340 // Define deoptimization literals for all unoptimized code objects of inlined
341 // functions. This ensures unoptimized code is kept alive by optimized code.
342 AllowDeferredHandleDereference allow_shared_function_info_dereference;
343 for (Handle<SharedFunctionInfo> function : chunk()->inlined_functions()) {
344 DefineDeoptimizationLiteral(handle(function->code()));
345 }
339 } 346 }
340 347
341 348
342 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( 349 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo(
343 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) { 350 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) {
344 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), 351 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(),
345 instr->Mnemonic(), deopt_reason); 352 instr->Mnemonic(), deopt_reason);
346 HEnterInlined* enter_inlined = instr->environment()->entry(); 353 HEnterInlined* enter_inlined = instr->environment()->entry();
347 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0; 354 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0;
348 return deopt_info; 355 return deopt_info;
349 } 356 }
350 } // namespace internal 357 } // namespace internal
351 } // namespace v8 358 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698