OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 RUNTIME_FUNCTION(Runtime_MathFround) { | 220 RUNTIME_FUNCTION(Runtime_MathFround) { |
221 HandleScope scope(isolate); | 221 HandleScope scope(isolate); |
222 DCHECK(args.length() == 1); | 222 DCHECK(args.length() == 1); |
223 | 223 |
224 CONVERT_DOUBLE_ARG_CHECKED(x, 0); | 224 CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
225 float xf = DoubleToFloat32(x); | 225 float xf = DoubleToFloat32(x); |
226 return *isolate->factory()->NewNumber(xf); | 226 return *isolate->factory()->NewNumber(xf); |
227 } | 227 } |
228 | 228 |
229 | 229 |
230 RUNTIME_FUNCTION(RuntimeReference_MathPow) { | 230 RUNTIME_FUNCTION(Runtime_MathPow) { |
231 SealHandleScope shs(isolate); | 231 SealHandleScope shs(isolate); |
232 return __RT_impl_Runtime_MathPowSlow(args, isolate); | 232 return __RT_impl_Runtime_MathPowSlow(args, isolate); |
233 } | 233 } |
234 | 234 |
235 | 235 |
236 RUNTIME_FUNCTION(RuntimeReference_IsMinusZero) { | 236 RUNTIME_FUNCTION(Runtime_IsMinusZero) { |
237 SealHandleScope shs(isolate); | 237 SealHandleScope shs(isolate); |
238 DCHECK(args.length() == 1); | 238 DCHECK(args.length() == 1); |
239 CONVERT_ARG_CHECKED(Object, obj, 0); | 239 CONVERT_ARG_CHECKED(Object, obj, 0); |
240 if (!obj->IsHeapNumber()) return isolate->heap()->false_value(); | 240 if (!obj->IsHeapNumber()) return isolate->heap()->false_value(); |
241 HeapNumber* number = HeapNumber::cast(obj); | 241 HeapNumber* number = HeapNumber::cast(obj); |
242 return isolate->heap()->ToBoolean(IsMinusZero(number->value())); | 242 return isolate->heap()->ToBoolean(IsMinusZero(number->value())); |
243 } | 243 } |
244 } | 244 } |
245 } // namespace v8::internal | 245 } // namespace v8::internal |
OLD | NEW |