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/conversions-inl.h" | 8 #include "src/conversions-inl.h" |
9 #include "src/factory.h" | 9 #include "src/factory.h" |
10 | 10 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 | 319 |
320 RUNTIME_FUNCTION(Runtime_GetWeakSetValues) { | 320 RUNTIME_FUNCTION(Runtime_GetWeakSetValues) { |
321 HandleScope scope(isolate); | 321 HandleScope scope(isolate); |
322 DCHECK_EQ(2, args.length()); | 322 DCHECK_EQ(2, args.length()); |
323 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0); | 323 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0); |
324 CONVERT_NUMBER_CHECKED(int, max_values, Int32, args[1]); | 324 CONVERT_NUMBER_CHECKED(int, max_values, Int32, args[1]); |
325 CHECK(max_values >= 0); | 325 CHECK(max_values >= 0); |
326 return *JSWeakCollection::GetEntries(holder, max_values); | 326 return *JSWeakCollection::GetEntries(holder, max_values); |
327 } | 327 } |
| 328 |
| 329 RUNTIME_FUNCTION(Runtime_IsJSMap) { |
| 330 SealHandleScope shs(isolate); |
| 331 DCHECK_EQ(1, args.length()); |
| 332 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 333 return isolate->heap()->ToBoolean(obj->IsJSMap()); |
| 334 } |
| 335 |
| 336 RUNTIME_FUNCTION(Runtime_IsJSSet) { |
| 337 SealHandleScope shs(isolate); |
| 338 DCHECK_EQ(1, args.length()); |
| 339 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 340 return isolate->heap()->ToBoolean(obj->IsJSSet()); |
| 341 } |
| 342 |
| 343 RUNTIME_FUNCTION(Runtime_IsJSMapIterator) { |
| 344 SealHandleScope shs(isolate); |
| 345 DCHECK_EQ(1, args.length()); |
| 346 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 347 return isolate->heap()->ToBoolean(obj->IsJSMapIterator()); |
| 348 } |
| 349 |
| 350 RUNTIME_FUNCTION(Runtime_IsJSSetIterator) { |
| 351 SealHandleScope shs(isolate); |
| 352 DCHECK_EQ(1, args.length()); |
| 353 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 354 return isolate->heap()->ToBoolean(obj->IsJSSetIterator()); |
| 355 } |
| 356 |
| 357 RUNTIME_FUNCTION(Runtime_IsJSWeakMap) { |
| 358 SealHandleScope shs(isolate); |
| 359 DCHECK_EQ(1, args.length()); |
| 360 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 361 return isolate->heap()->ToBoolean(obj->IsJSWeakMap()); |
| 362 } |
| 363 |
| 364 RUNTIME_FUNCTION(Runtime_IsJSWeakSet) { |
| 365 SealHandleScope shs(isolate); |
| 366 DCHECK_EQ(1, args.length()); |
| 367 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 368 return isolate->heap()->ToBoolean(obj->IsJSWeakSet()); |
| 369 } |
| 370 |
328 } // namespace internal | 371 } // namespace internal |
329 } // namespace v8 | 372 } // namespace v8 |
OLD | NEW |