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

Side by Side Diff: src/globals.h

Issue 23414003: Add V8_NOINLINE() and define INLINE()/NO_INLINE() in terms of their V8_*() counterparts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE 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/v8config.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // default constructor, copy constructor and operator= functions. 330 // default constructor, copy constructor and operator= functions.
331 // 331 //
332 // This should be used in the private: declarations for a class 332 // This should be used in the private: declarations for a class
333 // that wants to prevent anyone from instantiating it. This is 333 // that wants to prevent anyone from instantiating it. This is
334 // especially useful for classes containing only static methods. 334 // especially useful for classes containing only static methods.
335 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ 335 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
336 TypeName() V8_DELETE; \ 336 TypeName() V8_DELETE; \
337 DISALLOW_COPY_AND_ASSIGN(TypeName) 337 DISALLOW_COPY_AND_ASSIGN(TypeName)
338 338
339 339
340 // Define used for helping GCC to make better inlining. Don't bother for debug 340 // Newly written code should use V8_INLINE() and V8_NOINLINE() directly.
341 // builds. On GCC 3.4.5 using __attribute__((always_inline)) causes compilation 341 #define INLINE(declarator) V8_INLINE(declarator)
342 // errors in debug build. 342 #define NO_INLINE(declarator) V8_NOINLINE(declarator)
343 #if defined(__GNUC__) && !defined(DEBUG)
344 #if (__GNUC__ >= 4)
345 #define INLINE(header) inline header __attribute__((always_inline))
346 #define NO_INLINE(header) header __attribute__((noinline))
347 #else
348 #define INLINE(header) inline __attribute__((always_inline)) header
349 #define NO_INLINE(header) __attribute__((noinline)) header
350 #endif
351 #elif defined(_MSC_VER) && !defined(DEBUG)
352 #define INLINE(header) __forceinline header
353 #define NO_INLINE(header) header
354 #else
355 #define INLINE(header) inline header
356 #define NO_INLINE(header) header
357 #endif
358 343
359 344
360 // Newly written code should use V8_WARN_UNUSED_RESULT. 345 // Newly written code should use V8_WARN_UNUSED_RESULT.
361 #define MUST_USE_RESULT V8_WARN_UNUSED_RESULT 346 #define MUST_USE_RESULT V8_WARN_UNUSED_RESULT
362 347
363 348
364 // Define DISABLE_ASAN macros. 349 // Define DISABLE_ASAN macros.
365 #if defined(__has_feature) 350 #if defined(__has_feature)
366 #if __has_feature(address_sanitizer) 351 #if __has_feature(address_sanitizer)
367 #define DISABLE_ASAN __attribute__((no_address_safety_analysis)) 352 #define DISABLE_ASAN __attribute__((no_address_safety_analysis))
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // the backend, so both modes are represented by the kStrictMode value. 407 // the backend, so both modes are represented by the kStrictMode value.
423 enum StrictModeFlag { 408 enum StrictModeFlag {
424 kNonStrictMode, 409 kNonStrictMode,
425 kStrictMode 410 kStrictMode
426 }; 411 };
427 412
428 413
429 } } // namespace v8::internal 414 } } // namespace v8::internal
430 415
431 #endif // V8_GLOBALS_H_ 416 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « include/v8config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698