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

Side by Side Diff: compiler/lib/implementation/bool.dart

Issue 9702034: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: junit tests fixed Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « compiler/lib/implementation/arrays.dart ('k') | compiler/lib/implementation/bool.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Adds Dart-methods to the prototype of the JS Boolean function.
6 // TODO(floitsch): the following comment needs to be updated once we compile
7 // boolean checks with '=== true'.
8 // WARNING: 'this' inside this class is always treated as 'true'.
9 // That is if (this) ... will always pick the 'then' branch.
10 // The reason is that, once compiled to JS, 'this' is represented by a
11 // JS Boolean object. However "if (new Boolean(false)) .." picks the then
12 // branch.
13 class BoolImplementation implements bool native "Boolean" {
14 bool operator ==(other) native;
15
16 // TODO(floitsch): we should intercept toString for primitives, to avoid
17 // creating a wrapper object.
18 String toString() native;
19
20 BoolImplementation toBool() native;
21
22 get dynamic() { return toBool(); }
23 }
OLDNEW
« no previous file with comments | « compiler/lib/implementation/arrays.dart ('k') | compiler/lib/implementation/bool.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698