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

Side by Side Diff: runtime/lib/errors_patch.dart

Issue 2451623006: Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork." (Closed)
Patch Set: Fix Created 4 years, 1 month 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/lib/developer_sources.gypi ('k') | runtime/lib/integers_patch.dart » ('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 import 'dart:_internal' as internal;
6 import 'dart:convert' show JSON;
7
8 @patch class Error { 5 @patch class Error {
9 @patch static String _objectToString(Object object) { 6 @patch static String _objectToString(Object object) {
10 return Object._toString(object); 7 return Object._toString(object);
11 } 8 }
12 9
13 @patch static String _stringToSafeString(String string) { 10 @patch static String _stringToSafeString(String string) {
14 return JSON.encode(string); 11 return JSON.encode(string);
15 } 12 }
16 13
17 @patch StackTrace get stackTrace => _stackTrace; 14 @patch StackTrace get stackTrace => _stackTrace;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 _throwNew(receiver, memberName, invocation_type, arguments, 196 _throwNew(receiver, memberName, invocation_type, arguments,
200 argumentNames, existingArgumentNames); 197 argumentNames, existingArgumentNames);
201 } 198 }
202 } 199 }
203 200
204 // Remember the type from the invocation mirror or static compilation 201 // Remember the type from the invocation mirror or static compilation
205 // analysis when thrown directly with _throwNew. A negative value means 202 // analysis when thrown directly with _throwNew. A negative value means
206 // that no information is available. 203 // that no information is available.
207 final int _invocation_type; 204 final int _invocation_type;
208 205
206 @patch
209 NoSuchMethodError(Object this._receiver, 207 NoSuchMethodError(Object this._receiver,
210 Symbol this._memberName, 208 Symbol this._memberName,
211 List this._arguments, 209 List this._arguments,
212 Map<Symbol, dynamic> this._namedArguments, 210 Map<Symbol, dynamic> this._namedArguments,
213 [List existingArgumentNames = null]) 211 [List existingArgumentNames = null])
214 : this._existingArgumentNames = existingArgumentNames, 212 : this._existingArgumentNames = existingArgumentNames,
215 this._invocation_type = -1; 213 this._invocation_type = -1;
216 214
217 // This constructor seems to be called with either strings or 215 // This constructor seems to be called with either strings or
218 // values read from another NoSuchMethodError. 216 // values read from another NoSuchMethodError.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return msg_buf.toString(); 347 return msg_buf.toString();
350 } 348 }
351 } 349 }
352 350
353 351
354 class _CompileTimeError extends Error { 352 class _CompileTimeError extends Error {
355 final String _errorMsg; 353 final String _errorMsg;
356 _CompileTimeError(this._errorMsg); 354 _CompileTimeError(this._errorMsg);
357 String toString() => _errorMsg; 355 String toString() => _errorMsg;
358 } 356 }
OLDNEW
« no previous file with comments | « runtime/lib/developer_sources.gypi ('k') | runtime/lib/integers_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698