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

Side by Side Diff: runtime/lib/profiler.cc

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/lib/object.cc ('k') | runtime/lib/regexp.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
11 #include "vm/object.h" 11 #include "vm/object.h"
12 #include "vm/object_store.h" 12 #include "vm/object_store.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 DECLARE_FLAG(bool, trace_intrinsified_natives); 16 DECLARE_FLAG(bool, trace_intrinsified_natives);
17 17
18 // Native implementations of the profiler parts of the dart:developer library. 18 // Native implementations of the profiler parts of the dart:developer library.
19 19
20 DEFINE_NATIVE_ENTRY(UserTag_new, 2) { 20 DEFINE_NATIVE_ENTRY(UserTag_new, 2) {
21 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull()); 21 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull());
22 GET_NON_NULL_NATIVE_ARGUMENT(String, tag_label, arguments->NativeArgAt(1)); 22 GET_NON_NULL_NATIVE_ARGUMENT(String, tag_label, arguments->NativeArgAt(1));
23 return UserTag::New(tag_label); 23 return UserTag::New(tag_label);
24 } 24 }
25 25
26
27 DEFINE_NATIVE_ENTRY(UserTag_label, 1) { 26 DEFINE_NATIVE_ENTRY(UserTag_label, 1) {
28 const UserTag& self = UserTag::CheckedHandle(arguments->NativeArgAt(0)); 27 const UserTag& self = UserTag::CheckedHandle(arguments->NativeArgAt(0));
29 return self.label(); 28 return self.label();
30 } 29 }
31 30
32
33 DEFINE_NATIVE_ENTRY(UserTag_makeCurrent, 1) { 31 DEFINE_NATIVE_ENTRY(UserTag_makeCurrent, 1) {
34 const UserTag& self = UserTag::CheckedHandle(arguments->NativeArgAt(0)); 32 const UserTag& self = UserTag::CheckedHandle(arguments->NativeArgAt(0));
35 if (FLAG_trace_intrinsified_natives) { 33 if (FLAG_trace_intrinsified_natives) {
36 OS::Print("UserTag_makeCurrent: %s\n", self.ToCString()); 34 OS::Print("UserTag_makeCurrent: %s\n", self.ToCString());
37 } 35 }
38 const UserTag& old = UserTag::Handle(isolate->current_tag()); 36 const UserTag& old = UserTag::Handle(isolate->current_tag());
39 self.MakeActive(); 37 self.MakeActive();
40 return old.raw(); 38 return old.raw();
41 } 39 }
42 40
43
44 DEFINE_NATIVE_ENTRY(UserTag_defaultTag, 0) { 41 DEFINE_NATIVE_ENTRY(UserTag_defaultTag, 0) {
45 if (FLAG_trace_intrinsified_natives) { 42 if (FLAG_trace_intrinsified_natives) {
46 OS::Print("UserTag_defaultTag\n"); 43 OS::Print("UserTag_defaultTag\n");
47 } 44 }
48 return isolate->default_tag(); 45 return isolate->default_tag();
49 } 46 }
50 47
51
52 DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) { 48 DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) {
53 if (FLAG_trace_intrinsified_natives) { 49 if (FLAG_trace_intrinsified_natives) {
54 OS::Print("Profiler_getCurrentTag\n"); 50 OS::Print("Profiler_getCurrentTag\n");
55 } 51 }
56 return isolate->current_tag(); 52 return isolate->current_tag();
57 } 53 }
58 54
59
60 } // namespace dart 55 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/lib/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698