OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 Object** limit, | 690 Object** limit, |
691 int source_space, | 691 int source_space, |
692 Address address) { | 692 Address address) { |
693 while (current < limit) { | 693 while (current < limit) { |
694 int data = source_->Get(); | 694 int data = source_->Get(); |
695 switch (data) { | 695 switch (data) { |
696 #define CASE_STATEMENT(where, how, within, space_number) \ | 696 #define CASE_STATEMENT(where, how, within, space_number) \ |
697 case where + how + within + space_number: \ | 697 case where + how + within + space_number: \ |
698 ASSERT((where & ~kPointedToMask) == 0); \ | 698 ASSERT((where & ~kPointedToMask) == 0); \ |
699 ASSERT((how & ~kHowToCodeMask) == 0); \ | 699 ASSERT((how & ~kHowToCodeMask) == 0); \ |
700 ASSERT((within & ~kWhereToPointMask) == 0); \ | 700 ASSERT((within & ~kWhereToPointMask) == 0); \ |
701 ASSERT((space_number & ~kSpaceMask) == 0); | 701 ASSERT((space_number & ~kSpaceMask) == 0); |
702 | 702 |
703 #define CASE_BODY(where, how, within, space_number_if_any, offset_from_start) \ | 703 #define CASE_BODY(where, how, within, space_number_if_any, offset_from_start) \ |
704 { \ | 704 { \ |
705 bool emit_write_barrier = false; \ | 705 bool emit_write_barrier = false; \ |
706 bool current_was_incremented = false; \ | 706 bool current_was_incremented = false; \ |
707 int space_number = space_number_if_any == kAnyOldSpace ? \ | 707 int space_number = space_number_if_any == kAnyOldSpace ? \ |
708 (data & kSpaceMask) : space_number_if_any; \ | 708 (data & kSpaceMask) : space_number_if_any; \ |
709 if (where == kNewObject && how == kPlain && within == kStartOfObject) {\ | 709 if (where == kNewObject && how == kPlain && within == kStartOfObject) {\ |
710 ASSIGN_DEST_SPACE(space_number) \ | 710 ASSIGN_DEST_SPACE(space_number) \ |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1426 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
1427 } | 1427 } |
1428 } | 1428 } |
1429 int allocation_address = fullness_[space]; | 1429 int allocation_address = fullness_[space]; |
1430 fullness_[space] = allocation_address + size; | 1430 fullness_[space] = allocation_address + size; |
1431 return allocation_address; | 1431 return allocation_address; |
1432 } | 1432 } |
1433 | 1433 |
1434 | 1434 |
1435 } } // namespace v8::internal | 1435 } } // namespace v8::internal |
OLD | NEW |