| 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.h" | 10 #include "src/runtime/runtime.h" |
| 11 #include "src/runtime/runtime-utils.h" | 11 #include "src/runtime/runtime-utils.h" |
| 12 #include "third_party/fdlibm/fdlibm.h" | 12 #include "src/third_party/fdlibm/fdlibm.h" |
| 13 | 13 |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 #define RUNTIME_UNARY_MATH(Name, name) \ | 18 #define RUNTIME_UNARY_MATH(Name, name) \ |
| 19 RUNTIME_FUNCTION(Runtime_Math##Name) { \ | 19 RUNTIME_FUNCTION(Runtime_Math##Name) { \ |
| 20 HandleScope scope(isolate); \ | 20 HandleScope scope(isolate); \ |
| 21 DCHECK(args.length() == 1); \ | 21 DCHECK(args.length() == 1); \ |
| 22 isolate->counters()->math_##name()->Increment(); \ | 22 isolate->counters()->math_##name()->Increment(); \ |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 RUNTIME_FUNCTION(RuntimeReference_IsMinusZero) { | 238 RUNTIME_FUNCTION(RuntimeReference_IsMinusZero) { |
| 239 SealHandleScope shs(isolate); | 239 SealHandleScope shs(isolate); |
| 240 DCHECK(args.length() == 1); | 240 DCHECK(args.length() == 1); |
| 241 CONVERT_ARG_CHECKED(Object, obj, 0); | 241 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 242 if (!obj->IsHeapNumber()) return isolate->heap()->false_value(); | 242 if (!obj->IsHeapNumber()) return isolate->heap()->false_value(); |
| 243 HeapNumber* number = HeapNumber::cast(obj); | 243 HeapNumber* number = HeapNumber::cast(obj); |
| 244 return isolate->heap()->ToBoolean(IsMinusZero(number->value())); | 244 return isolate->heap()->ToBoolean(IsMinusZero(number->value())); |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 } // namespace v8::internal | 247 } // namespace v8::internal |
| OLD | NEW |