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

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

Issue 10823254: Remove obsolete SLOT_ADDR macro usages. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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/objects.h ('k') | no next file » | 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 5341 matching lines...) Expand 10 before | Expand all | Expand 10 after
5352 } 5352 }
5353 5353
5354 5354
5355 template<typename StaticVisitor> 5355 template<typename StaticVisitor>
5356 void ExternalTwoByteString::ExternalTwoByteStringIterateBody() { 5356 void ExternalTwoByteString::ExternalTwoByteStringIterateBody() {
5357 typedef v8::String::ExternalStringResource Resource; 5357 typedef v8::String::ExternalStringResource Resource;
5358 StaticVisitor::VisitExternalTwoByteString( 5358 StaticVisitor::VisitExternalTwoByteString(
5359 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); 5359 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)));
5360 } 5360 }
5361 5361
5362 #define SLOT_ADDR(obj, offset) \
5363 reinterpret_cast<Object**>((obj)->address() + offset)
5364 5362
5365 template<int start_offset, int end_offset, int size> 5363 template<int start_offset, int end_offset, int size>
5366 void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody( 5364 void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(
5367 HeapObject* obj, 5365 HeapObject* obj,
5368 ObjectVisitor* v) { 5366 ObjectVisitor* v) {
5369 v->VisitPointers(SLOT_ADDR(obj, start_offset), SLOT_ADDR(obj, end_offset)); 5367 v->VisitPointers(HeapObject::RawField(obj, start_offset),
5368 HeapObject::RawField(obj, end_offset));
5370 } 5369 }
5371 5370
5372 5371
5373 template<int start_offset> 5372 template<int start_offset>
5374 void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj, 5373 void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj,
5375 int object_size, 5374 int object_size,
5376 ObjectVisitor* v) { 5375 ObjectVisitor* v) {
5377 v->VisitPointers(SLOT_ADDR(obj, start_offset), SLOT_ADDR(obj, object_size)); 5376 v->VisitPointers(HeapObject::RawField(obj, start_offset),
5377 HeapObject::RawField(obj, object_size));
5378 } 5378 }
5379 5379
5380 #undef SLOT_ADDR
5381 5380
5382 #undef TYPE_CHECKER 5381 #undef TYPE_CHECKER
5383 #undef CAST_ACCESSOR 5382 #undef CAST_ACCESSOR
5384 #undef INT_ACCESSORS 5383 #undef INT_ACCESSORS
5385 #undef ACCESSORS 5384 #undef ACCESSORS
5386 #undef ACCESSORS_TO_SMI 5385 #undef ACCESSORS_TO_SMI
5387 #undef SMI_ACCESSORS 5386 #undef SMI_ACCESSORS
5388 #undef BOOL_GETTER 5387 #undef BOOL_GETTER
5389 #undef BOOL_ACCESSORS 5388 #undef BOOL_ACCESSORS
5390 #undef FIELD_ADDR 5389 #undef FIELD_ADDR
(...skipping 11 matching lines...) Expand all
5402 #undef WRITE_UINT32_FIELD 5401 #undef WRITE_UINT32_FIELD
5403 #undef READ_SHORT_FIELD 5402 #undef READ_SHORT_FIELD
5404 #undef WRITE_SHORT_FIELD 5403 #undef WRITE_SHORT_FIELD
5405 #undef READ_BYTE_FIELD 5404 #undef READ_BYTE_FIELD
5406 #undef WRITE_BYTE_FIELD 5405 #undef WRITE_BYTE_FIELD
5407 5406
5408 5407
5409 } } // namespace v8::internal 5408 } } // namespace v8::internal
5410 5409
5411 #endif // V8_OBJECTS_INL_H_ 5410 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698