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

Side by Side Diff: runtime/platform/allocation.h

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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
« no previous file with comments | « runtime/platform/address_sanitizer.h ('k') | runtime/platform/assert.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 (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_PLATFORM_ALLOCATION_H_ 5 #ifndef RUNTIME_PLATFORM_ALLOCATION_H_
6 #define RUNTIME_PLATFORM_ALLOCATION_H_ 6 #define RUNTIME_PLATFORM_ALLOCATION_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 // Stack allocated objects subclass from this base class. Objects of this type 12 // Stack allocated objects subclass from this base class. Objects of this type
13 // cannot be allocated on either the C or object heaps. Destructors for objects 13 // cannot be allocated on either the C or object heaps. Destructors for objects
14 // of this type will not be run unless the stack is unwound through normal 14 // of this type will not be run unless the stack is unwound through normal
15 // program control flow. 15 // program control flow.
16 class ValueObject { 16 class ValueObject {
17 public: 17 public:
18 ValueObject() {} 18 ValueObject() {}
19 ~ValueObject() {} 19 ~ValueObject() {}
20 20
21 private: 21 private:
22 DISALLOW_ALLOCATION(); 22 DISALLOW_ALLOCATION();
23 DISALLOW_COPY_AND_ASSIGN(ValueObject); 23 DISALLOW_COPY_AND_ASSIGN(ValueObject);
24 }; 24 };
25 25
26
27 // Static allocated classes only contain static members and can never 26 // Static allocated classes only contain static members and can never
28 // be instantiated in the heap or on the stack. 27 // be instantiated in the heap or on the stack.
29 class AllStatic { 28 class AllStatic {
30 private: 29 private:
31 DISALLOW_ALLOCATION(); 30 DISALLOW_ALLOCATION();
32 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic); 31 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic);
33 }; 32 };
34 33
35 } // namespace dart 34 } // namespace dart
36 35
37 #endif // RUNTIME_PLATFORM_ALLOCATION_H_ 36 #endif // RUNTIME_PLATFORM_ALLOCATION_H_
OLDNEW
« no previous file with comments | « runtime/platform/address_sanitizer.h ('k') | runtime/platform/assert.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698