OLD | NEW |
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 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 | 71 |
72 const char* CanonicalFunction(const char* func) { | 72 const char* CanonicalFunction(const char* func) { |
73 if (strncmp(func, "dart::", 6) == 0) { | 73 if (strncmp(func, "dart::", 6) == 0) { |
74 return func + 6; | 74 return func + 6; |
75 } else { | 75 } else { |
76 return func; | 76 return func; |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
| 80 #if 0 |
80 #define API_TIMELINE_DURATION \ | 81 #define API_TIMELINE_DURATION \ |
81 TimelineDurationScope tds(Thread::Current(), \ | 82 TimelineDurationScope tds(Thread::Current(), \ |
82 Timeline::GetVMApiStream(), \ | 83 Timeline::GetVMApiStream(), \ |
83 CURRENT_FUNC) | 84 CURRENT_FUNC) |
84 | 85 |
85 #define API_TIMELINE_BEGIN_END \ | 86 #define API_TIMELINE_BEGIN_END \ |
86 TimelineBeginEndScope tbes(Thread::Current(), \ | 87 TimelineBeginEndScope tbes(Thread::Current(), \ |
87 Timeline::GetVMApiStream(), \ | 88 Timeline::GetVMApiStream(), \ |
88 CURRENT_FUNC) | 89 CURRENT_FUNC) |
| 90 #else |
| 91 #define API_TIMELINE_DURATION ASSERT(true) |
| 92 #define API_TIMELINE_BEGIN_END ASSERT(true) |
| 93 #endif |
89 | 94 |
90 #if defined(DEBUG) | 95 #if defined(DEBUG) |
91 // An object visitor which will iterate over all the function objects in the | 96 // An object visitor which will iterate over all the function objects in the |
92 // heap and check if the result type and parameter types are canonicalized | 97 // heap and check if the result type and parameter types are canonicalized |
93 // or not. An assertion is raised if a type is not canonicalized. | 98 // or not. An assertion is raised if a type is not canonicalized. |
94 class FunctionVisitor : public ObjectVisitor { | 99 class FunctionVisitor : public ObjectVisitor { |
95 public: | 100 public: |
96 explicit FunctionVisitor(Thread* thread) : | 101 explicit FunctionVisitor(Thread* thread) : |
97 ObjectVisitor(thread->isolate()), | 102 ObjectVisitor(thread->isolate()), |
98 classHandle_(Class::Handle(thread->zone())), | 103 classHandle_(Class::Handle(thread->zone())), |
(...skipping 5860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5959 ApiReallocate); | 5964 ApiReallocate); |
5960 writer.WriteFullSnapshot(); | 5965 writer.WriteFullSnapshot(); |
5961 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); | 5966 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); |
5962 *isolate_snapshot_size = writer.IsolateSnapshotSize(); | 5967 *isolate_snapshot_size = writer.IsolateSnapshotSize(); |
5963 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); | 5968 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); |
5964 | 5969 |
5965 return Api::Success(); | 5970 return Api::Success(); |
5966 } | 5971 } |
5967 | 5972 |
5968 } // namespace dart | 5973 } // namespace dart |
OLD | NEW |