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

Side by Side Diff: src/utils.h

Issue 3412038: More changes to 32/64 bit correctness. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | « src/log.cc ('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 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // Hash function. 217 // Hash function.
218 218
219 uint32_t ComputeIntegerHash(uint32_t key); 219 uint32_t ComputeIntegerHash(uint32_t key);
220 220
221 221
222 // ---------------------------------------------------------------------------- 222 // ----------------------------------------------------------------------------
223 // I/O support. 223 // I/O support.
224 224
225 #if __GNUC__ >= 4 225 #if __GNUC__ >= 4
226 // On gcc we can ask the compiler to check the types of %d-style format 226 // On gcc we can ask the compiler to check the types of %d-style format
227 // specifiers and their associated arguments. 227 // specifiers and their associated arguments. TODO(erikcorry) fix this
228 // so it works on MacOSX.
229 #if defined(__MACH__) && defined(__APPLE__)
230 #define PRINTF_CHECKING
231 #else // MacOsX.
228 #define PRINTF_CHECKING __attribute__ ((format (printf, 1, 2))) 232 #define PRINTF_CHECKING __attribute__ ((format (printf, 1, 2)))
233 #endif
229 #else 234 #else
230 #define PRINTF_CHECKING 235 #define PRINTF_CHECKING
231 #endif 236 #endif
232 237
233 // Our version of printf(). Avoids compilation errors that we get 238 // Our version of printf().
234 // with standard printf when attempting to print pointers, etc.
235 // (the errors are due to the extra compilation flags, which we
236 // want elsewhere).
237 void PRINTF_CHECKING PrintF(const char* format, ...); 239 void PRINTF_CHECKING PrintF(const char* format, ...);
238 240
239 // Our version of fflush. 241 // Our version of fflush.
240 void Flush(); 242 void Flush();
241 243
242 244
243 // Read a line of characters after printing the prompt to stdout. The resulting 245 // Read a line of characters after printing the prompt to stdout. The resulting
244 // char* needs to be disposed off with DeleteArray by the caller. 246 // char* needs to be disposed off with DeleteArray by the caller.
245 char* ReadLine(const char* prompt); 247 char* ReadLine(const char* prompt);
246 248
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 } 963 }
962 964
963 template <class Dest, class Source> 965 template <class Dest, class Source>
964 inline Dest BitCast(Source* source) { 966 inline Dest BitCast(Source* source) {
965 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); 967 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
966 } 968 }
967 969
968 } } // namespace v8::internal 970 } } // namespace v8::internal
969 971
970 #endif // V8_UTILS_H_ 972 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698