| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 float lanes[4] = {1, 2, 3, 4}; | 253 float lanes[4] = {1, 2, 3, 4}; |
| 254 float quiet_NaN = std::numeric_limits<float>::quiet_NaN(); | 254 float quiet_NaN = std::numeric_limits<float>::quiet_NaN(); |
| 255 float signaling_NaN = std::numeric_limits<float>::signaling_NaN(); | 255 float signaling_NaN = std::numeric_limits<float>::signaling_NaN(); |
| 256 | 256 |
| 257 Handle<Float32x4> value = factory->NewFloat32x4(lanes); | 257 Handle<Float32x4> value = factory->NewFloat32x4(lanes); |
| 258 CHECK(value->IsFloat32x4()); | 258 CHECK(value->IsFloat32x4()); |
| 259 CheckSimdValue<Float32x4, float, 4>(*value, lanes, 3.14f); | 259 CheckSimdValue<Float32x4, float, 4>(*value, lanes, 3.14f); |
| 260 | 260 |
| 261 // Check special lane values. | 261 // Check special lane values. |
| 262 value->set_lane(1, -0.0); | 262 value->set_lane(1, -0.0); |
| 263 CHECK_EQ(-0.0, value->get_lane(1)); | 263 CHECK_EQ(-0.0f, value->get_lane(1)); |
| 264 CHECK(std::signbit(value->get_lane(1))); // Sign bit should be preserved. | 264 CHECK(std::signbit(value->get_lane(1))); // Sign bit should be preserved. |
| 265 value->set_lane(2, quiet_NaN); | 265 value->set_lane(2, quiet_NaN); |
| 266 CHECK(std::isnan(value->get_lane(2))); | 266 CHECK(std::isnan(value->get_lane(2))); |
| 267 value->set_lane(3, signaling_NaN); | 267 value->set_lane(3, signaling_NaN); |
| 268 CHECK(std::isnan(value->get_lane(3))); | 268 CHECK(std::isnan(value->get_lane(3))); |
| 269 | 269 |
| 270 #ifdef OBJECT_PRINT | 270 #ifdef OBJECT_PRINT |
| 271 // Check value printing. | 271 // Check value printing. |
| 272 { | 272 { |
| 273 value = factory->NewFloat32x4(lanes); | 273 value = factory->NewFloat32x4(lanes); |
| (...skipping 6150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6424 // The CollectGarbage call above starts sweeper threads. | 6424 // The CollectGarbage call above starts sweeper threads. |
| 6425 // The crash will happen if the following two functions | 6425 // The crash will happen if the following two functions |
| 6426 // are called before sweeping finishes. | 6426 // are called before sweeping finishes. |
| 6427 heap->StartIncrementalMarking(); | 6427 heap->StartIncrementalMarking(); |
| 6428 heap->FinalizeIncrementalMarkingIfComplete("test"); | 6428 heap->FinalizeIncrementalMarkingIfComplete("test"); |
| 6429 } | 6429 } |
| 6430 | 6430 |
| 6431 | 6431 |
| 6432 } // namespace internal | 6432 } // namespace internal |
| 6433 } // namespace v8 | 6433 } // namespace v8 |
| OLD | NEW |