| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 typeHandle_(AbstractType::Handle(isolate)) {} | 85 typeHandle_(AbstractType::Handle(isolate)) {} |
| 86 | 86 |
| 87 void VisitObject(RawObject* obj) { | 87 void VisitObject(RawObject* obj) { |
| 88 if (obj->IsFunction()) { | 88 if (obj->IsFunction()) { |
| 89 funcHandle_ ^= obj; | 89 funcHandle_ ^= obj; |
| 90 classHandle_ ^= funcHandle_.Owner(); | 90 classHandle_ ^= funcHandle_.Owner(); |
| 91 // Verify that the result type of a function is canonical or a | 91 // Verify that the result type of a function is canonical or a |
| 92 // TypeParameter. | 92 // TypeParameter. |
| 93 typeHandle_ ^= funcHandle_.result_type(); | 93 typeHandle_ ^= funcHandle_.result_type(); |
| 94 ASSERT(typeHandle_.IsNull() || | 94 ASSERT(typeHandle_.IsNull() || |
| 95 !typeHandle_.IsResolved() || |
| 95 typeHandle_.IsTypeParameter() || | 96 typeHandle_.IsTypeParameter() || |
| 96 typeHandle_.IsCanonical()); | 97 typeHandle_.IsCanonical()); |
| 97 // Verify that the types in the function signature are all canonical or | 98 // Verify that the types in the function signature are all canonical or |
| 98 // a TypeParameter. | 99 // a TypeParameter. |
| 99 const intptr_t num_parameters = funcHandle_.NumParameters(); | 100 const intptr_t num_parameters = funcHandle_.NumParameters(); |
| 100 for (intptr_t i = 0; i < num_parameters; i++) { | 101 for (intptr_t i = 0; i < num_parameters; i++) { |
| 101 typeHandle_ = funcHandle_.ParameterTypeAt(i); | 102 typeHandle_ = funcHandle_.ParameterTypeAt(i); |
| 102 ASSERT(typeHandle_.IsTypeParameter() || typeHandle_.IsCanonical()); | 103 ASSERT(typeHandle_.IsTypeParameter() || |
| 104 !typeHandle_.IsResolved() || |
| 105 typeHandle_.IsCanonical()); |
| 103 } | 106 } |
| 104 } | 107 } |
| 105 } | 108 } |
| 106 | 109 |
| 107 private: | 110 private: |
| 108 Class& classHandle_; | 111 Class& classHandle_; |
| 109 Function& funcHandle_; | 112 Function& funcHandle_; |
| 110 AbstractType& typeHandle_; | 113 AbstractType& typeHandle_; |
| 111 }; | 114 }; |
| 112 #endif // #if defined(DEBUG). | 115 #endif // #if defined(DEBUG). |
| (...skipping 5737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5850 ASSERT(stream != NULL); | 5853 ASSERT(stream != NULL); |
| 5851 TimelineEvent* event = stream->StartEvent(); | 5854 TimelineEvent* event = stream->StartEvent(); |
| 5852 if (event != NULL) { | 5855 if (event != NULL) { |
| 5853 event->AsyncEnd(label, async_id); | 5856 event->AsyncEnd(label, async_id); |
| 5854 event->Complete(); | 5857 event->Complete(); |
| 5855 } | 5858 } |
| 5856 return Api::Success(); | 5859 return Api::Success(); |
| 5857 } | 5860 } |
| 5858 | 5861 |
| 5859 } // namespace dart | 5862 } // namespace dart |
| OLD | NEW |