| 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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 int result = deoptimization_literals_.length(); | 888 int result = deoptimization_literals_.length(); |
| 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(deoptimization_literals_.length() == 0); | 898 DCHECK_EQ(0, deoptimization_literals_.length()); |
| 899 | 899 const ZoneList<Handle<JSFunction>>* const inlined_closures = |
| 900 const ZoneList<Handle<JSFunction> >* inlined_closures = | |
| 901 chunk()->inlined_closures(); | 900 chunk()->inlined_closures(); |
| 902 | 901 for (int i = 0; i < inlined_closures->length(); ++i) { |
| 903 for (int i = 0, length = inlined_closures->length(); i < length; i++) { | 902 DefineDeoptimizationLiteral(handle(inlined_closures->at(i)->shared())); |
| 904 DefineDeoptimizationLiteral(inlined_closures->at(i)); | |
| 905 } | 903 } |
| 906 | |
| 907 inlined_function_count_ = deoptimization_literals_.length(); | 904 inlined_function_count_ = deoptimization_literals_.length(); |
| 908 } | 905 } |
| 909 | 906 |
| 910 | 907 |
| 911 void LCodeGen::RecordSafepointWithLazyDeopt(LInstruction* instr, | 908 void LCodeGen::RecordSafepointWithLazyDeopt(LInstruction* instr, |
| 912 SafepointMode safepoint_mode) { | 909 SafepointMode safepoint_mode) { |
| 913 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 910 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
| 914 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 911 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
| 915 } else { | 912 } else { |
| 916 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 913 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| (...skipping 5363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6280 __ Push(scope_info); | 6277 __ Push(scope_info); |
| 6281 __ push(ToRegister(instr->function())); | 6278 __ push(ToRegister(instr->function())); |
| 6282 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6279 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6283 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6280 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6284 } | 6281 } |
| 6285 | 6282 |
| 6286 | 6283 |
| 6287 #undef __ | 6284 #undef __ |
| 6288 } | 6285 } |
| 6289 } // namespace v8::internal | 6286 } // namespace v8::internal |
| OLD | NEW |