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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 1053053003: Add 'toString' method to NativeBehavior (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 0d3ca8164ba2a0e96429c85ab980e818184910ac..5b0462dbf86f415565de272557346f46eac25763 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -6,13 +6,13 @@ part of native;
/// This class is a temporary work-around until we get a more powerful DartType.
class SpecialType {
-final String name;
-const SpecialType._(this.name);
+ final String name;
+ const SpecialType._(this.name);
-/// The type Object, but no subtypes:
-static const JsObject = const SpecialType._('=Object');
+ /// The type Object, but no subtypes:
+ static const JsObject = const SpecialType._('=Object');
-int get hashCode => name.hashCode;
+ int get hashCode => name.hashCode;
}
/**
@@ -59,6 +59,13 @@ class NativeBehavior {
final SideEffects sideEffects = new SideEffects.empty();
+ String toString() {
+ return 'NativeBehavior(returns: ${typesReturned}, '
+ 'creates: ${typesInstantiated}, '
+ 'sideEffects: ${sideEffects})';
+ }
+
+
/// Processes the type specification string of a call to JS and stores the
/// result in the [typesReturned] and [typesInstantiated]. It furthermore
/// computes the side effects, and, if given, invokes [setSideEffects] with
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698