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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 Handle<DeoptimizationInputData> data = | 352 Handle<DeoptimizationInputData> data = |
353 DeoptimizationInputData::New(isolate(), deopt_count, TENURED); | 353 DeoptimizationInputData::New(isolate(), deopt_count, TENURED); |
354 | 354 |
355 Handle<ByteArray> translation_array = | 355 Handle<ByteArray> translation_array = |
356 translations_.CreateByteArray(isolate()->factory()); | 356 translations_.CreateByteArray(isolate()->factory()); |
357 | 357 |
358 data->SetTranslationByteArray(*translation_array); | 358 data->SetTranslationByteArray(*translation_array); |
359 data->SetInlinedFunctionCount( | 359 data->SetInlinedFunctionCount( |
360 Smi::FromInt(static_cast<int>(inlined_function_count_))); | 360 Smi::FromInt(static_cast<int>(inlined_function_count_))); |
361 data->SetOptimizationId(Smi::FromInt(info->optimization_id())); | 361 data->SetOptimizationId(Smi::FromInt(info->optimization_id())); |
362 // TODO(jarin) The following code was copied over from Lithium, not sure | 362 |
363 // whether the scope or the IsOptimizing condition are really needed. | 363 if (info->has_shared_info()) { |
364 if (info->IsOptimizing()) { | |
365 // Reference to shared function info does not change between phases. | |
366 AllowDeferredHandleDereference allow_handle_dereference; | |
367 data->SetSharedFunctionInfo(*info->shared_info()); | 364 data->SetSharedFunctionInfo(*info->shared_info()); |
368 } else { | 365 } else { |
369 data->SetSharedFunctionInfo(Smi::FromInt(0)); | 366 data->SetSharedFunctionInfo(Smi::FromInt(0)); |
370 } | 367 } |
371 | 368 |
372 Handle<FixedArray> literals = isolate()->factory()->NewFixedArray( | 369 Handle<FixedArray> literals = isolate()->factory()->NewFixedArray( |
373 static_cast<int>(deoptimization_literals_.size()), TENURED); | 370 static_cast<int>(deoptimization_literals_.size()), TENURED); |
374 { | 371 { |
375 AllowDeferredHandleDereference copy_handles; | 372 AllowDeferredHandleDereference copy_handles; |
376 for (unsigned i = 0; i < deoptimization_literals_.size(); i++) { | 373 for (unsigned i = 0; i < deoptimization_literals_.size(); i++) { |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 : masm_(gen->masm()), next_(gen->ools_) { | 665 : masm_(gen->masm()), next_(gen->ools_) { |
669 gen->ools_ = this; | 666 gen->ools_ = this; |
670 } | 667 } |
671 | 668 |
672 | 669 |
673 OutOfLineCode::~OutOfLineCode() {} | 670 OutOfLineCode::~OutOfLineCode() {} |
674 | 671 |
675 } // namespace compiler | 672 } // namespace compiler |
676 } // namespace internal | 673 } // namespace internal |
677 } // namespace v8 | 674 } // namespace v8 |
OLD | NEW |