| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 for (int i = 0; i < deoptimization_literals_.length(); ++i) { | 889 for (int i = 0; i < deoptimization_literals_.length(); ++i) { |
| 890 if (deoptimization_literals_[i].is_identical_to(literal)) return i; | 890 if (deoptimization_literals_[i].is_identical_to(literal)) return i; |
| 891 } | 891 } |
| 892 deoptimization_literals_.Add(literal, zone()); | 892 deoptimization_literals_.Add(literal, zone()); |
| 893 return result; | 893 return result; |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 897 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { |
| 898 DCHECK_EQ(0, deoptimization_literals_.length()); | 898 DCHECK_EQ(0, deoptimization_literals_.length()); |
| 899 const ZoneList<Handle<JSFunction>>* const inlined_closures = | 899 for (auto function : chunk()->inlined_functions()) { |
| 900 chunk()->inlined_closures(); | 900 DefineDeoptimizationLiteral(function); |
| 901 for (int i = 0; i < inlined_closures->length(); ++i) { | |
| 902 DefineDeoptimizationLiteral(handle(inlined_closures->at(i)->shared())); | |
| 903 } | 901 } |
| 904 inlined_function_count_ = deoptimization_literals_.length(); | 902 inlined_function_count_ = deoptimization_literals_.length(); |
| 905 } | 903 } |
| 906 | 904 |
| 907 | 905 |
| 908 void LCodeGen::RecordSafepointWithLazyDeopt(LInstruction* instr, | 906 void LCodeGen::RecordSafepointWithLazyDeopt(LInstruction* instr, |
| 909 SafepointMode safepoint_mode) { | 907 SafepointMode safepoint_mode) { |
| 910 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 908 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
| 911 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 909 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
| 912 } else { | 910 } else { |
| (...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6277 __ Push(scope_info); | 6275 __ Push(scope_info); |
| 6278 __ push(ToRegister(instr->function())); | 6276 __ push(ToRegister(instr->function())); |
| 6279 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6277 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6280 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6278 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6281 } | 6279 } |
| 6282 | 6280 |
| 6283 | 6281 |
| 6284 #undef __ | 6282 #undef __ |
| 6285 } | 6283 } |
| 6286 } // namespace v8::internal | 6284 } // namespace v8::internal |
| OLD | NEW |