| 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/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 int result = deoptimization_literals_.length(); | 921 int result = deoptimization_literals_.length(); |
| 922 for (int i = 0; i < deoptimization_literals_.length(); ++i) { | 922 for (int i = 0; i < deoptimization_literals_.length(); ++i) { |
| 923 if (deoptimization_literals_[i].is_identical_to(literal)) return i; | 923 if (deoptimization_literals_[i].is_identical_to(literal)) return i; |
| 924 } | 924 } |
| 925 deoptimization_literals_.Add(literal, zone()); | 925 deoptimization_literals_.Add(literal, zone()); |
| 926 return result; | 926 return result; |
| 927 } | 927 } |
| 928 | 928 |
| 929 | 929 |
| 930 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 930 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { |
| 931 DCHECK(deoptimization_literals_.length() == 0); | 931 DCHECK_EQ(0, deoptimization_literals_.length()); |
| 932 | 932 for (auto function : chunk()->inlined_functions()) { |
| 933 const ZoneList<Handle<JSFunction> >* inlined_closures = | 933 DefineDeoptimizationLiteral(function); |
| 934 chunk()->inlined_closures(); | |
| 935 | |
| 936 for (int i = 0, length = inlined_closures->length(); | |
| 937 i < length; | |
| 938 i++) { | |
| 939 DefineDeoptimizationLiteral(inlined_closures->at(i)); | |
| 940 } | 934 } |
| 941 | |
| 942 inlined_function_count_ = deoptimization_literals_.length(); | 935 inlined_function_count_ = deoptimization_literals_.length(); |
| 943 } | 936 } |
| 944 | 937 |
| 945 | 938 |
| 946 void LCodeGen::RecordSafepointWithLazyDeopt( | 939 void LCodeGen::RecordSafepointWithLazyDeopt( |
| 947 LInstruction* instr, SafepointMode safepoint_mode) { | 940 LInstruction* instr, SafepointMode safepoint_mode) { |
| 948 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 941 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
| 949 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 942 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
| 950 } else { | 943 } else { |
| 951 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 944 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| (...skipping 5177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6129 __ li(at, scope_info); | 6122 __ li(at, scope_info); |
| 6130 __ Push(at, ToRegister(instr->function())); | 6123 __ Push(at, ToRegister(instr->function())); |
| 6131 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6124 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6132 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6125 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6133 } | 6126 } |
| 6134 | 6127 |
| 6135 | 6128 |
| 6136 #undef __ | 6129 #undef __ |
| 6137 | 6130 |
| 6138 } } // namespace v8::internal | 6131 } } // namespace v8::internal |
| OLD | NEW |