OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 isolate->deoptimizer_data()->current_ = deoptimizer; | 99 isolate->deoptimizer_data()->current_ = deoptimizer; |
100 return deoptimizer; | 100 return deoptimizer; |
101 } | 101 } |
102 | 102 |
103 | 103 |
104 // No larger than 2K on all platforms | 104 // No larger than 2K on all platforms |
105 static const int kDeoptTableMaxEpilogueCodeSize = 2 * KB; | 105 static const int kDeoptTableMaxEpilogueCodeSize = 2 * KB; |
106 | 106 |
107 | 107 |
108 size_t Deoptimizer::GetMaxDeoptTableSize() { | 108 size_t Deoptimizer::GetMaxDeoptTableSize() { |
109 size_t entries_size = | 109 int entries_size = |
110 Deoptimizer::kMaxNumberOfEntries * Deoptimizer::table_entry_size_; | 110 Deoptimizer::kMaxNumberOfEntries * Deoptimizer::table_entry_size_; |
111 int page_count = ((kDeoptTableMaxEpilogueCodeSize + entries_size - 1) / | 111 int page_count = ((kDeoptTableMaxEpilogueCodeSize + entries_size - 1) / |
112 OS::CommitPageSize()) + 1; | 112 OS::CommitPageSize()) + 1; |
113 return OS::CommitPageSize() * page_count; | 113 return OS::CommitPageSize() * page_count; |
114 } | 114 } |
115 | 115 |
116 | 116 |
117 Deoptimizer* Deoptimizer::Grab(Isolate* isolate) { | 117 Deoptimizer* Deoptimizer::Grab(Isolate* isolate) { |
118 ASSERT(isolate == Isolate::Current()); | 118 ASSERT(isolate == Isolate::Current()); |
119 Deoptimizer* result = isolate->deoptimizer_data()->current_; | 119 Deoptimizer* result = isolate->deoptimizer_data()->current_; |
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 | 2021 |
2022 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 2022 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
2023 v->VisitPointer(BitCast<Object**>(&function_)); | 2023 v->VisitPointer(BitCast<Object**>(&function_)); |
2024 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 2024 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
2025 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 2025 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
2026 } | 2026 } |
2027 | 2027 |
2028 #endif // ENABLE_DEBUGGER_SUPPORT | 2028 #endif // ENABLE_DEBUGGER_SUPPORT |
2029 | 2029 |
2030 } } // namespace v8::internal | 2030 } } // namespace v8::internal |
OLD | NEW |