| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 int result = deoptimization_literals_.length(); | 970 int result = deoptimization_literals_.length(); |
| 971 for (int i = 0; i < deoptimization_literals_.length(); ++i) { | 971 for (int i = 0; i < deoptimization_literals_.length(); ++i) { |
| 972 if (deoptimization_literals_[i].is_identical_to(literal)) return i; | 972 if (deoptimization_literals_[i].is_identical_to(literal)) return i; |
| 973 } | 973 } |
| 974 deoptimization_literals_.Add(literal, zone()); | 974 deoptimization_literals_.Add(literal, zone()); |
| 975 return result; | 975 return result; |
| 976 } | 976 } |
| 977 | 977 |
| 978 | 978 |
| 979 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 979 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { |
| 980 DCHECK(deoptimization_literals_.length() == 0); | 980 DCHECK_EQ(0, deoptimization_literals_.length()); |
| 981 | 981 for (auto function : chunk()->inlined_functions()) { |
| 982 const ZoneList<Handle<JSFunction> >* inlined_closures = | 982 DefineDeoptimizationLiteral(function); |
| 983 chunk()->inlined_closures(); | |
| 984 | |
| 985 for (int i = 0, length = inlined_closures->length(); | |
| 986 i < length; | |
| 987 i++) { | |
| 988 DefineDeoptimizationLiteral(inlined_closures->at(i)); | |
| 989 } | 983 } |
| 990 | |
| 991 inlined_function_count_ = deoptimization_literals_.length(); | 984 inlined_function_count_ = deoptimization_literals_.length(); |
| 992 } | 985 } |
| 993 | 986 |
| 994 | 987 |
| 995 void LCodeGen::RecordSafepointWithLazyDeopt( | 988 void LCodeGen::RecordSafepointWithLazyDeopt( |
| 996 LInstruction* instr, SafepointMode safepoint_mode) { | 989 LInstruction* instr, SafepointMode safepoint_mode) { |
| 997 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 990 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
| 998 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 991 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
| 999 } else { | 992 } else { |
| 1000 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 993 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| (...skipping 4838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5839 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5832 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5840 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5833 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5841 } | 5834 } |
| 5842 | 5835 |
| 5843 | 5836 |
| 5844 #undef __ | 5837 #undef __ |
| 5845 | 5838 |
| 5846 } } // namespace v8::internal | 5839 } } // namespace v8::internal |
| 5847 | 5840 |
| 5848 #endif // V8_TARGET_ARCH_IA32 | 5841 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |