| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 int result = deoptimization_literals_.length(); | 932 int result = deoptimization_literals_.length(); |
| 933 for (int i = 0; i < deoptimization_literals_.length(); ++i) { | 933 for (int i = 0; i < deoptimization_literals_.length(); ++i) { |
| 934 if (deoptimization_literals_[i].is_identical_to(literal)) return i; | 934 if (deoptimization_literals_[i].is_identical_to(literal)) return i; |
| 935 } | 935 } |
| 936 deoptimization_literals_.Add(literal, zone()); | 936 deoptimization_literals_.Add(literal, zone()); |
| 937 return result; | 937 return result; |
| 938 } | 938 } |
| 939 | 939 |
| 940 | 940 |
| 941 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 941 void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { |
| 942 DCHECK(deoptimization_literals_.length() == 0); | 942 DCHECK_EQ(0, deoptimization_literals_.length()); |
| 943 | 943 for (auto function : chunk()->inlined_functions()) { |
| 944 const ZoneList<Handle<JSFunction> >* inlined_closures = | 944 DefineDeoptimizationLiteral(function); |
| 945 chunk()->inlined_closures(); | |
| 946 | |
| 947 for (int i = 0, length = inlined_closures->length(); | |
| 948 i < length; | |
| 949 i++) { | |
| 950 DefineDeoptimizationLiteral(inlined_closures->at(i)); | |
| 951 } | 945 } |
| 952 | |
| 953 inlined_function_count_ = deoptimization_literals_.length(); | 946 inlined_function_count_ = deoptimization_literals_.length(); |
| 954 } | 947 } |
| 955 | 948 |
| 956 | 949 |
| 957 void LCodeGen::RecordSafepointWithLazyDeopt( | 950 void LCodeGen::RecordSafepointWithLazyDeopt( |
| 958 LInstruction* instr, SafepointMode safepoint_mode) { | 951 LInstruction* instr, SafepointMode safepoint_mode) { |
| 959 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 952 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
| 960 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 953 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
| 961 } else { | 954 } else { |
| 962 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 955 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| (...skipping 5105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6068 __ li(at, scope_info); | 6061 __ li(at, scope_info); |
| 6069 __ Push(at, ToRegister(instr->function())); | 6062 __ Push(at, ToRegister(instr->function())); |
| 6070 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6063 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6071 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6064 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6072 } | 6065 } |
| 6073 | 6066 |
| 6074 | 6067 |
| 6075 #undef __ | 6068 #undef __ |
| 6076 | 6069 |
| 6077 } } // namespace v8::internal | 6070 } } // namespace v8::internal |
| OLD | NEW |