| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 10569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10580 Handle<FixedArray> result; | 10580 Handle<FixedArray> result; |
| 10581 if (number_of_deopt_points == 0) { | 10581 if (number_of_deopt_points == 0) { |
| 10582 result = isolate->factory()->empty_fixed_array(); | 10582 result = isolate->factory()->empty_fixed_array(); |
| 10583 } else { | 10583 } else { |
| 10584 result = isolate->factory()->NewFixedArray( | 10584 result = isolate->factory()->NewFixedArray( |
| 10585 LengthOfFixedArray(number_of_deopt_points), pretenure); | 10585 LengthOfFixedArray(number_of_deopt_points), pretenure); |
| 10586 } | 10586 } |
| 10587 return Handle<DeoptimizationOutputData>::cast(result); | 10587 return Handle<DeoptimizationOutputData>::cast(result); |
| 10588 } | 10588 } |
| 10589 | 10589 |
| 10590 SharedFunctionInfo* DeoptimizationInputData::GetInlinedFunction(int index) { | |
| 10591 if (index == -1) { | |
| 10592 return SharedFunctionInfo::cast(this->SharedFunctionInfo()); | |
| 10593 } else { | |
| 10594 return SharedFunctionInfo::cast(LiteralArray()->get(index)); | |
| 10595 } | |
| 10596 } | |
| 10597 | |
| 10598 const int LiteralsArray::kFeedbackVectorOffset = | 10590 const int LiteralsArray::kFeedbackVectorOffset = |
| 10599 LiteralsArray::OffsetOfElementAt(LiteralsArray::kVectorIndex); | 10591 LiteralsArray::OffsetOfElementAt(LiteralsArray::kVectorIndex); |
| 10600 | 10592 |
| 10601 const int LiteralsArray::kOffsetToFirstLiteral = | 10593 const int LiteralsArray::kOffsetToFirstLiteral = |
| 10602 LiteralsArray::OffsetOfElementAt(LiteralsArray::kFirstLiteralIndex); | 10594 LiteralsArray::OffsetOfElementAt(LiteralsArray::kFirstLiteralIndex); |
| 10603 | 10595 |
| 10604 // static | 10596 // static |
| 10605 Handle<LiteralsArray> LiteralsArray::New(Isolate* isolate, | 10597 Handle<LiteralsArray> LiteralsArray::New(Isolate* isolate, |
| 10606 Handle<TypeFeedbackVector> vector, | 10598 Handle<TypeFeedbackVector> vector, |
| 10607 int number_of_literals, | 10599 int number_of_literals, |
| (...skipping 9825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20433 // depend on this. | 20425 // depend on this. |
| 20434 return DICTIONARY_ELEMENTS; | 20426 return DICTIONARY_ELEMENTS; |
| 20435 } | 20427 } |
| 20436 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20428 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
| 20437 return kind; | 20429 return kind; |
| 20438 } | 20430 } |
| 20439 } | 20431 } |
| 20440 | 20432 |
| 20441 } // namespace internal | 20433 } // namespace internal |
| 20442 } // namespace v8 | 20434 } // namespace v8 |
| OLD | NEW |