OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library frame; | 5 library frame; |
6 | 6 |
7 | 7 |
8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
9 | 9 |
10 import 'trace.dart'; | 10 import 'trace.dart'; |
11 | 11 |
12 // #1 Foo._bar (file:///home/nweiz/code/stuff.dart:42:21) | 12 // #1 Foo._bar (file:///home/nweiz/code/stuff.dart:42:21) |
13 final _vmFrame = new RegExp( | 13 final _vmFrame = new RegExp( |
14 r'^#\d+\s+([^\s].*) \((.+):(\d+):(\d+)\)$'); | 14 r'^#\d+\s+([^\s].*) \((.+):(\d+):(\d+)\)$'); |
15 | 15 |
16 // at VW.call$0 (http://pub.dartlang.org/stuff.dart.js:560:28) | 16 // at VW.call$0 (http://pub.dartlang.org/stuff.dart.js:560:28) |
17 // at http://pub.dartlang.org/stuff.dart.js:560:28 | 17 // at http://pub.dartlang.org/stuff.dart.js:560:28 |
18 final _v8Frame = new RegExp( | 18 final _v8Frame = new RegExp( |
19 r'^\s*at (?:([^\s].*) \((.+):(\d+):(\d+)\)|(.+):(\d+):(\d+))$'); | 19 r'^\s*at (?:([^\s].*?)(?: \[as [^\]]+\])? ' |
| 20 r'\((.+):(\d+):(\d+)\)|(.+):(\d+):(\d+))$'); |
20 | 21 |
21 // .VW.call$0@http://pub.dartlang.org/stuff.dart.js:560 | 22 // .VW.call$0@http://pub.dartlang.org/stuff.dart.js:560 |
22 // .VW.call$0("arg")@http://pub.dartlang.org/stuff.dart.js:560 | 23 // .VW.call$0("arg")@http://pub.dartlang.org/stuff.dart.js:560 |
23 // .VW.call$0/name<@http://pub.dartlang.org/stuff.dart.js:560 | 24 // .VW.call$0/name<@http://pub.dartlang.org/stuff.dart.js:560 |
24 final _firefoxFrame = new RegExp( | 25 final _firefoxFrame = new RegExp( |
25 r'^([^@(/]*)(?:\(.*\))?(/[^<]*<?)?(?:\(.*\))?@(.*):(\d+)$'); | 26 r'^([^@(/]*)(?:\(.*\))?(/[^<]*<?)?(?:\(.*\))?@(.*):(\d+)$'); |
26 | 27 |
27 // foo/bar.dart 10:11 in Foo._bar | 28 // foo/bar.dart 10:11 in Foo._bar |
28 // http://dartlang.org/foo/bar.dart in Foo._bar | 29 // http://dartlang.org/foo/bar.dart in Foo._bar |
29 final _friendlyFrame = new RegExp( | 30 final _friendlyFrame = new RegExp( |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 185 |
185 var line = match[2] == null ? null : int.parse(match[2]); | 186 var line = match[2] == null ? null : int.parse(match[2]); |
186 var column = match[3] == null ? null : int.parse(match[3]); | 187 var column = match[3] == null ? null : int.parse(match[3]); |
187 return new Frame(uri, line, column, match[4]); | 188 return new Frame(uri, line, column, match[4]); |
188 } | 189 } |
189 | 190 |
190 Frame(this.uri, this.line, this.column, this.member); | 191 Frame(this.uri, this.line, this.column, this.member); |
191 | 192 |
192 String toString() => '$location in $member'; | 193 String toString() => '$location in $member'; |
193 } | 194 } |
OLD | NEW |