OLD | NEW |
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 // dart:profiler. | 18 // Native implementations for 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 | 26 |
27 DEFINE_NATIVE_ENTRY(UserTag_label, 1) { | 27 DEFINE_NATIVE_ENTRY(UserTag_label, 1) { |
28 const UserTag& self = UserTag::CheckedHandle(arguments->NativeArgAt(0)); | 28 const UserTag& self = UserTag::CheckedHandle(arguments->NativeArgAt(0)); |
(...skipping 22 matching lines...) Expand all Loading... |
51 | 51 |
52 DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) { | 52 DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) { |
53 if (FLAG_trace_intrinsified_natives) { | 53 if (FLAG_trace_intrinsified_natives) { |
54 OS::Print("Profiler_getCurrentTag\n"); | 54 OS::Print("Profiler_getCurrentTag\n"); |
55 } | 55 } |
56 return isolate->current_tag(); | 56 return isolate->current_tag(); |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 } // namespace dart | 60 } // namespace dart |
OLD | NEW |