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

Unified Diff: test/dart_codegen/expect/core/errors.dart

Issue 961493003: don't run dart gen on JS patch code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 | « test/dart_codegen/expect/core/duration.dart ('k') | test/dart_codegen/expect/core/exceptions.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/dart_codegen/expect/core/errors.dart
diff --git a/test/dart_codegen/expect/core/errors.dart b/test/dart_codegen/expect/core/errors.dart
index fc92d252c17f53b03547326a2817a21b4fe3051e..d812b260e05154e63b2e90bac5b51b609e0fca3b 100644
--- a/test/dart_codegen/expect/core/errors.dart
+++ b/test/dart_codegen/expect/core/errors.dart
@@ -11,20 +11,9 @@ class Error {
}
return _objectToString(object);
}
- static String _stringToSafeString(String string) {
- return ((__x14) => DDC$RT.cast(__x14, dynamic, String, "CastGeneral",
- """line 89, column 12 of dart:core/errors.dart: """, __x14 is String,
- true))(jsonEncodeNative(string));
- }
- static String _objectToString(Object object) {
- return ((__x15) => DDC$RT.cast(__x15, dynamic, String, "CastGeneral",
- """line 93, column 12 of dart:core/errors.dart: """, __x15 is String,
- true))(Primitives.objectToString(object));
- }
- StackTrace get stackTrace => ((__x16) => DDC$RT.cast(__x16, dynamic,
- StackTrace, "CastGeneral",
- """line 96, column 32 of dart:core/errors.dart: """, __x16 is StackTrace,
- true))(Primitives.extractStackTrace(this));
+ external static String _stringToSafeString(String string);
+ external static String _objectToString(Object object);
+ external StackTrace get stackTrace;
}
class AssertionError extends Error {}
class TypeError extends AssertionError {}
@@ -91,7 +80,7 @@ class RangeError extends ArgumentError {
static void checkValidIndex(int index, var indexable,
[String name, int length, String message]) {
if (length == null) length = DDC$RT.cast(indexable.length, dynamic, int,
- "CastGeneral", """line 285, column 34 of dart:core/errors.dart: """,
+ "CastGeneral", """line 281, column 34 of dart:core/errors.dart: """,
indexable.length is int, true);
if (index < 0 || index >= length) {
if (name == null) name = "index";
@@ -175,43 +164,7 @@ class NoSuchMethodError extends Error {
_arguments = positionalArguments,
_namedArguments = namedArguments,
_existingArgumentNames = existingArgumentNames;
- String toString() {
- StringBuffer sb = new StringBuffer();
- int i = 0;
- if (_arguments != null) {
- for (; i < _arguments.length; i++) {
- if (i > 0) {
- sb.write(", ");
- }
- sb.write(Error.safeToString(_arguments[i]));
- }
- }
- if (_namedArguments != null) {
- _namedArguments.forEach((Symbol key, var value) {
- if (i > 0) {
- sb.write(", ");
- }
- sb.write(_symbolToString(key));
- sb.write(": ");
- sb.write(Error.safeToString(value));
- i++;
- });
- }
- if (_existingArgumentNames == null) {
- return "NoSuchMethodError : method not found: '$_memberName'\n" "Receiver: ${Error.safeToString(_receiver)}\n" "Arguments: [$sb]";
- } else {
- String actualParameters = sb.toString();
- sb = new StringBuffer();
- for (int i = 0; i < _existingArgumentNames.length; i++) {
- if (i > 0) {
- sb.write(", ");
- }
- sb.write(_existingArgumentNames[i]);
- }
- String formalParameters = sb.toString();
- return "NoSuchMethodError: incorrect number of arguments passed to " "method named '$_memberName'\n" "Receiver: ${Error.safeToString(_receiver)}\n" "Tried calling: $_memberName($actualParameters)\n" "Found: $_memberName($formalParameters)";
- }
- }
+ external String toString();
}
class UnsupportedError extends Error {
final String message;
« no previous file with comments | « test/dart_codegen/expect/core/duration.dart ('k') | test/dart_codegen/expect/core/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698