OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 class FunctionTemplateInfo; | 278 class FunctionTemplateInfo; |
279 class NumberDictionary; | 279 class NumberDictionary; |
280 class StringDictionary; | 280 class StringDictionary; |
281 class FreeStoreAllocationPolicy; | 281 class FreeStoreAllocationPolicy; |
282 template <typename T> class Handle; | 282 template <typename T> class Handle; |
283 class Heap; | 283 class Heap; |
284 class HeapObject; | 284 class HeapObject; |
285 class IC; | 285 class IC; |
286 class InterceptorInfo; | 286 class InterceptorInfo; |
287 class IterationStatement; | 287 class IterationStatement; |
288 class Array; | |
289 class JSArray; | 288 class JSArray; |
290 class JSFunction; | 289 class JSFunction; |
291 class JSObject; | 290 class JSObject; |
292 class LargeObjectSpace; | 291 class LargeObjectSpace; |
293 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 292 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
294 class LookupResult; | 293 class LookupResult; |
295 class MacroAssembler; | 294 class MacroAssembler; |
296 class Map; | 295 class Map; |
297 class MapSpace; | 296 class MapSpace; |
298 class MarkCompactCollector; | 297 class MarkCompactCollector; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 // Macros | 518 // Macros |
520 | 519 |
521 // Testers for test. | 520 // Testers for test. |
522 | 521 |
523 #define HAS_SMI_TAG(value) \ | 522 #define HAS_SMI_TAG(value) \ |
524 ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag) | 523 ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag) |
525 | 524 |
526 #define HAS_FAILURE_TAG(value) \ | 525 #define HAS_FAILURE_TAG(value) \ |
527 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag) | 526 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag) |
528 | 527 |
529 // OBJECT_SIZE_ALIGN returns the value aligned HeapObject size | 528 // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer |
530 #define OBJECT_SIZE_ALIGN(value) \ | 529 #define OBJECT_POINTER_ALIGN(value) \ |
531 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) | 530 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) |
532 | 531 |
533 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. | 532 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. |
534 #define POINTER_SIZE_ALIGN(value) \ | 533 #define POINTER_SIZE_ALIGN(value) \ |
535 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) | 534 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) |
536 | 535 |
537 // MAP_SIZE_ALIGN returns the value aligned as a map pointer. | 536 // MAP_POINTER_ALIGN returns the value aligned as a map pointer. |
538 #define MAP_SIZE_ALIGN(value) \ | 537 #define MAP_POINTER_ALIGN(value) \ |
539 (((value) + kMapAlignmentMask) & ~kMapAlignmentMask) | 538 (((value) + kMapAlignmentMask) & ~kMapAlignmentMask) |
540 | 539 |
541 // The expression OFFSET_OF(type, field) computes the byte-offset | 540 // The expression OFFSET_OF(type, field) computes the byte-offset |
542 // of the specified field relative to the containing type. This | 541 // of the specified field relative to the containing type. This |
543 // corresponds to 'offsetof' (in stddef.h), except that it doesn't | 542 // corresponds to 'offsetof' (in stddef.h), except that it doesn't |
544 // use 0 or NULL, which causes a problem with the compiler warnings | 543 // use 0 or NULL, which causes a problem with the compiler warnings |
545 // we have enabled (which is also why 'offsetof' doesn't seem to work). | 544 // we have enabled (which is also why 'offsetof' doesn't seem to work). |
546 // Here we simply use the non-zero value 4, which seems to work. | 545 // Here we simply use the non-zero value 4, which seems to work. |
547 #define OFFSET_OF(type, field) \ | 546 #define OFFSET_OF(type, field) \ |
548 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4) | 547 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 CMOV = 15, // x86 | 634 CMOV = 15, // x86 |
636 RDTSC = 4, // x86 | 635 RDTSC = 4, // x86 |
637 CPUID = 10, // x86 | 636 CPUID = 10, // x86 |
638 VFP3 = 1, // ARM | 637 VFP3 = 1, // ARM |
639 ARMv7 = 2, // ARM | 638 ARMv7 = 2, // ARM |
640 SAHF = 0}; // x86 | 639 SAHF = 0}; // x86 |
641 | 640 |
642 } } // namespace v8::internal | 641 } } // namespace v8::internal |
643 | 642 |
644 #endif // V8_GLOBALS_H_ | 643 #endif // V8_GLOBALS_H_ |
OLD | NEW |