OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/kernel.h" | 5 #include "vm/kernel.h" |
6 | 6 |
7 #if !defined(DART_PRECOMPILED_RUNTIME) | 7 #if !defined(DART_PRECOMPILED_RUNTIME) |
8 namespace dart { | 8 namespace dart { |
9 | 9 |
10 namespace kernel { | 10 namespace kernel { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 | 75 |
76 bool CanonicalName::IsMember() { | 76 bool CanonicalName::IsMember() { |
77 return IsConstructor() || IsField() || IsProcedure(); | 77 return IsConstructor() || IsField() || IsProcedure(); |
78 } | 78 } |
79 | 79 |
80 | 80 |
81 // Note the two occurrences of the parameter 'literal'. | 81 // Note the two occurrences of the parameter 'literal'. |
82 #define COMPARE_NAME(canonical_name, literal) \ | 82 #define COMPARE_NAME(canonical_name, literal) \ |
83 ((canonical_name)->name()->size() == strlen(literal) && \ | 83 ((canonical_name)->name()->size() == \ |
| 84 static_cast<intptr_t>(strlen(literal)) && \ |
84 memcmp((canonical_name)->name()->buffer(), (literal), strlen(literal)) == \ | 85 memcmp((canonical_name)->name()->buffer(), (literal), strlen(literal)) == \ |
85 0) | 86 0) |
86 | 87 |
87 bool CanonicalName::IsField() { | 88 bool CanonicalName::IsField() { |
88 // Fields with private names have the import URI of the library where they are | 89 // Fields with private names have the import URI of the library where they are |
89 // visible as the parent and the string "@fields" as the parent's parent. | 90 // visible as the parent and the string "@fields" as the parent's parent. |
90 // Fields with non-private names have the string "@fields' as the parent. | 91 // Fields with non-private names have the string "@fields' as the parent. |
91 if (IsRoot()) { | 92 if (IsRoot()) { |
92 return false; | 93 return false; |
93 } | 94 } |
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 | 1402 |
1402 void Program::VisitChildren(Visitor* visitor) { | 1403 void Program::VisitChildren(Visitor* visitor) { |
1403 VisitList(&libraries(), visitor); | 1404 VisitList(&libraries(), visitor); |
1404 } | 1405 } |
1405 | 1406 |
1406 | 1407 |
1407 } // namespace kernel | 1408 } // namespace kernel |
1408 | 1409 |
1409 } // namespace dart | 1410 } // namespace dart |
1410 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1411 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |