mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
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:
parent
9e15a05497
commit
d925600bf2
4 changed files with 135 additions and 132 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue