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

Side by Side Diff: src/heap-inl.h

Issue 8816020: More removal of write barriers and a rename to a less scary name. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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/heap.cc ('k') | src/objects.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // Allocate string. 120 // Allocate string.
121 Object* result; 121 Object* result;
122 { MaybeObject* maybe_result = (size > MaxObjectSizeInPagedSpace()) 122 { MaybeObject* maybe_result = (size > MaxObjectSizeInPagedSpace())
123 ? lo_space_->AllocateRaw(size, NOT_EXECUTABLE) 123 ? lo_space_->AllocateRaw(size, NOT_EXECUTABLE)
124 : old_data_space_->AllocateRaw(size); 124 : old_data_space_->AllocateRaw(size);
125 if (!maybe_result->ToObject(&result)) return maybe_result; 125 if (!maybe_result->ToObject(&result)) return maybe_result;
126 } 126 }
127 127
128 // String maps are all immortal immovable objects. 128 // String maps are all immortal immovable objects.
129 reinterpret_cast<HeapObject*>(result)->set_map_unsafe(map); 129 reinterpret_cast<HeapObject*>(result)->set_map_no_wb(map);
130 // Set length and hash fields of the allocated string. 130 // Set length and hash fields of the allocated string.
131 String* answer = String::cast(result); 131 String* answer = String::cast(result);
132 answer->set_length(str.length()); 132 answer->set_length(str.length());
133 answer->set_hash_field(hash_field); 133 answer->set_hash_field(hash_field);
134 134
135 ASSERT_EQ(size, answer->Size()); 135 ASSERT_EQ(size, answer->Size());
136 136
137 // Fill in the characters. 137 // Fill in the characters.
138 memcpy(answer->address() + SeqAsciiString::kHeaderSize, 138 memcpy(answer->address() + SeqAsciiString::kHeaderSize,
139 str.start(), str.length()); 139 str.start(), str.length());
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 702
703 703
704 Heap* _inline_get_heap_() { 704 Heap* _inline_get_heap_() {
705 return HEAP; 705 return HEAP;
706 } 706 }
707 707
708 708
709 } } // namespace v8::internal 709 } } // namespace v8::internal
710 710
711 #endif // V8_HEAP_INL_H_ 711 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698