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

Side by Side Diff: src/globals.h

Issue 7619: - Removed a few indirections by making the two SemiSpaces... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 | src/heap.h » ('j') | src/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 #define HAS_FAILURE_TAG(value) \ 368 #define HAS_FAILURE_TAG(value) \
369 ((reinterpret_cast<int>(value) & kFailureTagMask) == kFailureTag) 369 ((reinterpret_cast<int>(value) & kFailureTagMask) == kFailureTag)
370 370
371 #define HAS_HEAP_OBJECT_TAG(value) \ 371 #define HAS_HEAP_OBJECT_TAG(value) \
372 ((reinterpret_cast<int>(value) & kHeapObjectTagMask) == kHeapObjectTag) 372 ((reinterpret_cast<int>(value) & kHeapObjectTagMask) == kHeapObjectTag)
373 373
374 // OBJECT_SIZE_ALIGN returns the value aligned HeapObject size 374 // OBJECT_SIZE_ALIGN returns the value aligned HeapObject size
375 #define OBJECT_SIZE_ALIGN(value) \ 375 #define OBJECT_SIZE_ALIGN(value) \
376 ((value + kObjectAlignmentMask) & ~kObjectAlignmentMask) 376 ((value + kObjectAlignmentMask) & ~kObjectAlignmentMask)
377 377
378
379 // The expression OFFSET_OF(type, field) computes the byte-offset 378 // The expression OFFSET_OF(type, field) computes the byte-offset
380 // of the specified field relative to the containing type. This 379 // of the specified field relative to the containing type. This
381 // corresponds to 'offsetof' (in stddef.h), except that it doesn't 380 // corresponds to 'offsetof' (in stddef.h), except that it doesn't
382 // use 0 or NULL, which causes a problem with the compiler warnings 381 // use 0 or NULL, which causes a problem with the compiler warnings
383 // we have enabled (which is also why 'offsetof' doesn't seem to work). 382 // we have enabled (which is also why 'offsetof' doesn't seem to work).
384 // Here we simply use the non-zero value 4, which seems to work. 383 // Here we simply use the non-zero value 4, which seems to work.
385 #define OFFSET_OF(type, field) \ 384 #define OFFSET_OF(type, field) \
386 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4) 385 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4)
387 386
388 387
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 494
496 Dest dest; 495 Dest dest;
497 memcpy(&dest, &source, sizeof(dest)); 496 memcpy(&dest, &source, sizeof(dest));
498 return dest; 497 return dest;
499 } 498 }
500 499
501 500
502 } } // namespace v8::internal 501 } } // namespace v8::internal
503 502
504 #endif // V8_GLOBALS_H_ 503 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698