| 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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1437  |  1437  | 
|  1438   // Mark this object as already serialized. |  1438   // Mark this object as already serialized. | 
|  1439   bool start_new_page; |  1439   bool start_new_page; | 
|  1440   int offset = serializer_->Allocate(space, size, &start_new_page); |  1440   int offset = serializer_->Allocate(space, size, &start_new_page); | 
|  1441   serializer_->address_mapper()->AddMapping(object_, offset); |  1441   serializer_->address_mapper()->AddMapping(object_, offset); | 
|  1442   if (start_new_page) { |  1442   if (start_new_page) { | 
|  1443     sink_->Put(kNewPage, "NewPage"); |  1443     sink_->Put(kNewPage, "NewPage"); | 
|  1444     sink_->PutSection(space, "NewPageSpace"); |  1444     sink_->PutSection(space, "NewPageSpace"); | 
|  1445   } |  1445   } | 
|  1446  |  1446  | 
|  1447   if (object_->IsNaN()) Assembler::QuietNaN(object_); |  | 
|  1448  |  | 
|  1449   // Serialize the map (first word of the object). |  1447   // Serialize the map (first word of the object). | 
|  1450   serializer_->SerializeObject(object_->map(), kPlain, kStartOfObject); |  1448   serializer_->SerializeObject(object_->map(), kPlain, kStartOfObject); | 
|  1451  |  1449  | 
|  1452   // Serialize the rest of the object. |  1450   // Serialize the rest of the object. | 
|  1453   CHECK_EQ(0, bytes_processed_so_far_); |  1451   CHECK_EQ(0, bytes_processed_so_far_); | 
|  1454   bytes_processed_so_far_ = kPointerSize; |  1452   bytes_processed_so_far_ = kPointerSize; | 
|  1455   object_->IterateBody(object_->map()->instance_type(), size, this); |  1453   object_->IterateBody(object_->map()->instance_type(), size, this); | 
|  1456   OutputRawData(object_->address() + size); |  1454   OutputRawData(object_->address() + size); | 
|  1457 } |  1455 } | 
|  1458  |  1456  | 
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1701 int Serializer::SpaceAreaSize(int space) { |  1699 int Serializer::SpaceAreaSize(int space) { | 
|  1702   if (space == CODE_SPACE) { |  1700   if (space == CODE_SPACE) { | 
|  1703     return isolate_->memory_allocator()->CodePageAreaSize(); |  1701     return isolate_->memory_allocator()->CodePageAreaSize(); | 
|  1704   } else { |  1702   } else { | 
|  1705     return Page::kPageSize - Page::kObjectStartOffset; |  1703     return Page::kPageSize - Page::kObjectStartOffset; | 
|  1706   } |  1704   } | 
|  1707 } |  1705 } | 
|  1708  |  1706  | 
|  1709  |  1707  | 
|  1710 } }  // namespace v8::internal |  1708 } }  // namespace v8::internal | 
| OLD | NEW |