OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 Heap::CopyBlock(target->address(), source->address(), size); | 1211 Heap::CopyBlock(target->address(), source->address(), size); |
1212 | 1212 |
1213 // Set the forwarding address. | 1213 // Set the forwarding address. |
1214 source->set_map_word(MapWord::FromForwardingAddress(target)); | 1214 source->set_map_word(MapWord::FromForwardingAddress(target)); |
1215 | 1215 |
1216 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | 1216 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) |
1217 // Update NewSpace stats if necessary. | 1217 // Update NewSpace stats if necessary. |
1218 RecordCopiedObject(target); | 1218 RecordCopiedObject(target); |
1219 #endif | 1219 #endif |
1220 HEAP_PROFILE(ObjectMoveEvent(source->address(), target->address())); | 1220 HEAP_PROFILE(ObjectMoveEvent(source->address(), target->address())); |
1221 | 1221 #if defined(ENABLE_LOGGING_AND_PROFILING) |
| 1222 if (Logger::is_logging() || CpuProfiler::is_profiling()) { |
| 1223 if (target->IsJSFunction()) { |
| 1224 PROFILE(FunctionMoveEvent(source->address(), target->address())); |
| 1225 PROFILE(FunctionCreateEventFromMove(JSFunction::cast(target), source)); |
| 1226 } |
| 1227 } |
| 1228 #endif |
1222 return target; | 1229 return target; |
1223 } | 1230 } |
1224 | 1231 |
1225 | 1232 |
1226 template<ObjectContents object_contents, SizeRestriction size_restriction> | 1233 template<ObjectContents object_contents, SizeRestriction size_restriction> |
1227 static inline void EvacuateObject(Map* map, | 1234 static inline void EvacuateObject(Map* map, |
1228 HeapObject** slot, | 1235 HeapObject** slot, |
1229 HeapObject* object, | 1236 HeapObject* object, |
1230 int object_size) { | 1237 int object_size) { |
1231 ASSERT((size_restriction != SMALL) || | 1238 ASSERT((size_restriction != SMALL) || |
(...skipping 3737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4969 void ExternalStringTable::TearDown() { | 4976 void ExternalStringTable::TearDown() { |
4970 new_space_strings_.Free(); | 4977 new_space_strings_.Free(); |
4971 old_space_strings_.Free(); | 4978 old_space_strings_.Free(); |
4972 } | 4979 } |
4973 | 4980 |
4974 | 4981 |
4975 List<Object*> ExternalStringTable::new_space_strings_; | 4982 List<Object*> ExternalStringTable::new_space_strings_; |
4976 List<Object*> ExternalStringTable::old_space_strings_; | 4983 List<Object*> ExternalStringTable::old_space_strings_; |
4977 | 4984 |
4978 } } // namespace v8::internal | 4985 } } // namespace v8::internal |
OLD | NEW |