| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 | 86 |
| 87 int32_t DefaultCallWrapper(ConvertDToIFunc func, | 87 int32_t DefaultCallWrapper(ConvertDToIFunc func, |
| 88 double from) { | 88 double from) { |
| 89 return (*func)(from); | 89 return (*func)(from); |
| 90 } | 90 } |
| 91 | 91 |
| 92 | 92 |
| 93 // #define NaN and Infinity so that it's possible to cut-and-paste these tests | 93 // #define NaN and Infinity so that it's possible to cut-and-paste these tests |
| 94 // directly to a .js file and run them. | 94 // directly to a .js file and run them. |
| 95 #define NaN (v8::base::OS::nan_value()) | 95 #define NaN (std::numeric_limits<double>::quiet_NaN()) |
| 96 #define Infinity (std::numeric_limits<double>::infinity()) | 96 #define Infinity (std::numeric_limits<double>::infinity()) |
| 97 #define RunOneTruncationTest(p1, p2) \ | 97 #define RunOneTruncationTest(p1, p2) \ |
| 98 RunOneTruncationTestWithTest(callWrapper, func, p1, p2) | 98 RunOneTruncationTestWithTest(callWrapper, func, p1, p2) |
| 99 | 99 |
| 100 | 100 |
| 101 void RunAllTruncationTests(ConvertDToIFunc func) { | 101 void RunAllTruncationTests(ConvertDToIFunc func) { |
| 102 RunAllTruncationTests(DefaultCallWrapper, func); | 102 RunAllTruncationTests(DefaultCallWrapper, func); |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| (...skipping 75 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 |