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

Side by Side Diff: src/bignum.cc

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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 | « src/atomicops_internals_x86_gcc.cc ('k') | src/bootstrapper.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 27 matching lines...) Expand all
38 bigits_[i] = 0; 38 bigits_[i] = 0;
39 } 39 }
40 } 40 }
41 41
42 42
43 template<typename S> 43 template<typename S>
44 static int BitSize(S value) { 44 static int BitSize(S value) {
45 return 8 * sizeof(value); 45 return 8 * sizeof(value);
46 } 46 }
47 47
48
48 // Guaranteed to lie in one Bigit. 49 // Guaranteed to lie in one Bigit.
49 void Bignum::AssignUInt16(uint16_t value) { 50 void Bignum::AssignUInt16(uint16_t value) {
50 ASSERT(kBigitSize >= BitSize(value)); 51 ASSERT(kBigitSize >= BitSize(value));
51 Zero(); 52 Zero();
52 if (value == 0) return; 53 if (value == 0) return;
53 54
54 EnsureCapacity(1); 55 EnsureCapacity(1);
55 bigits_[0] = value; 56 bigits_[0] = value;
56 used_digits_ = 1; 57 used_digits_ = 1;
57 } 58 }
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 Chunk difference = bigits_[i] - borrow; 766 Chunk difference = bigits_[i] - borrow;
766 bigits_[i] = difference & kBigitMask; 767 bigits_[i] = difference & kBigitMask;
767 borrow = difference >> (kChunkSize - 1); 768 borrow = difference >> (kChunkSize - 1);
768 } 769 }
769 Clamp(); 770 Clamp();
770 ASSERT(Bignum::Equal(a, *this)); 771 ASSERT(Bignum::Equal(a, *this));
771 } 772 }
772 773
773 774
774 } } // namespace v8::internal 775 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/atomicops_internals_x86_gcc.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698