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

Side by Side Diff: src/objects.cc

Issue 23039014: Hook-allocation on bleeding edge (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/serialize.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 elms->set_length(len - to_trim); 2291 elms->set_length(len - to_trim);
2292 2292
2293 // Maintain marking consistency for IncrementalMarking. 2293 // Maintain marking consistency for IncrementalMarking.
2294 if (Marking::IsBlack(Marking::MarkBitFrom(elms))) { 2294 if (Marking::IsBlack(Marking::MarkBitFrom(elms))) {
2295 if (trim_mode == FROM_GC) { 2295 if (trim_mode == FROM_GC) {
2296 MemoryChunk::IncrementLiveBytesFromGC(elms->address(), -size_delta); 2296 MemoryChunk::IncrementLiveBytesFromGC(elms->address(), -size_delta);
2297 } else { 2297 } else {
2298 MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta); 2298 MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta);
2299 } 2299 }
2300 } 2300 }
2301
2302 // This repeating record is necessary because the array may not be moved
2303 // during GC, and size has to be adjusted nevetheless.
2304 heap->isolate()->heap_profiler()->RecordObjectAllocation(
2305 elms->address(), elms->Size());
2301 } 2306 }
2302 2307
2303 2308
2304 bool Map::InstancesNeedRewriting(Map* target, 2309 bool Map::InstancesNeedRewriting(Map* target,
2305 int target_number_of_fields, 2310 int target_number_of_fields,
2306 int target_inobject, 2311 int target_inobject,
2307 int target_unused) { 2312 int target_unused) {
2308 // If fields were added (or removed), rewrite the instance. 2313 // If fields were added (or removed), rewrite the instance.
2309 int number_of_fields = NumberOfFields(); 2314 int number_of_fields = NumberOfFields();
2310 ASSERT(target_number_of_fields >= number_of_fields); 2315 ASSERT(target_number_of_fields >= number_of_fields);
(...skipping 13666 matching lines...) Expand 10 before | Expand all | Expand 10 after
15977 #define ERROR_MESSAGES_TEXTS(C, T) T, 15982 #define ERROR_MESSAGES_TEXTS(C, T) T,
15978 static const char* error_messages_[] = { 15983 static const char* error_messages_[] = {
15979 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 15984 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
15980 }; 15985 };
15981 #undef ERROR_MESSAGES_TEXTS 15986 #undef ERROR_MESSAGES_TEXTS
15982 return error_messages_[reason]; 15987 return error_messages_[reason];
15983 } 15988 }
15984 15989
15985 15990
15986 } } // namespace v8::internal 15991 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698