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

Unified Diff: runtime/vm/raw_object.h

Issue 509153003: New bigint implementation in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 40060)
+++ runtime/vm/raw_object.h (working copy)
@@ -1446,21 +1446,11 @@
class RawBigint : public RawInteger {
RAW_HEAP_OBJECT_IMPLEMENTATION(Bigint);
- // Actual length in chunks at the time of allocation (later we may
- // clamp the operational length but we need to maintain a consistent
- // object length so that the object can be traversed during GC).
- int32_t allocated_length_;
-
- // Operational length in chunks of the bigint object, clamping can
- // cause this length to be reduced. If the signed_length_ is
- // negative then the number is negative.
- int32_t signed_length_;
-
- // A sequence of Chunks (typedef in Bignum) representing bignum digits.
- // Bignum::Chunk chunks_[Utils::Abs(signed_length_)];
- uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
-
- friend class SnapshotReader;
+ RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->neg_); }
+ RawBool* neg_;
+ RawSmi* used_;
+ RawTypedData* digits_;
+ RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->digits_); }
};
@@ -2026,7 +2016,6 @@
(index == kCodeCid) ||
(index == kContextScopeCid) ||
(index == kInstanceCid) ||
- (index == kBigintCid) ||
(index == kJSRegExpCid);
}

Powered by Google App Engine
This is Rietveld 408576698