OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 ? Deoptimizer::LAZY | 1088 ? Deoptimizer::LAZY |
1089 : Deoptimizer::EAGER; | 1089 : Deoptimizer::EAGER; |
1090 DeoptimizeIf(cc, environment, bailout_type); | 1090 DeoptimizeIf(cc, environment, bailout_type); |
1091 } | 1091 } |
1092 | 1092 |
1093 | 1093 |
1094 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 1094 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
1095 int length = deoptimizations_.length(); | 1095 int length = deoptimizations_.length(); |
1096 if (length == 0) return; | 1096 if (length == 0) return; |
1097 Handle<DeoptimizationInputData> data = | 1097 Handle<DeoptimizationInputData> data = |
1098 DeoptimizationInputData::New(isolate(), length, 0, TENURED); | 1098 DeoptimizationInputData::New(isolate(), length, TENURED); |
1099 | 1099 |
1100 Handle<ByteArray> translations = | 1100 Handle<ByteArray> translations = |
1101 translations_.CreateByteArray(isolate()->factory()); | 1101 translations_.CreateByteArray(isolate()->factory()); |
1102 data->SetTranslationByteArray(*translations); | 1102 data->SetTranslationByteArray(*translations); |
1103 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 1103 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
1104 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); | 1104 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
1105 if (info_->IsOptimizing()) { | 1105 if (info_->IsOptimizing()) { |
1106 // Reference to shared function info does not change between phases. | 1106 // Reference to shared function info does not change between phases. |
1107 AllowDeferredHandleDereference allow_handle_dereference; | 1107 AllowDeferredHandleDereference allow_handle_dereference; |
1108 data->SetSharedFunctionInfo(*info_->shared_info()); | 1108 data->SetSharedFunctionInfo(*info_->shared_info()); |
(...skipping 4599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5708 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5708 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5709 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5709 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5710 } | 5710 } |
5711 | 5711 |
5712 | 5712 |
5713 #undef __ | 5713 #undef __ |
5714 | 5714 |
5715 } } // namespace v8::internal | 5715 } } // namespace v8::internal |
5716 | 5716 |
5717 #endif // V8_TARGET_ARCH_X87 | 5717 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |