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

Side by Side Diff: compiler/lib/implementation/rtt.js

Issue 8286001: Changes "is" and equality checks to strictly check for primitive types, fix a couple of (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // The following methods are used to handle type information 5 // The following methods are used to handle type information
6 // 6 //
7 7
8 /** 8 /**
9 * @constructor 9 * @constructor
10 * @param {string} classkey 10 * @param {string} classkey
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 */ 262 */
263 function $cls(cls) { 263 function $cls(cls) {
264 return "cls:" + cls; 264 return "cls:" + cls;
265 } 265 }
266 266
267 /** 267 /**
268 * @param {*} o 268 * @param {*} o
269 * @return {boolean} 269 * @return {boolean}
270 */ 270 */
271 function $isBool(o) { 271 function $isBool(o) {
272 return typeof o == 'boolean' || o instanceof Boolean; 272 return typeof o == 'boolean';
273 } 273 }
274 274
275 /** 275 /**
276 * @param {*} o 276 * @param {*} o
277 * @return {boolean} 277 * @return {boolean}
278 */ 278 */
279 function $isNum(o) { 279 function $isNum(o) {
280 return typeof o == 'number' || o instanceof Number; 280 return typeof o == 'number';
281 } 281 }
282 282
283 /** 283 /**
284 * @param {*} o 284 * @param {*} o
285 * @return {boolean} 285 * @return {boolean}
286 */ 286 */
287 function $isString(o) { 287 function $isString(o) {
288 return typeof o == 'string' || o instanceof String; 288 return typeof o == 'string';
289 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698