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

Unified Diff: runtime/lib/errors_patch.dart

Issue 1107613002: Move symbol demangling to dart:_internal to remove dart:core dependency on dart:mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index cd984e5442d3d58e242ace19ed6a646effce6574..01920edd28e08ec35df5ffa4d64db1df69fb9e07 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'dart:mirrors' show MirrorSystem;
+import 'dart:_internal' as internal;
import 'dart:convert' show JSON;
patch class Error {
@@ -226,7 +226,7 @@ patch class NoSuchMethodError {
var args_message = args_mismatch ? " with matching arguments" : "";
var msg;
var memberName =
- (_memberName == null) ? "" : MirrorSystem.getName(_memberName);
+ (_memberName == null) ? "" : internal.Symbol.getUnmangledName(_memberName);
if (type == _InvocationMirror._LOCAL_VAR) {
return "cannot assign to final variable '$memberName'.\n\n";
@@ -290,7 +290,7 @@ patch class NoSuchMethodError {
if (i > 0) {
actual_buf.write(", ");
}
- actual_buf.write(MirrorSystem.getName(key));
+ actual_buf.write(internal.Symbol.getUnmangledName(key));
actual_buf.write(": ");
actual_buf.write(Error.safeToString(value));
i++;
@@ -307,7 +307,7 @@ patch class NoSuchMethodError {
receiver_str = Error.safeToString(_receiver);
}
var memberName =
- (_memberName == null) ? "" : MirrorSystem.getName(_memberName);
+ (_memberName == null) ? "" : internal.Symbol.getUnmangledName(_memberName);
var type = _invocation_type & _InvocationMirror._TYPE_MASK;
if (type == _InvocationMirror._LOCAL_VAR) {
msg_buf.write(
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698