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

Side by Side Diff: include/v8.h

Issue 4320004: Extract essential type declarations into separate file. (Closed)
Patch Set: Addressed review comments. Created 10 years, 1 month 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
« no previous file with comments | « no previous file | include/v8stdint.h » ('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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-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 20 matching lines...) Expand all
31 * 31 *
32 * This set of documents provides reference material generated from the 32 * This set of documents provides reference material generated from the
33 * V8 header file, include/v8.h. 33 * V8 header file, include/v8.h.
34 * 34 *
35 * For other documentation see http://code.google.com/apis/v8/ 35 * For other documentation see http://code.google.com/apis/v8/
36 */ 36 */
37 37
38 #ifndef V8_H_ 38 #ifndef V8_H_
39 #define V8_H_ 39 #define V8_H_
40 40
41 #include <stdio.h> 41 #include "v8stdint.h"
42 42
43 #ifdef _WIN32 43 #ifdef _WIN32
44 // When compiling on MinGW stdint.h is available.
45 #ifdef __MINGW32__
46 #include <stdint.h>
47 #else // __MINGW32__
48 typedef signed char int8_t;
49 typedef unsigned char uint8_t;
50 typedef short int16_t; // NOLINT
51 typedef unsigned short uint16_t; // NOLINT
52 typedef int int32_t;
53 typedef unsigned int uint32_t;
54 typedef __int64 int64_t;
55 typedef unsigned __int64 uint64_t;
56 // intptr_t and friends are defined in crtdefs.h through stdio.h.
57 #endif // __MINGW32__
58 44
59 // Setup for Windows DLL export/import. When building the V8 DLL the 45 // Setup for Windows DLL export/import. When building the V8 DLL the
60 // BUILDING_V8_SHARED needs to be defined. When building a program which uses 46 // BUILDING_V8_SHARED needs to be defined. When building a program which uses
61 // the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8 47 // the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
62 // static library or building a program which uses the V8 static library neither 48 // static library or building a program which uses the V8 static library neither
63 // BUILDING_V8_SHARED nor USING_V8_SHARED should be defined. 49 // BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
64 #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED) 50 #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
65 #error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\ 51 #error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
66 build configuration to ensure that at most one of these is set 52 build configuration to ensure that at most one of these is set
67 #endif 53 #endif
68 54
69 #ifdef BUILDING_V8_SHARED 55 #ifdef BUILDING_V8_SHARED
70 #define V8EXPORT __declspec(dllexport) 56 #define V8EXPORT __declspec(dllexport)
71 #elif USING_V8_SHARED 57 #elif USING_V8_SHARED
72 #define V8EXPORT __declspec(dllimport) 58 #define V8EXPORT __declspec(dllimport)
73 #else 59 #else
74 #define V8EXPORT 60 #define V8EXPORT
75 #endif // BUILDING_V8_SHARED 61 #endif // BUILDING_V8_SHARED
76 62
77 #else // _WIN32 63 #else // _WIN32
78 64
79 #include <stdint.h>
80
81 // Setup for Linux shared library export. There is no need to distinguish 65 // Setup for Linux shared library export. There is no need to distinguish
82 // between building or using the V8 shared library, but we should not 66 // between building or using the V8 shared library, but we should not
83 // export symbols when we are building a static library. 67 // export symbols when we are building a static library.
84 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED) 68 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
85 #define V8EXPORT __attribute__ ((visibility("default"))) 69 #define V8EXPORT __attribute__ ((visibility("default")))
86 #else // defined(__GNUC__) && (__GNUC__ >= 4) 70 #else // defined(__GNUC__) && (__GNUC__ >= 4)
87 #define V8EXPORT 71 #define V8EXPORT
88 #endif // defined(__GNUC__) && (__GNUC__ >= 4) 72 #endif // defined(__GNUC__) && (__GNUC__ >= 4)
89 73
90 #endif // _WIN32 74 #endif // _WIN32
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 public: 453 public:
470 internal::Object** next; 454 internal::Object** next;
471 internal::Object** limit; 455 internal::Object** limit;
472 int level; 456 int level;
473 457
474 inline void Initialize() { 458 inline void Initialize() {
475 next = limit = NULL; 459 next = limit = NULL;
476 level = 0; 460 level = 0;
477 } 461 }
478 }; 462 };
479 463
480 void Leave(); 464 void Leave();
481 465
482 466
483 internal::Object** prev_next_; 467 internal::Object** prev_next_;
484 internal::Object** prev_limit_; 468 internal::Object** prev_limit_;
485 469
486 // Allow for the active closing of HandleScopes which allows to pass a handle 470 // Allow for the active closing of HandleScopes which allows to pass a handle
487 // from the HandleScope being closed to the next top most HandleScope. 471 // from the HandleScope being closed to the next top most HandleScope.
488 bool is_closed_; 472 bool is_closed_;
489 internal::Object** RawClose(internal::Object** value); 473 internal::Object** RawClose(internal::Object** value);
490 474
491 friend class ImplementationUtilities; 475 friend class ImplementationUtilities;
492 }; 476 };
(...skipping 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after
3747 3731
3748 3732
3749 } // namespace v8 3733 } // namespace v8
3750 3734
3751 3735
3752 #undef V8EXPORT 3736 #undef V8EXPORT
3753 #undef TYPE_CHECK 3737 #undef TYPE_CHECK
3754 3738
3755 3739
3756 #endif // V8_H_ 3740 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8stdint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698