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/messages.h" | 10 #include "src/messages.h" |
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 | 1511 |
1512 | 1512 |
1513 RUNTIME_FUNCTION(Runtime_IsSpecObject) { | 1513 RUNTIME_FUNCTION(Runtime_IsSpecObject) { |
1514 SealHandleScope shs(isolate); | 1514 SealHandleScope shs(isolate); |
1515 DCHECK(args.length() == 1); | 1515 DCHECK(args.length() == 1); |
1516 CONVERT_ARG_CHECKED(Object, obj, 0); | 1516 CONVERT_ARG_CHECKED(Object, obj, 0); |
1517 return isolate->heap()->ToBoolean(obj->IsSpecObject()); | 1517 return isolate->heap()->ToBoolean(obj->IsSpecObject()); |
1518 } | 1518 } |
1519 | 1519 |
1520 | 1520 |
| 1521 RUNTIME_FUNCTION(Runtime_IsStrong) { |
| 1522 SealHandleScope shs(isolate); |
| 1523 DCHECK(args.length() == 1); |
| 1524 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 1525 return isolate->heap()->ToBoolean(obj->IsJSReceiver() && |
| 1526 JSReceiver::cast(obj)->map()->is_strong()); |
| 1527 } |
| 1528 |
| 1529 |
1521 RUNTIME_FUNCTION(Runtime_ClassOf) { | 1530 RUNTIME_FUNCTION(Runtime_ClassOf) { |
1522 SealHandleScope shs(isolate); | 1531 SealHandleScope shs(isolate); |
1523 DCHECK(args.length() == 1); | 1532 DCHECK(args.length() == 1); |
1524 CONVERT_ARG_CHECKED(Object, obj, 0); | 1533 CONVERT_ARG_CHECKED(Object, obj, 0); |
1525 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); | 1534 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); |
1526 return JSReceiver::cast(obj)->class_name(); | 1535 return JSReceiver::cast(obj)->class_name(); |
1527 } | 1536 } |
1528 | 1537 |
1529 | 1538 |
1530 RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) { | 1539 RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) { |
(...skipping 21 matching lines...) Expand all Loading... |
1552 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); | 1561 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); |
1553 | 1562 |
1554 RETURN_FAILURE_ON_EXCEPTION( | 1563 RETURN_FAILURE_ON_EXCEPTION( |
1555 isolate, | 1564 isolate, |
1556 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), | 1565 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), |
1557 setter, attrs)); | 1566 setter, attrs)); |
1558 return isolate->heap()->undefined_value(); | 1567 return isolate->heap()->undefined_value(); |
1559 } | 1568 } |
1560 } | 1569 } |
1561 } // namespace v8::internal | 1570 } // namespace v8::internal |
OLD | NEW |