| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 | 207 |
| 208 RUNTIME_FUNCTION(Runtime_IsSmi) { | 208 RUNTIME_FUNCTION(Runtime_IsSmi) { |
| 209 SealHandleScope shs(isolate); | 209 SealHandleScope shs(isolate); |
| 210 DCHECK_EQ(1, args.length()); | 210 DCHECK_EQ(1, args.length()); |
| 211 CONVERT_ARG_CHECKED(Object, obj, 0); | 211 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 212 return isolate->heap()->ToBoolean(obj->IsSmi()); | 212 return isolate->heap()->ToBoolean(obj->IsSmi()); |
| 213 } | 213 } |
| 214 | 214 |
| 215 | 215 |
| 216 RUNTIME_FUNCTION(Runtime_GetRootNaN) { | |
| 217 SealHandleScope shs(isolate); | |
| 218 DCHECK_EQ(0, args.length()); | |
| 219 return isolate->heap()->nan_value(); | |
| 220 } | |
| 221 | |
| 222 | |
| 223 RUNTIME_FUNCTION(Runtime_GetHoleNaNUpper) { | 216 RUNTIME_FUNCTION(Runtime_GetHoleNaNUpper) { |
| 224 HandleScope scope(isolate); | 217 HandleScope scope(isolate); |
| 225 DCHECK_EQ(0, args.length()); | 218 DCHECK_EQ(0, args.length()); |
| 226 return *isolate->factory()->NewNumberFromUint(kHoleNanUpper32); | 219 return *isolate->factory()->NewNumberFromUint(kHoleNanUpper32); |
| 227 } | 220 } |
| 228 | 221 |
| 229 | 222 |
| 230 RUNTIME_FUNCTION(Runtime_GetHoleNaNLower) { | 223 RUNTIME_FUNCTION(Runtime_GetHoleNaNLower) { |
| 231 HandleScope scope(isolate); | 224 HandleScope scope(isolate); |
| 232 DCHECK_EQ(0, args.length()); | 225 DCHECK_EQ(0, args.length()); |
| 233 return *isolate->factory()->NewNumberFromUint(kHoleNanLower32); | 226 return *isolate->factory()->NewNumberFromUint(kHoleNanLower32); |
| 234 } | 227 } |
| 235 | 228 |
| 236 | 229 |
| 237 } // namespace internal | 230 } // namespace internal |
| 238 } // namespace v8 | 231 } // namespace v8 |
| OLD | NEW |