Commit dada4cff authored by Jakob Kummerow's avatar Jakob Kummerow Committed by Commit Bot

[bigint] Implement BigInt::LessThan

Bug: v8:6791
Change-Id: Ib807ac94dca646cddfe2eb5fafe18999cf0764a2
Reviewed-on: https://chromium-review.googlesource.com/714450Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48508}
parent 4e6ea4b7
......@@ -166,7 +166,11 @@ MaybeHandle<BigInt> BigInt::UnsignedRightShift(Handle<BigInt> x,
}
bool BigInt::LessThan(Handle<BigInt> x, Handle<BigInt> y) {
UNIMPLEMENTED(); // TODO(jkummerow): Implement.
if (x->sign() == y->sign()) {
int result = AbsoluteCompare(x, y);
return x->sign() ? (result > 0) : (result < 0);
}
return x->sign();
}
bool BigInt::Equal(BigInt* x, BigInt* y) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment