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

Side by Side Diff: src/globals.h

Issue 23098004: Add FINAL and OVERRIDE macros for C++11 final/override. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/ast.h ('k') | src/ia32/full-codegen-ia32.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 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 #endif 368 #endif
369 #elif defined(_MSC_VER) && !defined(DEBUG) 369 #elif defined(_MSC_VER) && !defined(DEBUG)
370 #define INLINE(header) __forceinline header 370 #define INLINE(header) __forceinline header
371 #define NO_INLINE(header) header 371 #define NO_INLINE(header) header
372 #else 372 #else
373 #define INLINE(header) inline header 373 #define INLINE(header) inline header
374 #define NO_INLINE(header) header 374 #define NO_INLINE(header) header
375 #endif 375 #endif
376 376
377 377
378 // Annotate a virtual method indicating it must be overriding a virtual
379 // method in the parent class.
380 // Use like:
381 // virtual void bar() OVERRIDE;
382 #if __cplusplus >= 201103L
Sven Panne 2013/08/19 12:44:48 Looking at Chrome's base/compiler_specific.h, I th
383 #define OVERRIDE override
384 #else
385 #define OVERRIDE
386 #endif
387
388
389 // Annotate a virtual method indicating that subclasses must not override it,
390 // or annotate a class to indicate that it cannot be subclassed.
391 // Use like:
392 // class B FINAL : public A {};
393 // virtual void bar() FINAL;
394 #if __cplusplus >= 201103L
Sven Panne 2013/08/19 12:44:48 Same here: For MSVC we can fall back to 'sealed',
395 #define FINAL final
396 #else
397 #define FINAL
398 #endif
399
400
378 #if defined(__GNUC__) && __GNUC__ >= 4 401 #if defined(__GNUC__) && __GNUC__ >= 4
379 #define MUST_USE_RESULT __attribute__ ((warn_unused_result)) 402 #define MUST_USE_RESULT __attribute__ ((warn_unused_result))
380 #else 403 #else
381 #define MUST_USE_RESULT 404 #define MUST_USE_RESULT
382 #endif 405 #endif
383 406
384 407
385 // Define DISABLE_ASAN macros. 408 // Define DISABLE_ASAN macros.
386 #if defined(__has_feature) 409 #if defined(__has_feature)
387 #if __has_feature(address_sanitizer) 410 #if __has_feature(address_sanitizer)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // the backend, so both modes are represented by the kStrictMode value. 466 // the backend, so both modes are represented by the kStrictMode value.
444 enum StrictModeFlag { 467 enum StrictModeFlag {
445 kNonStrictMode, 468 kNonStrictMode,
446 kStrictMode 469 kStrictMode
447 }; 470 };
448 471
449 472
450 } } // namespace v8::internal 473 } } // namespace v8::internal
451 474
452 #endif // V8_GLOBALS_H_ 475 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698