| OLD | NEW |
| 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 #library('js_helper'); | 5 #library('js_helper'); |
| 6 | 6 |
| 7 #import('coreimpl.dart'); | 7 #import('coreimpl.dart'); |
| 8 | 8 |
| 9 #source('date_helper.dart'); | 9 #source('date_helper.dart'); |
| 10 #source('regexp_helper.dart'); | 10 #source('regexp_helper.dart'); |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 throw 'String.hashCode is not implemented'; | 1165 throw 'String.hashCode is not implemented'; |
| 1166 } | 1166 } |
| 1167 if (isJsArray(receiver)) { | 1167 if (isJsArray(receiver)) { |
| 1168 throw 'List.hashCode is not implemented'; | 1168 throw 'List.hashCode is not implemented'; |
| 1169 } | 1169 } |
| 1170 return UNINTERCEPTED(receiver.hashCode()); | 1170 return UNINTERCEPTED(receiver.hashCode()); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 // TODO(ahe): Dynamic may be overridden. | 1173 // TODO(ahe): Dynamic may be overridden. |
| 1174 builtin$get$dynamic(receiver) => receiver; | 1174 builtin$get$dynamic(receiver) => receiver; |
| 1175 |
| 1176 /** |
| 1177 * Called by generated code to capture the stacktrace before throwing |
| 1178 * an exception. |
| 1179 */ |
| 1180 captureStackTrace(ex) { |
| 1181 if (JS('bool', @'typeof $0 != "object"', ex)) return ex; |
| 1182 var hasCapture = JS('bool', @'!!(Error.captureStackTrace)'); |
| 1183 if (hasCapture) { |
| 1184 JS('Object', @'Error.captureStackTrace($0)', ex); |
| 1185 } |
| 1186 return ex; |
| 1187 } |
| 1188 |
| 1189 builtin$charCodes$0(receiver) { |
| 1190 checkNull(receiver); |
| 1191 if (receiver is !String) return UNINTERCEPTED(receiver.charCodes()); |
| 1192 int len = receiver.length; |
| 1193 List<int> result = new List<int>(len); |
| 1194 for (int i = 0; i < len; i++) { |
| 1195 result[i] = receiver.charCodeAt(i); |
| 1196 } |
| 1197 return result; |
| 1198 } |
| OLD | NEW |