Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: src/serialize.cc

Issue 422001: Fix issue 520: wrap Logger calls into LOG macro (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/v8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 ReadObject(OLD_DATA_SPACE, Heap::old_data_space(), current++); 661 ReadObject(OLD_DATA_SPACE, Heap::old_data_space(), current++);
662 break; 662 break;
663 case OBJECT_SERIALIZATION + OLD_POINTER_SPACE: 663 case OBJECT_SERIALIZATION + OLD_POINTER_SPACE:
664 ReadObject(OLD_POINTER_SPACE, Heap::old_pointer_space(), current++); 664 ReadObject(OLD_POINTER_SPACE, Heap::old_pointer_space(), current++);
665 break; 665 break;
666 case OBJECT_SERIALIZATION + MAP_SPACE: 666 case OBJECT_SERIALIZATION + MAP_SPACE:
667 ReadObject(MAP_SPACE, Heap::map_space(), current++); 667 ReadObject(MAP_SPACE, Heap::map_space(), current++);
668 break; 668 break;
669 case OBJECT_SERIALIZATION + CODE_SPACE: 669 case OBJECT_SERIALIZATION + CODE_SPACE:
670 ReadObject(CODE_SPACE, Heap::code_space(), current++); 670 ReadObject(CODE_SPACE, Heap::code_space(), current++);
671 Logger::LogCodeObject(current[-1]); 671 LOG(LogCodeObject(current[-1]));
672 break; 672 break;
673 case OBJECT_SERIALIZATION + CELL_SPACE: 673 case OBJECT_SERIALIZATION + CELL_SPACE:
674 ReadObject(CELL_SPACE, Heap::cell_space(), current++); 674 ReadObject(CELL_SPACE, Heap::cell_space(), current++);
675 break; 675 break;
676 case OBJECT_SERIALIZATION + kLargeData: 676 case OBJECT_SERIALIZATION + kLargeData:
677 ReadObject(kLargeData, Heap::lo_space(), current++); 677 ReadObject(kLargeData, Heap::lo_space(), current++);
678 break; 678 break;
679 case OBJECT_SERIALIZATION + kLargeCode: 679 case OBJECT_SERIALIZATION + kLargeCode:
680 ReadObject(kLargeCode, Heap::lo_space(), current++); 680 ReadObject(kLargeCode, Heap::lo_space(), current++);
681 Logger::LogCodeObject(current[-1]); 681 LOG(LogCodeObject(current[-1]));
682 break; 682 break;
683 case OBJECT_SERIALIZATION + kLargeFixedArray: 683 case OBJECT_SERIALIZATION + kLargeFixedArray:
684 ReadObject(kLargeFixedArray, Heap::lo_space(), current++); 684 ReadObject(kLargeFixedArray, Heap::lo_space(), current++);
685 break; 685 break;
686 case CODE_OBJECT_SERIALIZATION + kLargeCode: { 686 case CODE_OBJECT_SERIALIZATION + kLargeCode: {
687 Object* new_code_object = NULL; 687 Object* new_code_object = NULL;
688 ReadObject(kLargeCode, Heap::lo_space(), &new_code_object); 688 ReadObject(kLargeCode, Heap::lo_space(), &new_code_object);
689 Code* code_object = reinterpret_cast<Code*>(new_code_object); 689 Code* code_object = reinterpret_cast<Code*>(new_code_object);
690 Logger::LogCodeObject(code_object); 690 LOG(LogCodeObject(code_object));
691 // Setting a branch/call to another code object from code. 691 // Setting a branch/call to another code object from code.
692 Address location_of_branch_data = reinterpret_cast<Address>(current); 692 Address location_of_branch_data = reinterpret_cast<Address>(current);
693 Assembler::set_target_at(location_of_branch_data, 693 Assembler::set_target_at(location_of_branch_data,
694 code_object->instruction_start()); 694 code_object->instruction_start());
695 location_of_branch_data += Assembler::kCallTargetSize; 695 location_of_branch_data += Assembler::kCallTargetSize;
696 current = reinterpret_cast<Object**>(location_of_branch_data); 696 current = reinterpret_cast<Object**>(location_of_branch_data);
697 break; 697 break;
698 } 698 }
699 case CODE_OBJECT_SERIALIZATION + CODE_SPACE: { 699 case CODE_OBJECT_SERIALIZATION + CODE_SPACE: {
700 Object* new_code_object = NULL; 700 Object* new_code_object = NULL;
701 ReadObject(CODE_SPACE, Heap::code_space(), &new_code_object); 701 ReadObject(CODE_SPACE, Heap::code_space(), &new_code_object);
702 Code* code_object = reinterpret_cast<Code*>(new_code_object); 702 Code* code_object = reinterpret_cast<Code*>(new_code_object);
703 Logger::LogCodeObject(code_object); 703 LOG(LogCodeObject(code_object));
704 // Setting a branch/call to another code object from code. 704 // Setting a branch/call to another code object from code.
705 Address location_of_branch_data = reinterpret_cast<Address>(current); 705 Address location_of_branch_data = reinterpret_cast<Address>(current);
706 Assembler::set_target_at(location_of_branch_data, 706 Assembler::set_target_at(location_of_branch_data,
707 code_object->instruction_start()); 707 code_object->instruction_start());
708 location_of_branch_data += Assembler::kCallTargetSize; 708 location_of_branch_data += Assembler::kCallTargetSize;
709 current = reinterpret_cast<Object**>(location_of_branch_data); 709 current = reinterpret_cast<Object**>(location_of_branch_data);
710 break; 710 break;
711 } 711 }
712 ONE_CASE_PER_SPACE(BACKREF_SERIALIZATION) { 712 ONE_CASE_PER_SPACE(BACKREF_SERIALIZATION) {
713 // Write a backreference to an object we unpacked earlier. 713 // Write a backreference to an object we unpacked earlier.
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1154 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1155 } 1155 }
1156 } 1156 }
1157 int allocation_address = fullness_[space]; 1157 int allocation_address = fullness_[space];
1158 fullness_[space] = allocation_address + size; 1158 fullness_[space] = allocation_address + size;
1159 return allocation_address; 1159 return allocation_address;
1160 } 1160 }
1161 1161
1162 1162
1163 } } // namespace v8::internal 1163 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698