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/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 return isolate->heap()->ToBoolean(obj->Has##Name()); \ | 473 return isolate->heap()->ToBoolean(obj->Has##Name()); \ |
474 } | 474 } |
475 | 475 |
476 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastSmiElements) | 476 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastSmiElements) |
477 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastObjectElements) | 477 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastObjectElements) |
478 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastSmiOrObjectElements) | 478 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastSmiOrObjectElements) |
479 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastDoubleElements) | 479 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastDoubleElements) |
480 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastHoleyElements) | 480 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastHoleyElements) |
481 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(DictionaryElements) | 481 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(DictionaryElements) |
482 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(SloppyArgumentsElements) | 482 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(SloppyArgumentsElements) |
483 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FixedTypedArrayElements) | 483 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalArrayElements) |
484 // Properties test sitting with elements tests - not fooling anyone. | 484 // Properties test sitting with elements tests - not fooling anyone. |
485 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastProperties) | 485 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastProperties) |
486 | 486 |
487 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION | 487 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION |
488 | 488 |
489 | 489 |
| 490 #define TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION(Type, type, TYPE, ctype, size) \ |
| 491 RUNTIME_FUNCTION(Runtime_HasExternal##Type##Elements) { \ |
| 492 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
| 493 return isolate->heap()->ToBoolean(obj->HasExternal##Type##Elements()); \ |
| 494 } |
| 495 |
| 496 TYPED_ARRAYS(TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
| 497 |
| 498 #undef TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
| 499 |
| 500 |
490 #define FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION(Type, type, TYPE, ctype, s) \ | 501 #define FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION(Type, type, TYPE, ctype, s) \ |
491 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 502 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
492 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 503 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
493 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 504 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
494 } | 505 } |
495 | 506 |
496 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 507 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
497 | 508 |
498 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 509 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
499 } // namespace internal | 510 } // namespace internal |
500 } // namespace v8 | 511 } // namespace v8 |
OLD | NEW |