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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 masm()->CheckVeneerPool(true, true); | 911 masm()->CheckVeneerPool(true, true); |
912 safepoints_.Emit(masm(), GetStackSlotCount()); | 912 safepoints_.Emit(masm(), GetStackSlotCount()); |
913 return !is_aborted(); | 913 return !is_aborted(); |
914 } | 914 } |
915 | 915 |
916 | 916 |
917 void LCodeGen::FinishCode(Handle<Code> code) { | 917 void LCodeGen::FinishCode(Handle<Code> code) { |
918 DCHECK(is_done()); | 918 DCHECK(is_done()); |
919 code->set_stack_slots(GetStackSlotCount()); | 919 code->set_stack_slots(GetStackSlotCount()); |
920 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 920 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
921 if (code->is_optimized_code()) RegisterWeakObjectsInOptimizedCode(code); | |
922 PopulateDeoptimizationData(code); | 921 PopulateDeoptimizationData(code); |
923 } | 922 } |
924 | 923 |
925 | 924 |
926 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 925 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
927 int length = deoptimizations_.length(); | 926 int length = deoptimizations_.length(); |
928 if (length == 0) return; | 927 if (length == 0) return; |
929 | 928 |
930 Handle<DeoptimizationInputData> data = | 929 Handle<DeoptimizationInputData> data = |
931 DeoptimizationInputData::New(isolate(), length, TENURED); | 930 DeoptimizationInputData::New(isolate(), length, TENURED); |
(...skipping 5131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6063 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6062 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6064 __ Push(scope_info); | 6063 __ Push(scope_info); |
6065 __ Push(ToRegister(instr->function())); | 6064 __ Push(ToRegister(instr->function())); |
6066 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6065 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6067 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6066 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6068 } | 6067 } |
6069 | 6068 |
6070 | 6069 |
6071 | 6070 |
6072 } } // namespace v8::internal | 6071 } } // namespace v8::internal |
OLD | NEW |