| 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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 // Return property without being observable by accessors or interceptors. | 1517 // Return property without being observable by accessors or interceptors. |
| 1518 RUNTIME_FUNCTION(Runtime_GetDataProperty) { | 1518 RUNTIME_FUNCTION(Runtime_GetDataProperty) { |
| 1519 HandleScope scope(isolate); | 1519 HandleScope scope(isolate); |
| 1520 DCHECK(args.length() == 2); | 1520 DCHECK(args.length() == 2); |
| 1521 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 1521 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 1522 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); | 1522 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); |
| 1523 return *JSObject::GetDataProperty(object, key); | 1523 return *JSObject::GetDataProperty(object, key); |
| 1524 } | 1524 } |
| 1525 | 1525 |
| 1526 | 1526 |
| 1527 RUNTIME_FUNCTION(Runtime_HasFastPackedElements) { |
| 1528 SealHandleScope shs(isolate); |
| 1529 DCHECK(args.length() == 1); |
| 1530 CONVERT_ARG_CHECKED(HeapObject, obj, 0); |
| 1531 return isolate->heap()->ToBoolean( |
| 1532 IsFastPackedElementsKind(obj->map()->elements_kind())); |
| 1533 } |
| 1534 |
| 1535 |
| 1527 RUNTIME_FUNCTION(RuntimeReference_ValueOf) { | 1536 RUNTIME_FUNCTION(RuntimeReference_ValueOf) { |
| 1528 SealHandleScope shs(isolate); | 1537 SealHandleScope shs(isolate); |
| 1529 DCHECK(args.length() == 1); | 1538 DCHECK(args.length() == 1); |
| 1530 CONVERT_ARG_CHECKED(Object, obj, 0); | 1539 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 1531 if (!obj->IsJSValue()) return obj; | 1540 if (!obj->IsJSValue()) return obj; |
| 1532 return JSValue::cast(obj)->value(); | 1541 return JSValue::cast(obj)->value(); |
| 1533 } | 1542 } |
| 1534 | 1543 |
| 1535 | 1544 |
| 1536 RUNTIME_FUNCTION(RuntimeReference_SetValueOf) { | 1545 RUNTIME_FUNCTION(RuntimeReference_SetValueOf) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 | 1595 |
| 1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { | 1596 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { |
| 1588 SealHandleScope shs(isolate); | 1597 SealHandleScope shs(isolate); |
| 1589 DCHECK(args.length() == 1); | 1598 DCHECK(args.length() == 1); |
| 1590 CONVERT_ARG_CHECKED(Object, obj, 0); | 1599 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); | 1600 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); |
| 1592 return JSReceiver::cast(obj)->class_name(); | 1601 return JSReceiver::cast(obj)->class_name(); |
| 1593 } | 1602 } |
| 1594 } | 1603 } |
| 1595 } // namespace v8::internal | 1604 } // namespace v8::internal |
| OLD | NEW |