| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 int length = deoptimizations_.length(); | 786 int length = deoptimizations_.length(); |
| 787 if (length == 0) return; | 787 if (length == 0) return; |
| 788 Handle<DeoptimizationInputData> data = | 788 Handle<DeoptimizationInputData> data = |
| 789 factory()->NewDeoptimizationInputData(length, TENURED); | 789 factory()->NewDeoptimizationInputData(length, TENURED); |
| 790 | 790 |
| 791 Handle<ByteArray> translations = | 791 Handle<ByteArray> translations = |
| 792 translations_.CreateByteArray(isolate()->factory()); | 792 translations_.CreateByteArray(isolate()->factory()); |
| 793 data->SetTranslationByteArray(*translations); | 793 data->SetTranslationByteArray(*translations); |
| 794 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 794 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 795 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); | 795 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
| 796 if (info_->IsOptimizing()) { |
| 797 // Reference to shared function info does not change between phases. |
| 798 AllowDeferredHandleDereference allow_handle_dereference; |
| 799 data->SetSharedFunctionInfo(*info_->shared_info()); |
| 800 } else { |
| 801 data->SetSharedFunctionInfo(Smi::FromInt(0)); |
| 802 } |
| 796 | 803 |
| 797 Handle<FixedArray> literals = | 804 Handle<FixedArray> literals = |
| 798 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 805 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 799 { AllowDeferredHandleDereference copy_handles; | 806 { AllowDeferredHandleDereference copy_handles; |
| 800 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 807 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 801 literals->set(i, *deoptimization_literals_[i]); | 808 literals->set(i, *deoptimization_literals_[i]); |
| 802 } | 809 } |
| 803 data->SetLiteralArray(*literals); | 810 data->SetLiteralArray(*literals); |
| 804 } | 811 } |
| 805 | 812 |
| (...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5582 FixedArray::kHeaderSize - kPointerSize)); | 5589 FixedArray::kHeaderSize - kPointerSize)); |
| 5583 __ bind(&done); | 5590 __ bind(&done); |
| 5584 } | 5591 } |
| 5585 | 5592 |
| 5586 | 5593 |
| 5587 #undef __ | 5594 #undef __ |
| 5588 | 5595 |
| 5589 } } // namespace v8::internal | 5596 } } // namespace v8::internal |
| 5590 | 5597 |
| 5591 #endif // V8_TARGET_ARCH_X64 | 5598 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |