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/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/conversions-inl.h" | 9 #include "src/conversions-inl.h" |
10 #include "src/elements.h" | 10 #include "src/elements.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 return isolate->heap()->ToBoolean(result.FromJust()); | 420 return isolate->heap()->ToBoolean(result.FromJust()); |
421 } | 421 } |
422 | 422 |
423 RUNTIME_FUNCTION(Runtime_IsArray) { | 423 RUNTIME_FUNCTION(Runtime_IsArray) { |
424 SealHandleScope shs(isolate); | 424 SealHandleScope shs(isolate); |
425 DCHECK(args.length() == 1); | 425 DCHECK(args.length() == 1); |
426 CONVERT_ARG_CHECKED(Object, obj, 0); | 426 CONVERT_ARG_CHECKED(Object, obj, 0); |
427 return isolate->heap()->ToBoolean(obj->IsJSArray()); | 427 return isolate->heap()->ToBoolean(obj->IsJSArray()); |
428 } | 428 } |
429 | 429 |
430 RUNTIME_FUNCTION(Runtime_HasCachedArrayIndex) { | |
431 SealHandleScope shs(isolate); | |
432 DCHECK(args.length() == 1); | |
433 return isolate->heap()->false_value(); | |
434 } | |
435 | |
436 | |
437 RUNTIME_FUNCTION(Runtime_GetCachedArrayIndex) { | |
438 // This can never be reached, because Runtime_HasCachedArrayIndex always | |
439 // returns false. | |
440 UNIMPLEMENTED(); | |
441 return nullptr; | |
442 } | |
443 | |
444 | |
445 RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) { | 430 RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) { |
446 HandleScope scope(isolate); | 431 HandleScope scope(isolate); |
447 DCHECK(args.length() == 1); | 432 DCHECK(args.length() == 1); |
448 CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0); | 433 CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0); |
449 RETURN_RESULT_OR_FAILURE( | 434 RETURN_RESULT_OR_FAILURE( |
450 isolate, Object::ArraySpeciesConstructor(isolate, original_array)); | 435 isolate, Object::ArraySpeciesConstructor(isolate, original_array)); |
451 } | 436 } |
452 | 437 |
453 // ES7 22.1.3.11 Array.prototype.includes | 438 // ES7 22.1.3.11 Array.prototype.includes |
454 RUNTIME_FUNCTION(Runtime_ArrayIncludes_Slow) { | 439 RUNTIME_FUNCTION(Runtime_ArrayIncludes_Slow) { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 if (search_element->StrictEquals(*element_k)) { | 623 if (search_element->StrictEquals(*element_k)) { |
639 return *index_obj; | 624 return *index_obj; |
640 } | 625 } |
641 } | 626 } |
642 } | 627 } |
643 return Smi::FromInt(-1); | 628 return Smi::FromInt(-1); |
644 } | 629 } |
645 | 630 |
646 } // namespace internal | 631 } // namespace internal |
647 } // namespace v8 | 632 } // namespace v8 |
OLD | NEW |