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/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 CONVERT_ARG_CHECKED(Object, obj1, 0); | 1256 CONVERT_ARG_CHECKED(Object, obj1, 0); |
1257 CONVERT_ARG_CHECKED(Object, obj2, 1); | 1257 CONVERT_ARG_CHECKED(Object, obj2, 1); |
1258 return isolate->heap()->ToBoolean(obj1 == obj2); | 1258 return isolate->heap()->ToBoolean(obj1 == obj2); |
1259 } | 1259 } |
1260 | 1260 |
1261 | 1261 |
1262 RUNTIME_FUNCTION(Runtime_IsSpecObject) { | 1262 RUNTIME_FUNCTION(Runtime_IsSpecObject) { |
1263 SealHandleScope shs(isolate); | 1263 SealHandleScope shs(isolate); |
1264 DCHECK(args.length() == 1); | 1264 DCHECK(args.length() == 1); |
1265 CONVERT_ARG_CHECKED(Object, obj, 0); | 1265 CONVERT_ARG_CHECKED(Object, obj, 0); |
1266 return isolate->heap()->ToBoolean(obj->IsSpecObject()); | 1266 return isolate->heap()->ToBoolean(obj->IsJSReceiver()); |
1267 } | 1267 } |
1268 | 1268 |
1269 | 1269 |
1270 RUNTIME_FUNCTION(Runtime_IsStrong) { | 1270 RUNTIME_FUNCTION(Runtime_IsStrong) { |
1271 SealHandleScope shs(isolate); | 1271 SealHandleScope shs(isolate); |
1272 DCHECK(args.length() == 1); | 1272 DCHECK(args.length() == 1); |
1273 CONVERT_ARG_CHECKED(Object, obj, 0); | 1273 CONVERT_ARG_CHECKED(Object, obj, 0); |
1274 return isolate->heap()->ToBoolean(obj->IsJSReceiver() && | 1274 return isolate->heap()->ToBoolean(obj->IsJSReceiver() && |
1275 JSReceiver::cast(obj)->map()->is_strong()); | 1275 JSReceiver::cast(obj)->map()->is_strong()); |
1276 } | 1276 } |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 | 1574 |
1575 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { | 1575 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { |
1576 HandleScope scope(isolate); | 1576 HandleScope scope(isolate); |
1577 DCHECK(args.length() == 2); | 1577 DCHECK(args.length() == 2); |
1578 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); | 1578 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); |
1579 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); | 1579 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); |
1580 return JSReceiver::DefineProperties(isolate, o, properties); | 1580 return JSReceiver::DefineProperties(isolate, o, properties); |
1581 } | 1581 } |
1582 } // namespace internal | 1582 } // namespace internal |
1583 } // namespace v8 | 1583 } // namespace v8 |
OLD | NEW |