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

Side by Side Diff: runtime/vm/boolfield.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/vm/block_scheduler.cc ('k') | runtime/vm/boolfield_test.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_VM_BOOLFIELD_H_ 5 #ifndef RUNTIME_VM_BOOLFIELD_H_
6 #define RUNTIME_VM_BOOLFIELD_H_ 6 #define RUNTIME_VM_BOOLFIELD_H_
7 7
8 #include "platform/assert.h"
8 #include "vm/globals.h" 9 #include "vm/globals.h"
9 10
10 namespace dart { 11 namespace dart {
11 12
12 // BoolField is a template for encoding and decoding a bit inside an 13 // BoolField is a template for encoding and decoding a bit inside an
13 // unsigned machine word. 14 // unsigned machine word.
14 template <int position> 15 template <int position>
15 class BoolField { 16 class BoolField {
16 public: 17 public:
17 // Returns a uword with the bool value encoded. 18 // Returns a uword with the bool value encoded.
(...skipping 14 matching lines...) Expand all
32 static uword update(bool value, uword original) { 33 static uword update(bool value, uword original) {
33 ASSERT(position < sizeof(uword)); 34 ASSERT(position < sizeof(uword));
34 const uword mask = 1U << position; 35 const uword mask = 1U << position;
35 return value ? original | mask : original & ~mask; 36 return value ? original | mask : original & ~mask;
36 } 37 }
37 }; 38 };
38 39
39 } // namespace dart 40 } // namespace dart
40 41
41 #endif // RUNTIME_VM_BOOLFIELD_H_ 42 #endif // RUNTIME_VM_BOOLFIELD_H_
OLDNEW
« no previous file with comments | « runtime/vm/block_scheduler.cc ('k') | runtime/vm/boolfield_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698