OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/debug.h" | 10 #include "src/debug.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 __ dd(length); | 358 __ dd(length); |
359 for (unsigned i = 0; i < length; ++i) { | 359 for (unsigned i = 0; i < length; ++i) { |
360 __ dd(back_edges_[i].id.ToInt()); | 360 __ dd(back_edges_[i].id.ToInt()); |
361 __ dd(back_edges_[i].pc); | 361 __ dd(back_edges_[i].pc); |
362 __ dd(back_edges_[i].loop_depth); | 362 __ dd(back_edges_[i].loop_depth); |
363 } | 363 } |
364 return offset; | 364 return offset; |
365 } | 365 } |
366 | 366 |
367 | 367 |
368 void FullCodeGenerator::EnsureSlotContainsAllocationSite(int slot) { | 368 void FullCodeGenerator::EnsureSlotContainsAllocationSite( |
| 369 FeedbackVectorSlot slot) { |
369 Handle<FixedArray> vector = FeedbackVector(); | 370 Handle<FixedArray> vector = FeedbackVector(); |
370 if (!vector->get(slot)->IsAllocationSite()) { | 371 if (!vector->get(slot.ToInt())->IsAllocationSite()) { |
371 Handle<AllocationSite> allocation_site = | 372 Handle<AllocationSite> allocation_site = |
372 isolate()->factory()->NewAllocationSite(); | 373 isolate()->factory()->NewAllocationSite(); |
373 vector->set(slot, *allocation_site); | 374 vector->set(slot.ToInt(), *allocation_site); |
374 } | 375 } |
375 } | 376 } |
376 | 377 |
377 | 378 |
378 void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) { | 379 void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) { |
379 // Fill in the deoptimization information. | 380 // Fill in the deoptimization information. |
380 DCHECK(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty()); | 381 DCHECK(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty()); |
381 if (!info_->HasDeoptimizationSupport()) return; | 382 if (!info_->HasDeoptimizationSupport()) return; |
382 int length = bailout_entries_.length(); | 383 int length = bailout_entries_.length(); |
383 Handle<DeoptimizationOutputData> data = | 384 Handle<DeoptimizationOutputData> data = |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 } | 1733 } |
1733 return true; | 1734 return true; |
1734 } | 1735 } |
1735 #endif // DEBUG | 1736 #endif // DEBUG |
1736 | 1737 |
1737 | 1738 |
1738 #undef __ | 1739 #undef __ |
1739 | 1740 |
1740 | 1741 |
1741 } } // namespace v8::internal | 1742 } } // namespace v8::internal |
OLD | NEW |