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/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/runtime/runtime.h" | 10 #include "src/runtime/runtime.h" |
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 } | 1584 } |
1585 | 1585 |
1586 | 1586 |
1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { | 1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { |
1588 SealHandleScope shs(isolate); | 1588 SealHandleScope shs(isolate); |
1589 DCHECK(args.length() == 1); | 1589 DCHECK(args.length() == 1); |
1590 CONVERT_ARG_CHECKED(Object, obj, 0); | 1590 CONVERT_ARG_CHECKED(Object, obj, 0); |
1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); | 1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); |
1592 return JSReceiver::cast(obj)->class_name(); | 1592 return JSReceiver::cast(obj)->class_name(); |
1593 } | 1593 } |
| 1594 |
| 1595 |
| 1596 RUNTIME_FUNCTION(RuntimeReference_HasFastPackedElements) { |
| 1597 SealHandleScope shs(isolate); |
| 1598 DCHECK(args.length() == 1); |
| 1599 CONVERT_ARG_CHECKED(HeapObject, obj, 0); |
| 1600 return isolate->heap()->ToBoolean( |
| 1601 IsFastPackedElementsKind(obj->map()->elements_kind())); |
| 1602 } |
1594 } | 1603 } |
1595 } // namespace v8::internal | 1604 } // namespace v8::internal |
OLD | NEW |