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

Side by Side Diff: include/v8config.h

Issue 23723003: Move version macros to public V8 header. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « include/v8.h ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 #elif V8_HAS___ALIGNOF__ 437 #elif V8_HAS___ALIGNOF__
438 # define V8_ALIGNOF(type) __alignof__(type) 438 # define V8_ALIGNOF(type) __alignof__(type)
439 #else 439 #else
440 // Note that alignment of a type within a struct can be less than the 440 // Note that alignment of a type within a struct can be less than the
441 // alignment of the type stand-alone (because of ancient ABIs), so this 441 // alignment of the type stand-alone (because of ancient ABIs), so this
442 // should only be used as a last resort. 442 // should only be used as a last resort.
443 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } 443 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
444 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) 444 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type))
445 #endif 445 #endif
446 446
447
448 // This macro accepts another macro or a string and converts it into a string
449 // after preprocessor argument expansion.
450 // Use like:
451 // #define AGE 42
452 // const gchar* greeting = V8_STRINGIFY(AGE) " today!";
453 #define V8_STRINGIFY(macro_or_string) V8_STRINGIFY_ARG(macro_or_string)
454 #define V8_STRINGIFY_ARG(contents) #contents
455
447 #endif // V8CONFIG_H_ 456 #endif // V8CONFIG_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698