| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 uint32_t unsigned_exponent = static_cast<uint32_t>(exponent); | 55 uint32_t unsigned_exponent = static_cast<uint32_t>(exponent); |
| 56 int result = 0; | 56 int result = 0; |
| 57 uint32_t max_exponent = | 57 uint32_t max_exponent = |
| 58 static_cast<uint32_t>(Double::kPhysicalSignificandSize); | 58 static_cast<uint32_t>(Double::kPhysicalSignificandSize); |
| 59 if (unsigned_exponent >= max_exponent) { | 59 if (unsigned_exponent >= max_exponent) { |
| 60 if ((exponent - Double::kPhysicalSignificandSize) < 32) { | 60 if ((exponent - Double::kPhysicalSignificandSize) < 32) { |
| 61 result = dbl.u[0] << (exponent - Double::kPhysicalSignificandSize); | 61 result = dbl.u[0] << (exponent - Double::kPhysicalSignificandSize); |
| 62 } | 62 } |
| 63 } else { | 63 } else { |
| 64 uint64_t big_result = | 64 uint64_t big_result = |
| 65 (BitCast<uint64_t>(d) & Double::kSignificandMask) | Double::kHiddenBit; | 65 (bit_cast<uint64_t>(d) & Double::kSignificandMask) | Double::kHiddenBit; |
| 66 big_result = big_result >> (Double::kPhysicalSignificandSize - exponent); | 66 big_result = big_result >> (Double::kPhysicalSignificandSize - exponent); |
| 67 result = static_cast<uint32_t>(big_result); | 67 result = static_cast<uint32_t>(big_result); |
| 68 } | 68 } |
| 69 if (static_cast<int32_t>(exponent_bits) < 0) { | 69 if (static_cast<int32_t>(exponent_bits) < 0) { |
| 70 return (0 - result); | 70 return (0 - result); |
| 71 } else { | 71 } else { |
| 72 return result; | 72 return result; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 #define CHECK_STUB(NAME) \ | 182 #define CHECK_STUB(NAME) \ |
| 183 { \ | 183 { \ |
| 184 HandleScope scope(isolate); \ | 184 HandleScope scope(isolate); \ |
| 185 NAME##Stub stub_impl(0xabcd, isolate); \ | 185 NAME##Stub stub_impl(0xabcd, isolate); \ |
| 186 CodeStub* stub = &stub_impl; \ | 186 CodeStub* stub = &stub_impl; \ |
| 187 CHECK_EQ(stub->MajorKey(), CodeStub::NAME); \ | 187 CHECK_EQ(stub->MajorKey(), CodeStub::NAME); \ |
| 188 } | 188 } |
| 189 CODE_STUB_LIST(CHECK_STUB); | 189 CODE_STUB_LIST(CHECK_STUB); |
| 190 } | 190 } |
| OLD | NEW |