OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #define bool __my_bool__ // use 'indirection' to avoid name clashes | 66 #define bool __my_bool__ // use 'indirection' to avoid name clashes |
67 #endif | 67 #endif |
68 | 68 |
69 typedef uint8_t byte; | 69 typedef uint8_t byte; |
70 typedef byte* Address; | 70 typedef byte* Address; |
71 | 71 |
72 // Code-point values in Unicode 4.0 are 21 bits wide. | 72 // Code-point values in Unicode 4.0 are 21 bits wide. |
73 typedef uint16_t uc16; | 73 typedef uint16_t uc16; |
74 typedef signed int uc32; | 74 typedef signed int uc32; |
75 | 75 |
76 #ifndef ARM | 76 #if defined(V8_ARCH_IA32) || defined(V8_ARCH_X64) |
77 #define CAN_READ_UNALIGNED 1 | 77 #define CAN_READ_UNALIGNED 1 |
78 #endif | 78 #endif |
79 | 79 |
80 // ----------------------------------------------------------------------------- | 80 // ----------------------------------------------------------------------------- |
81 // Constants | 81 // Constants |
82 | 82 |
83 const int KB = 1024; | 83 const int KB = 1024; |
84 const int MB = KB * KB; | 84 const int MB = KB * KB; |
85 const int GB = KB * KB * KB; | 85 const int GB = KB * KB * KB; |
86 const int kMaxInt = 0x7FFFFFFF; | 86 const int kMaxInt = 0x7FFFFFFF; |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 505 |
506 Dest dest; | 506 Dest dest; |
507 memcpy(&dest, &source, sizeof(dest)); | 507 memcpy(&dest, &source, sizeof(dest)); |
508 return dest; | 508 return dest; |
509 } | 509 } |
510 | 510 |
511 | 511 |
512 } } // namespace v8::internal | 512 } } // namespace v8::internal |
513 | 513 |
514 #endif // V8_GLOBALS_H_ | 514 #endif // V8_GLOBALS_H_ |
OLD | NEW |