Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: runtime/vm/object.h

Issue 2044753002: Make compile-time errors catchable (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698