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

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

Issue 1971193002: Patches to support Dart VM patch files in dart2js. (Closed) Base URL: sso://user/ahe/dart-sdk@master
Patch Set: Created 4 years, 6 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/lib/double_patch.dart ('k') | runtime/lib/expando_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; 5 import 'dart:_internal' as internal;
6 import 'dart:convert' show JSON; 6 import 'dart:convert' show JSON;
7 7
8 patch class Error { 8 patch class Error {
9 /* patch */ static String _objectToString(Object object) { 9 /* patch */ static String _objectToString(Object object) {
10 return Object._toString(object); 10 return Object._toString(object);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 _throwNew(receiver, memberName, invocation_type, arguments, 179 _throwNew(receiver, memberName, invocation_type, arguments,
180 argumentNames, existingArgumentNames); 180 argumentNames, existingArgumentNames);
181 } 181 }
182 } 182 }
183 183
184 // Remember the type from the invocation mirror or static compilation 184 // Remember the type from the invocation mirror or static compilation
185 // analysis when thrown directly with _throwNew. A negative value means 185 // analysis when thrown directly with _throwNew. A negative value means
186 // that no information is available. 186 // that no information is available.
187 final int _invocation_type; 187 final int _invocation_type;
188 188
189 NoSuchMethodError(Object this._receiver, 189 NoSuchMethodError(this._receiver,
190 Symbol this._memberName, 190 this._memberName,
191 List this._arguments, 191 this._arguments,
192 Map<Symbol, dynamic> this._namedArguments, 192 this._namedArguments,
193 [List existingArgumentNames = null]) 193 [List existingArgumentNames = null])
194 : this._existingArgumentNames = existingArgumentNames, 194 : this._existingArgumentNames = existingArgumentNames,
195 this._invocation_type = -1; 195 this._invocation_type = -1;
196 196
197 // This constructor seems to be called with either strings or 197 // This constructor seems to be called with either strings or
198 // values read from another NoSuchMethodError. 198 // values read from another NoSuchMethodError.
199 NoSuchMethodError._withType(Object this._receiver, 199 NoSuchMethodError._withType(Object this._receiver,
200 /*String|Symbol*/ memberName, 200 /*String|Symbol*/ memberName,
201 this._invocation_type, 201 int invocation_type,
202 List this._arguments, 202 List this._arguments,
203 Map<dynamic, dynamic> namedArguments, 203 Map<dynamic, dynamic> namedArguments,
204 [List existingArgumentNames = null]) 204 [List existingArgumentNames = null])
205 : this._memberName = 205 : this._memberName =
206 (memberName is String) ? new Symbol(memberName) : memberName, 206 (memberName is String) ? new Symbol(memberName) : memberName,
207 this._invocation_type = invocation_type,
207 this._namedArguments = 208 this._namedArguments =
208 (namedArguments == null) 209 (namedArguments == null)
209 ? null 210 ? null
210 : new Map<Symbol, dynamic>.fromIterable( 211 : new Map<Symbol, dynamic>.fromIterable(
211 namedArguments.keys, 212 namedArguments.keys,
212 key: (k) => (k is String) ? new Symbol(k) : k, 213 key: (k) => (k is String) ? new Symbol(k) : k,
213 value: (k) => namedArguments[k]), 214 value: (k) => namedArguments[k]),
214 this._existingArgumentNames = existingArgumentNames; 215 this._existingArgumentNames = existingArgumentNames;
215 216
216 217
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 msg_buf.write( 331 msg_buf.write(
331 "NoSuchMethodError: incorrect number of arguments passed to " 332 "NoSuchMethodError: incorrect number of arguments passed to "
332 "method named '$memberName'\n" 333 "method named '$memberName'\n"
333 "Receiver: $receiver_str\n" 334 "Receiver: $receiver_str\n"
334 "Tried calling: $memberName($actualParameters)\n" 335 "Tried calling: $memberName($actualParameters)\n"
335 "Found: $memberName($formalParameters)"); 336 "Found: $memberName($formalParameters)");
336 } 337 }
337 return msg_buf.toString(); 338 return msg_buf.toString();
338 } 339 }
339 } 340 }
OLDNEW
« no previous file with comments | « runtime/lib/double_patch.dart ('k') | runtime/lib/expando_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698