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 5331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5342 Report::Kind kind, | 5342 Report::Kind kind, |
5343 Heap::Space space, | 5343 Heap::Space space, |
5344 const char* format, va_list args); | 5344 const char* format, va_list args); |
5345 | 5345 |
5346 static RawLanguageError* New(const String& formatted_message, | 5346 static RawLanguageError* New(const String& formatted_message, |
5347 Report::Kind kind = Report::kError, | 5347 Report::Kind kind = Report::kError, |
5348 Heap::Space space = Heap::kNew); | 5348 Heap::Space space = Heap::kNew); |
5349 | 5349 |
5350 virtual const char* ToErrorCString() const; | 5350 virtual const char* ToErrorCString() const; |
5351 | 5351 |
| 5352 TokenPosition token_pos() const { return raw_ptr()->token_pos_; } |
| 5353 |
5352 private: | 5354 private: |
5353 RawError* previous_error() const { | 5355 RawError* previous_error() const { |
5354 return raw_ptr()->previous_error_; | 5356 return raw_ptr()->previous_error_; |
5355 } | 5357 } |
5356 void set_previous_error(const Error& value) const; | 5358 void set_previous_error(const Error& value) const; |
5357 | 5359 |
5358 RawScript* script() const { return raw_ptr()->script_; } | 5360 RawScript* script() const { return raw_ptr()->script_; } |
5359 void set_script(const Script& value) const; | 5361 void set_script(const Script& value) const; |
5360 | 5362 |
5361 TokenPosition token_pos() const { return raw_ptr()->token_pos_; } | |
5362 void set_token_pos(TokenPosition value) const; | 5363 void set_token_pos(TokenPosition value) const; |
5363 | 5364 |
5364 bool report_after_token() const { return raw_ptr()->report_after_token_; } | 5365 bool report_after_token() const { return raw_ptr()->report_after_token_; } |
5365 void set_report_after_token(bool value); | 5366 void set_report_after_token(bool value); |
5366 | 5367 |
5367 void set_kind(uint8_t value) const; | 5368 void set_kind(uint8_t value) const; |
5368 | 5369 |
5369 RawString* message() const { return raw_ptr()->message_; } | 5370 RawString* message() const { return raw_ptr()->message_; } |
5370 void set_message(const String& value) const; | 5371 void set_message(const String& value) const; |
5371 | 5372 |
(...skipping 3576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8948 | 8949 |
8949 inline void TypeArguments::SetHash(intptr_t value) const { | 8950 inline void TypeArguments::SetHash(intptr_t value) const { |
8950 // This is only safe because we create a new Smi, which does not cause | 8951 // This is only safe because we create a new Smi, which does not cause |
8951 // heap allocation. | 8952 // heap allocation. |
8952 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8953 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8953 } | 8954 } |
8954 | 8955 |
8955 } // namespace dart | 8956 } // namespace dart |
8956 | 8957 |
8957 #endif // VM_OBJECT_H_ | 8958 #endif // VM_OBJECT_H_ |
OLD | NEW |