OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 // function. | 1433 // function. |
1434 // The function and the class share the same given name. | 1434 // The function and the class share the same given name. |
1435 static RawFunction* NewClosureFunction(const String& name, | 1435 static RawFunction* NewClosureFunction(const String& name, |
1436 const Function& parent, | 1436 const Function& parent, |
1437 intptr_t token_pos); | 1437 intptr_t token_pos); |
1438 | 1438 |
1439 // Slow function, use in asserts to track changes in important library | 1439 // Slow function, use in asserts to track changes in important library |
1440 // functions. | 1440 // functions. |
1441 int32_t SourceFingerprint() const; | 1441 int32_t SourceFingerprint() const; |
1442 | 1442 |
| 1443 // Return false and report an error if the fingerprint does not match. |
| 1444 bool CheckSourceFingerprint(intptr_t fp) const; |
| 1445 |
1443 static const int kCtorPhaseInit = 1 << 0; | 1446 static const int kCtorPhaseInit = 1 << 0; |
1444 static const int kCtorPhaseBody = 1 << 1; | 1447 static const int kCtorPhaseBody = 1 << 1; |
1445 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); | 1448 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); |
1446 | 1449 |
1447 private: | 1450 private: |
1448 enum KindTagBits { | 1451 enum KindTagBits { |
1449 kStaticBit = 0, | 1452 kStaticBit = 0, |
1450 kConstBit = 1, | 1453 kConstBit = 1, |
1451 kOptimizableBit = 2, | 1454 kOptimizableBit = 2, |
1452 kInlinableBit = 3, | 1455 kInlinableBit = 3, |
(...skipping 4522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5975 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5978 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
5976 return false; | 5979 return false; |
5977 } | 5980 } |
5978 } | 5981 } |
5979 return true; | 5982 return true; |
5980 } | 5983 } |
5981 | 5984 |
5982 } // namespace dart | 5985 } // namespace dart |
5983 | 5986 |
5984 #endif // VM_OBJECT_H_ | 5987 #endif // VM_OBJECT_H_ |
OLD | NEW |