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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 class FunctionTemplateInfo; | 296 class FunctionTemplateInfo; |
297 class NumberDictionary; | 297 class NumberDictionary; |
298 class StringDictionary; | 298 class StringDictionary; |
299 class FreeStoreAllocationPolicy; | 299 class FreeStoreAllocationPolicy; |
300 template <typename T> class Handle; | 300 template <typename T> class Handle; |
301 class Heap; | 301 class Heap; |
302 class HeapObject; | 302 class HeapObject; |
303 class IC; | 303 class IC; |
304 class InterceptorInfo; | 304 class InterceptorInfo; |
305 class IterationStatement; | 305 class IterationStatement; |
| 306 class Array; |
306 class JSArray; | 307 class JSArray; |
307 class JSFunction; | 308 class JSFunction; |
308 class JSObject; | 309 class JSObject; |
309 class LargeObjectSpace; | 310 class LargeObjectSpace; |
310 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 311 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
311 class LookupResult; | 312 class LookupResult; |
312 class MacroAssembler; | 313 class MacroAssembler; |
313 class Map; | 314 class Map; |
314 class MapSpace; | 315 class MapSpace; |
315 class MarkCompactCollector; | 316 class MarkCompactCollector; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 // Macros | 537 // Macros |
537 | 538 |
538 // Testers for test. | 539 // Testers for test. |
539 | 540 |
540 #define HAS_SMI_TAG(value) \ | 541 #define HAS_SMI_TAG(value) \ |
541 ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag) | 542 ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag) |
542 | 543 |
543 #define HAS_FAILURE_TAG(value) \ | 544 #define HAS_FAILURE_TAG(value) \ |
544 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag) | 545 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag) |
545 | 546 |
546 // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer | 547 // OBJECT_SIZE_ALIGN returns the value aligned HeapObject size |
547 #define OBJECT_POINTER_ALIGN(value) \ | 548 #define OBJECT_SIZE_ALIGN(value) \ |
548 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) | 549 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) |
549 | 550 |
550 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. | 551 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. |
551 #define POINTER_SIZE_ALIGN(value) \ | 552 #define POINTER_SIZE_ALIGN(value) \ |
552 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) | 553 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) |
553 | 554 |
554 // MAP_POINTER_ALIGN returns the value aligned as a map pointer. | 555 // MAP_SIZE_ALIGN returns the value aligned as a map pointer. |
555 #define MAP_POINTER_ALIGN(value) \ | 556 #define MAP_SIZE_ALIGN(value) \ |
556 (((value) + kMapAlignmentMask) & ~kMapAlignmentMask) | 557 (((value) + kMapAlignmentMask) & ~kMapAlignmentMask) |
557 | 558 |
558 // The expression OFFSET_OF(type, field) computes the byte-offset | 559 // The expression OFFSET_OF(type, field) computes the byte-offset |
559 // of the specified field relative to the containing type. This | 560 // of the specified field relative to the containing type. This |
560 // corresponds to 'offsetof' (in stddef.h), except that it doesn't | 561 // corresponds to 'offsetof' (in stddef.h), except that it doesn't |
561 // use 0 or NULL, which causes a problem with the compiler warnings | 562 // use 0 or NULL, which causes a problem with the compiler warnings |
562 // we have enabled (which is also why 'offsetof' doesn't seem to work). | 563 // we have enabled (which is also why 'offsetof' doesn't seem to work). |
563 // Here we simply use the non-zero value 4, which seems to work. | 564 // Here we simply use the non-zero value 4, which seems to work. |
564 #define OFFSET_OF(type, field) \ | 565 #define OFFSET_OF(type, field) \ |
565 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4) | 566 (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(4)->field)) - 4) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 CMOV = 15, // x86 | 653 CMOV = 15, // x86 |
653 RDTSC = 4, // x86 | 654 RDTSC = 4, // x86 |
654 CPUID = 10, // x86 | 655 CPUID = 10, // x86 |
655 VFP3 = 1, // ARM | 656 VFP3 = 1, // ARM |
656 ARMv7 = 2, // ARM | 657 ARMv7 = 2, // ARM |
657 SAHF = 0}; // x86 | 658 SAHF = 0}; // x86 |
658 | 659 |
659 } } // namespace v8::internal | 660 } } // namespace v8::internal |
660 | 661 |
661 #endif // V8_GLOBALS_H_ | 662 #endif // V8_GLOBALS_H_ |
OLD | NEW |