OLD | NEW |
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 } | 377 } |
378 code->set_deoptimization_data(*data); | 378 code->set_deoptimization_data(*data); |
379 } | 379 } |
380 | 380 |
381 | 381 |
382 void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 382 void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() { |
383 DCHECK_EQ(0, deoptimization_literals_.length()); | 383 DCHECK_EQ(0, deoptimization_literals_.length()); |
384 for (CompilationInfo::InlinedFunctionHolder& inlined : | 384 for (CompilationInfo::InlinedFunctionHolder& inlined : |
385 info()->inlined_functions()) { | 385 info()->inlined_functions()) { |
386 if (!inlined.shared_info.is_identical_to(info()->shared_info())) { | 386 if (!inlined.shared_info.is_identical_to(info()->shared_info())) { |
387 inlined.RegisterInlinedFunctionId(deoptimization_literals_.length()); | 387 int index = DefineDeoptimizationLiteral(inlined.shared_info); |
388 DefineDeoptimizationLiteral(inlined.shared_info); | 388 inlined.RegisterInlinedFunctionId(index); |
389 } | 389 } |
390 } | 390 } |
391 inlined_function_count_ = deoptimization_literals_.length(); | 391 inlined_function_count_ = deoptimization_literals_.length(); |
392 | 392 |
393 // Define deoptimization literals for all unoptimized code objects of inlined | 393 // Define deoptimization literals for all unoptimized code objects of inlined |
394 // functions. This ensures unoptimized code is kept alive by optimized code. | 394 // functions. This ensures unoptimized code is kept alive by optimized code. |
395 for (const CompilationInfo::InlinedFunctionHolder& inlined : | 395 for (const CompilationInfo::InlinedFunctionHolder& inlined : |
396 info()->inlined_functions()) { | 396 info()->inlined_functions()) { |
397 if (!inlined.shared_info.is_identical_to(info()->shared_info())) { | 397 if (!inlined.shared_info.is_identical_to(info()->shared_info())) { |
398 DefineDeoptimizationLiteral(inlined.inlined_code_object_root); | 398 DefineDeoptimizationLiteral(inlined.inlined_code_object_root); |
399 } | 399 } |
400 } | 400 } |
401 } | 401 } |
402 | 402 |
403 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( | 403 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( |
404 LInstruction* instr, DeoptimizeReason deopt_reason, int deopt_id) { | 404 LInstruction* instr, DeoptimizeReason deopt_reason, int deopt_id) { |
405 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), | 405 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), |
406 deopt_reason, deopt_id); | 406 deopt_reason, deopt_id); |
407 return deopt_info; | 407 return deopt_info; |
408 } | 408 } |
409 | 409 |
410 } // namespace internal | 410 } // namespace internal |
411 } // namespace v8 | 411 } // namespace v8 |
OLD | NEW |