| 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 "lib/stacktrace.h" |    10 #include "lib/stacktrace.h" | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    90 #define API_TIMELINE_BEGIN_END do { } while (false) |    90 #define API_TIMELINE_BEGIN_END do { } while (false) | 
|    91 #endif  // !PRODUCT |    91 #endif  // !PRODUCT | 
|    92  |    92  | 
|    93 #if defined(DEBUG) |    93 #if defined(DEBUG) | 
|    94 // An object visitor which will iterate over all the function objects in the |    94 // An object visitor which will iterate over all the function objects in the | 
|    95 // heap and check if the result type and parameter types are canonicalized |    95 // heap and check if the result type and parameter types are canonicalized | 
|    96 // or not. An assertion is raised if a type is not canonicalized. |    96 // or not. An assertion is raised if a type is not canonicalized. | 
|    97 class FunctionVisitor : public ObjectVisitor { |    97 class FunctionVisitor : public ObjectVisitor { | 
|    98  public: |    98  public: | 
|    99   explicit FunctionVisitor(Thread* thread) : |    99   explicit FunctionVisitor(Thread* thread) : | 
|   100       ObjectVisitor(thread->isolate()), |  | 
|   101       classHandle_(Class::Handle(thread->zone())), |   100       classHandle_(Class::Handle(thread->zone())), | 
|   102       funcHandle_(Function::Handle(thread->zone())), |   101       funcHandle_(Function::Handle(thread->zone())), | 
|   103       typeHandle_(AbstractType::Handle(thread->zone())) {} |   102       typeHandle_(AbstractType::Handle(thread->zone())) {} | 
|   104  |   103  | 
|   105   void VisitObject(RawObject* obj) { |   104   void VisitObject(RawObject* obj) { | 
|   106     if (obj->IsFunction()) { |   105     if (obj->IsFunction()) { | 
|   107       funcHandle_ ^= obj; |   106       funcHandle_ ^= obj; | 
|   108       classHandle_ ^= funcHandle_.Owner(); |   107       classHandle_ ^= funcHandle_.Owner(); | 
|   109       // Verify that the result type of a function is canonical or a |   108       // Verify that the result type of a function is canonical or a | 
|   110       // TypeParameter. |   109       // TypeParameter. | 
| (...skipping 6088 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6199   return Api::Success(); |  6198   return Api::Success(); | 
|  6200 } |  6199 } | 
|  6201 #endif  // DART_PRECOMPILER |  6200 #endif  // DART_PRECOMPILER | 
|  6202  |  6201  | 
|  6203  |  6202  | 
|  6204 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |  6203 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 
|  6205   return Dart::IsRunningPrecompiledCode(); |  6204   return Dart::IsRunningPrecompiledCode(); | 
|  6206 } |  6205 } | 
|  6207  |  6206  | 
|  6208 }  // namespace dart |  6207 }  // namespace dart | 
| OLD | NEW |