Refactoring ByteCode dump

* byteCodeStart parameter is used only for Jump codes
* allocating global variable to represent this code start position instead
* remove all redundant parameter for each dump method

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2021-08-25 15:54:58 +09:00 committed by Patrick Kim
commit d925600bf2
4 changed files with 135 additions and 132 deletions

View file

@ -469,7 +469,7 @@ char* NumberObject::toStringWithRadix(ExecutionState& state, RadixBuffer& buffer
// examine the remainder to determine whether we should be considering rounding
// up or down. If remainder is precisely 0.5 rounding is to even.
int dComparePoint5 = fraction.comparePoint5();
if (dComparePoint5 > 0 || (!dComparePoint5 && ((radix & 1) ? isOddInOddRadix : digit & 1))) {
if (dComparePoint5 > 0 || (!dComparePoint5 && ((radix & 1) ? isOddInOddRadix : (digit & 1)))) {
// Check for rounding up; are we closer to the value we'd round off to than
// the next IEEE value would be?
if (fraction.sumGreaterThanOne(halfDeltaNext)) {
@ -503,7 +503,7 @@ char* NumberObject::toStringWithRadix(ExecutionState& state, RadixBuffer& buffer
while (true) {
int dComparePoint5 = fraction.comparePoint5();
if (dComparePoint5 > 0 || (!dComparePoint5 && ((radix & 1) ? isOddInOddRadix : digit & 1))) {
if (dComparePoint5 > 0 || (!dComparePoint5 && ((radix & 1) ? isOddInOddRadix : (digit & 1)))) {
if (fraction.sumGreaterThanOne(halfDelta)) {
needsRoundingUp = true;
break;