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

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

Issue 9240005: Add number checks to the numeric operations in dartc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « no previous file | compiler/lib/implementation/number.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class NumberImplementation implements int, double native "Number" { 5 class NumberImplementation implements int, double native "Number" {
6 NumberImplementation operator +(NumberImplementation other) native; 6 NumberImplementation operator +(NumberImplementation other) native;
7 NumberImplementation operator -(NumberImplementation other) native; 7 NumberImplementation operator -(NumberImplementation other) native;
8 NumberImplementation operator *(NumberImplementation other) native; 8 NumberImplementation operator *(NumberImplementation other) native;
9 NumberImplementation operator /(NumberImplementation other) native; 9 NumberImplementation operator /(NumberImplementation other) native;
10 NumberImplementation operator ~/(NumberImplementation other) native; 10 NumberImplementation operator ~/(NumberImplementation other) native;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 NumberImplementation toDouble() native; 80 NumberImplementation toDouble() native;
81 String toString() native; 81 String toString() native;
82 String toStringAsFixed(int fractionDigits) native; 82 String toStringAsFixed(int fractionDigits) native;
83 String toStringAsExponential(int fractionDigits) native; 83 String toStringAsExponential(int fractionDigits) native;
84 String toStringAsPrecision(int precision) native; 84 String toStringAsPrecision(int precision) native;
85 String toRadixString(int radix) native; 85 String toRadixString(int radix) native;
86 86
87 int hashCode() native; 87 int hashCode() native;
88 get dynamic() { return toDouble(); } 88 get dynamic() { return toDouble(); }
89 } 89 }
90
91 class _NumberJsUtil {
92 static void _throwIllegalArgumentException(var argument) native {
93 throw new IllegalArgumentException([argument]);
94 }
95 }
OLDNEW
« no previous file with comments | « no previous file | compiler/lib/implementation/number.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698