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

Unified Diff: runtime/lib/integers.dart

Issue 9114054: Port a couple more stubs to x64. (Closed) Base URL: http://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/integers.cc ('k') | runtime/vm/bigint_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.dart
===================================================================
--- runtime/lib/integers.dart (revision 3306)
+++ runtime/lib/integers.dart (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -182,6 +182,18 @@
return this;
}
int operator ~() native "Mint_bitNegate";
+
+ // Shift by mint exceeds range that can be handled by the VM.
+ int sarFromInt(int other) {
+ if (other < 0) {
+ return -1;
+ } else {
+ return 0;
+ }
+ }
+ int shlFromInt(int other) {
+ throw const OutOfMemoryException();
+ }
}
// A number that can be represented as Smi or Mint will never be represented as
« no previous file with comments | « runtime/lib/integers.cc ('k') | runtime/vm/bigint_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698