OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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/report.h" | 5 #include "vm/report.h" |
6 | 6 |
7 #include "vm/code_patcher.h" | 7 #include "vm/code_patcher.h" |
8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 va_end(args); | 111 va_end(args); |
112 UNREACHABLE(); | 112 UNREACHABLE(); |
113 } | 113 } |
114 | 114 |
115 | 115 |
116 void Report::LongJumpV(const Error& prev_error, | 116 void Report::LongJumpV(const Error& prev_error, |
117 const Script& script, TokenPosition token_pos, | 117 const Script& script, TokenPosition token_pos, |
118 const char* format, va_list args) { | 118 const char* format, va_list args) { |
119 const Error& error = Error::Handle(LanguageError::NewFormattedV( | 119 const Error& error = Error::Handle(LanguageError::NewFormattedV( |
120 prev_error, script, token_pos, Report::AtLocation, | 120 prev_error, script, token_pos, Report::AtLocation, |
121 kError, Heap::kNew, | 121 kError, Heap::kOld, |
122 format, args)); | 122 format, args)); |
123 LongJump(error); | 123 LongJump(error); |
124 UNREACHABLE(); | 124 UNREACHABLE(); |
125 } | 125 } |
126 | 126 |
127 | 127 |
128 void Report::MessageF(Kind kind, | 128 void Report::MessageF(Kind kind, |
129 const Script& script, | 129 const Script& script, |
130 TokenPosition token_pos, | 130 TokenPosition token_pos, |
131 bool report_after_token, | 131 bool report_after_token, |
(...skipping 20 matching lines...) Expand all Loading... |
152 const String& snippet_msg = String::Handle( | 152 const String& snippet_msg = String::Handle( |
153 PrependSnippet(kind, script, token_pos, report_after_token, msg)); | 153 PrependSnippet(kind, script, token_pos, report_after_token, msg)); |
154 OS::Print("%s", snippet_msg.ToCString()); | 154 OS::Print("%s", snippet_msg.ToCString()); |
155 return; | 155 return; |
156 } | 156 } |
157 } | 157 } |
158 // Reporting an error (or a warning as error). | 158 // Reporting an error (or a warning as error). |
159 const Error& error = Error::Handle( | 159 const Error& error = Error::Handle( |
160 LanguageError::NewFormattedV(Error::Handle(), // No previous error. | 160 LanguageError::NewFormattedV(Error::Handle(), // No previous error. |
161 script, token_pos, report_after_token, | 161 script, token_pos, report_after_token, |
162 kind, Heap::kNew, | 162 kind, Heap::kOld, |
163 format, args)); | 163 format, args)); |
164 LongJump(error); | 164 LongJump(error); |
165 UNREACHABLE(); | 165 UNREACHABLE(); |
166 } | 166 } |
167 | 167 |
168 } // namespace dart | 168 } // namespace dart |
169 | 169 |
OLD | NEW |