| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 // Copy the content of source to target. | 1100 // Copy the content of source to target. |
| 1101 Heap::CopyBlock(target->address(), source->address(), size); | 1101 Heap::CopyBlock(target->address(), source->address(), size); |
| 1102 | 1102 |
| 1103 // Set the forwarding address. | 1103 // Set the forwarding address. |
| 1104 source->set_map_word(MapWord::FromForwardingAddress(target)); | 1104 source->set_map_word(MapWord::FromForwardingAddress(target)); |
| 1105 | 1105 |
| 1106 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | 1106 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) |
| 1107 // Update NewSpace stats if necessary. | 1107 // Update NewSpace stats if necessary. |
| 1108 RecordCopiedObject(target); | 1108 RecordCopiedObject(target); |
| 1109 #endif | 1109 #endif |
| 1110 HEAP_PROFILE(ObjectMoveEvent(source->address(), target->address())); |
| 1110 | 1111 |
| 1111 return target; | 1112 return target; |
| 1112 } | 1113 } |
| 1113 | 1114 |
| 1114 | 1115 |
| 1115 enum ObjectContents { DATA_OBJECT, POINTER_OBJECT }; | 1116 enum ObjectContents { DATA_OBJECT, POINTER_OBJECT }; |
| 1116 enum SizeRestriction { SMALL, UNKNOWN_SIZE }; | 1117 enum SizeRestriction { SMALL, UNKNOWN_SIZE }; |
| 1117 | 1118 |
| 1118 | 1119 |
| 1119 template<ObjectContents object_contents, SizeRestriction size_restriction> | 1120 template<ObjectContents object_contents, SizeRestriction size_restriction> |
| (...skipping 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4982 void ExternalStringTable::TearDown() { | 4983 void ExternalStringTable::TearDown() { |
| 4983 new_space_strings_.Free(); | 4984 new_space_strings_.Free(); |
| 4984 old_space_strings_.Free(); | 4985 old_space_strings_.Free(); |
| 4985 } | 4986 } |
| 4986 | 4987 |
| 4987 | 4988 |
| 4988 List<Object*> ExternalStringTable::new_space_strings_; | 4989 List<Object*> ExternalStringTable::new_space_strings_; |
| 4989 List<Object*> ExternalStringTable::old_space_strings_; | 4990 List<Object*> ExternalStringTable::old_space_strings_; |
| 4990 | 4991 |
| 4991 } } // namespace v8::internal | 4992 } } // namespace v8::internal |
| OLD | NEW |