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

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

Issue 10781033: Insert missing write barrier in sliced string allocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 | « no previous file | test/cctest/test-heap.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 2430
2431 2431
2432 String* SlicedString::parent() { 2432 String* SlicedString::parent() {
2433 return String::cast(READ_FIELD(this, kParentOffset)); 2433 return String::cast(READ_FIELD(this, kParentOffset));
2434 } 2434 }
2435 2435
2436 2436
2437 void SlicedString::set_parent(String* parent) { 2437 void SlicedString::set_parent(String* parent) {
2438 ASSERT(parent->IsSeqString() || parent->IsExternalString()); 2438 ASSERT(parent->IsSeqString() || parent->IsExternalString());
2439 WRITE_FIELD(this, kParentOffset, parent); 2439 WRITE_FIELD(this, kParentOffset, parent);
2440 WriteBarrierMode mode = UPDATE_WRITE_BARRIER;
Michael Starzinger 2012/07/17 12:38:45 Can we pass in the WriteBarrierMode as a parameter
2441 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kParentOffset, parent, mode);
2440 } 2442 }
2441 2443
2442 2444
2443 SMI_ACCESSORS(SlicedString, offset, kOffsetOffset) 2445 SMI_ACCESSORS(SlicedString, offset, kOffsetOffset)
2444 2446
2445 2447
2446 String* ConsString::first() { 2448 String* ConsString::first() {
2447 return String::cast(READ_FIELD(this, kFirstOffset)); 2449 return String::cast(READ_FIELD(this, kFirstOffset));
2448 } 2450 }
2449 2451
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after
5322 #undef WRITE_UINT32_FIELD 5324 #undef WRITE_UINT32_FIELD
5323 #undef READ_SHORT_FIELD 5325 #undef READ_SHORT_FIELD
5324 #undef WRITE_SHORT_FIELD 5326 #undef WRITE_SHORT_FIELD
5325 #undef READ_BYTE_FIELD 5327 #undef READ_BYTE_FIELD
5326 #undef WRITE_BYTE_FIELD 5328 #undef WRITE_BYTE_FIELD
5327 5329
5328 5330
5329 } } // namespace v8::internal 5331 } } // namespace v8::internal
5330 5332
5331 #endif // V8_OBJECTS_INL_H_ 5333 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698