| 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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 int result = deoptimization_literals_.length(); | 965 int result = deoptimization_literals_.length(); |
| 966 for (int i = 0; i < deoptimization_literals_.length(); ++i) { | 966 for (int i = 0; i < deoptimization_literals_.length(); ++i) { |
| 967 if (deoptimization_literals_[i].is_identical_to(literal)) return i; | 967 if (deoptimization_literals_[i].is_identical_to(literal)) return i; |
| 968 } | 968 } |
| 969 deoptimization_literals_.Add(literal, zone()); | 969 deoptimization_literals_.Add(literal, zone()); |
| 970 return result; | 970 return result; |
| 971 } | 971 } |
| 972 | 972 |
| 973 | 973 |
| 974 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 974 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { |
| 975 DCHECK(deoptimization_literals_.length() == 0); | 975 DCHECK_EQ(0, deoptimization_literals_.length()); |
| 976 | 976 for (auto function : chunk()->inlined_functions()) { |
| 977 const ZoneList<Handle<JSFunction> >* inlined_closures = | 977 DefineDeoptimizationLiteral(function); |
| 978 chunk()->inlined_closures(); | |
| 979 | |
| 980 for (int i = 0, length = inlined_closures->length(); | |
| 981 i < length; | |
| 982 i++) { | |
| 983 DefineDeoptimizationLiteral(inlined_closures->at(i)); | |
| 984 } | 978 } |
| 985 | |
| 986 inlined_function_count_ = deoptimization_literals_.length(); | 979 inlined_function_count_ = deoptimization_literals_.length(); |
| 987 } | 980 } |
| 988 | 981 |
| 989 | 982 |
| 990 void LCodeGen::RecordSafepointWithLazyDeopt( | 983 void LCodeGen::RecordSafepointWithLazyDeopt( |
| 991 LInstruction* instr, SafepointMode safepoint_mode) { | 984 LInstruction* instr, SafepointMode safepoint_mode) { |
| 992 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 985 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
| 993 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 986 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
| 994 } else { | 987 } else { |
| 995 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 988 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| (...skipping 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6019 __ Push(scope_info); | 6012 __ Push(scope_info); |
| 6020 __ push(ToRegister(instr->function())); | 6013 __ push(ToRegister(instr->function())); |
| 6021 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6014 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6022 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6015 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6023 } | 6016 } |
| 6024 | 6017 |
| 6025 | 6018 |
| 6026 #undef __ | 6019 #undef __ |
| 6027 | 6020 |
| 6028 } } // namespace v8::internal | 6021 } } // namespace v8::internal |
| OLD | NEW |