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

Unified Diff: compiler/lib/implementation/rtt.js

Issue 8241013: Pull "$instanceOf" methods off of the native object. No change in behavior. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 2 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 | « compiler/lib/implementation/object.js ('k') | compiler/lib/implementation/string.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/lib/implementation/rtt.js
===================================================================
--- compiler/lib/implementation/rtt.js (revision 368)
+++ compiler/lib/implementation/rtt.js (working copy)
@@ -263,3 +263,27 @@
function $cls(cls) {
return "cls:" + cls;
}
+
+/**
+ * @param {*} o
+ * @return {boolean}
+ */
+function $isBool(o) {
+ return typeof o == 'boolean' || o instanceof Boolean;
+}
+
+/**
+ * @param {*} o
+ * @return {boolean}
+ */
+function $isNum(o) {
+ return typeof o == 'number' || o instanceof Number;
+}
+
+/**
+ * @param {*} o
+ * @return {boolean}
+ */
+function $isString(o) {
+ return typeof o == 'string' || o instanceof String;
+}
« no previous file with comments | « compiler/lib/implementation/object.js ('k') | compiler/lib/implementation/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698