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

Side by Side Diff: runtime/vm/reusable_handles.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/resolver_test.cc ('k') | runtime/vm/ring_buffer_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_REUSABLE_HANDLES_H_ 5 #ifndef RUNTIME_VM_REUSABLE_HANDLES_H_
6 #define RUNTIME_VM_REUSABLE_HANDLES_H_ 6 #define RUNTIME_VM_REUSABLE_HANDLES_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/handles.h" 9 #include "vm/handles.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 12 matching lines...) Expand all
23 // { 23 // {
24 // REUSABLE_ARRAY_HANDLESCOPE(thread); 24 // REUSABLE_ARRAY_HANDLESCOPE(thread);
25 // .... 25 // ....
26 // .... 26 // ....
27 // Array& funcs = reused_array_handle.Handle(); 27 // Array& funcs = reused_array_handle.Handle();
28 // code that uses funcs 28 // code that uses funcs
29 // .... 29 // ....
30 // } 30 // }
31 // 31 //
32 32
33
34 #if defined(DEBUG) 33 #if defined(DEBUG)
35 #define REUSABLE_SCOPE(name) \ 34 #define REUSABLE_SCOPE(name) \
36 class Reusable##name##HandleScope : public ValueObject { \ 35 class Reusable##name##HandleScope : public ValueObject { \
37 public: \ 36 public: \
38 explicit Reusable##name##HandleScope(Thread* thread) : thread_(thread) { \ 37 explicit Reusable##name##HandleScope(Thread* thread) : thread_(thread) { \
39 ASSERT(!thread->reusable_##name##_handle_scope_active()); \ 38 ASSERT(!thread->reusable_##name##_handle_scope_active()); \
40 thread->set_reusable_##name##_handle_scope_active(true); \ 39 thread->set_reusable_##name##_handle_scope_active(true); \
41 } \ 40 } \
42 Reusable##name##HandleScope() : thread_(Thread::Current()) { \ 41 Reusable##name##HandleScope() : thread_(Thread::Current()) { \
43 ASSERT(!thread_->reusable_##name##_handle_scope_active()); \ 42 ASSERT(!thread_->reusable_##name##_handle_scope_active()); \
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #define REUSABLE_STRING_HANDLESCOPE(thread) \ 110 #define REUSABLE_STRING_HANDLESCOPE(thread) \
112 ReusableStringHandleScope reused_string_handle(thread); 111 ReusableStringHandleScope reused_string_handle(thread);
113 #define REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(thread) \ 112 #define REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(thread) \
114 ReusableTypeArgumentsHandleScope reused_type_arguments_handle(thread); 113 ReusableTypeArgumentsHandleScope reused_type_arguments_handle(thread);
115 #define REUSABLE_TYPE_PARAMETER_HANDLESCOPE(thread) \ 114 #define REUSABLE_TYPE_PARAMETER_HANDLESCOPE(thread) \
116 ReusableTypeParameterHandleScope reused_type_parameter(thread); 115 ReusableTypeParameterHandleScope reused_type_parameter(thread);
117 116
118 } // namespace dart 117 } // namespace dart
119 118
120 #endif // RUNTIME_VM_REUSABLE_HANDLES_H_ 119 #endif // RUNTIME_VM_REUSABLE_HANDLES_H_
OLDNEW
« no previous file with comments | « runtime/vm/resolver_test.cc ('k') | runtime/vm/ring_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698