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

Side by Side Diff: runtime/lib/integers.cc

Issue 9212016: - More cleanup after the kSAR -> kSHR rename. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/integers.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 return BigintOperations::ShiftLeft(big_value, amount.Value()); 515 return BigintOperations::ShiftLeft(big_value, amount.Value());
516 case Token::kSHR: 516 case Token::kSHR:
517 return BigintOperations::ShiftRight(big_value, amount.Value()); 517 return BigintOperations::ShiftRight(big_value, amount.Value());
518 default: 518 default:
519 UNIMPLEMENTED(); 519 UNIMPLEMENTED();
520 } 520 }
521 return Integer::null(); 521 return Integer::null();
522 } 522 }
523 523
524 524
525 DEFINE_NATIVE_ENTRY(Smi_sarFromInt, 2) { 525 DEFINE_NATIVE_ENTRY(Smi_shrFromInt, 2) {
526 const Smi& amount = Smi::CheckedHandle(arguments->At(0)); 526 const Smi& amount = Smi::CheckedHandle(arguments->At(0));
527 GET_NATIVE_ARGUMENT(Integer, value, arguments->At(1)); 527 GET_NATIVE_ARGUMENT(Integer, value, arguments->At(1));
528 ASSERT(CheckInteger(amount)); 528 ASSERT(CheckInteger(amount));
529 ASSERT(CheckInteger(value)); 529 ASSERT(CheckInteger(value));
530 Integer& result = Integer::Handle( 530 Integer& result = Integer::Handle(
531 ShiftOperationHelper(Token::kSHR, value, amount)); 531 ShiftOperationHelper(Token::kSHR, value, amount));
532 arguments->SetReturn(Integer::Handle(AsInteger(result))); 532 arguments->SetReturn(Integer::Handle(AsInteger(result)));
533 } 533 }
534 534
535 535
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 575
576 DEFINE_NATIVE_ENTRY(Bigint_bitNegate, 1) { 576 DEFINE_NATIVE_ENTRY(Bigint_bitNegate, 1) {
577 const Bigint& value = Bigint::CheckedHandle(arguments->At(0)); 577 const Bigint& value = Bigint::CheckedHandle(arguments->At(0));
578 const Bigint& result = Bigint::Handle(BigintOperations::BitNot(value)); 578 const Bigint& result = Bigint::Handle(BigintOperations::BitNot(value));
579 ASSERT(CheckInteger(value)); 579 ASSERT(CheckInteger(value));
580 ASSERT(CheckInteger(result)); 580 ASSERT(CheckInteger(result));
581 arguments->SetReturn(Integer::Handle(AsInteger(result))); 581 arguments->SetReturn(Integer::Handle(AsInteger(result)));
582 } 582 }
583 583
584 } // namespace dart 584 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/integers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698