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

Side by Side Diff: src/objects.cc

Issue 40083002: Make top and limit field in AllocationInfo private, assert on non-aligned setting of these fields, … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/spaces.h » ('j') | src/spaces.h » ('J')
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 9138 matching lines...) Expand 10 before | Expand all | Expand 10 after
9149 9149
9150 Address start_of_string = string->address(); 9150 Address start_of_string = string->address();
9151 ASSERT_OBJECT_ALIGNED(start_of_string); 9151 ASSERT_OBJECT_ALIGNED(start_of_string);
9152 ASSERT_OBJECT_ALIGNED(start_of_string + new_size); 9152 ASSERT_OBJECT_ALIGNED(start_of_string + new_size);
9153 9153
9154 Heap* heap = string->GetHeap(); 9154 Heap* heap = string->GetHeap();
9155 NewSpace* newspace = heap->new_space(); 9155 NewSpace* newspace = heap->new_space();
9156 if (newspace->Contains(start_of_string) && 9156 if (newspace->Contains(start_of_string) &&
9157 newspace->top() == start_of_string + old_size) { 9157 newspace->top() == start_of_string + old_size) {
9158 // Last allocated object in new space. Simply lower allocation top. 9158 // Last allocated object in new space. Simply lower allocation top.
9159 *(newspace->allocation_top_address()) = start_of_string + new_size; 9159 newspace->set_top(start_of_string + new_size);
9160 } else { 9160 } else {
9161 // Sizes are pointer size aligned, so that we can use filler objects 9161 // Sizes are pointer size aligned, so that we can use filler objects
9162 // that are a multiple of pointer size. 9162 // that are a multiple of pointer size.
9163 heap->CreateFillerObjectAt(start_of_string + new_size, delta); 9163 heap->CreateFillerObjectAt(start_of_string + new_size, delta);
9164 } 9164 }
9165 if (Marking::IsBlack(Marking::MarkBitFrom(start_of_string))) { 9165 if (Marking::IsBlack(Marking::MarkBitFrom(start_of_string))) {
9166 MemoryChunk::IncrementLiveBytesFromMutator(start_of_string, -delta); 9166 MemoryChunk::IncrementLiveBytesFromMutator(start_of_string, -delta);
9167 } 9167 }
9168 9168
9169 9169
(...skipping 7228 matching lines...) Expand 10 before | Expand all | Expand 10 after
16398 #define ERROR_MESSAGES_TEXTS(C, T) T, 16398 #define ERROR_MESSAGES_TEXTS(C, T) T,
16399 static const char* error_messages_[] = { 16399 static const char* error_messages_[] = {
16400 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16400 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16401 }; 16401 };
16402 #undef ERROR_MESSAGES_TEXTS 16402 #undef ERROR_MESSAGES_TEXTS
16403 return error_messages_[reason]; 16403 return error_messages_[reason];
16404 } 16404 }
16405 16405
16406 16406
16407 } } // namespace v8::internal 16407 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/spaces.h » ('j') | src/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698