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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 | 1080 |
1081 | 1081 |
1082 RUNTIME_FUNCTION(Runtime_JSValueGetValue) { | 1082 RUNTIME_FUNCTION(Runtime_JSValueGetValue) { |
1083 SealHandleScope shs(isolate); | 1083 SealHandleScope shs(isolate); |
1084 DCHECK(args.length() == 1); | 1084 DCHECK(args.length() == 1); |
1085 CONVERT_ARG_CHECKED(JSValue, obj, 0); | 1085 CONVERT_ARG_CHECKED(JSValue, obj, 0); |
1086 return JSValue::cast(obj)->value(); | 1086 return JSValue::cast(obj)->value(); |
1087 } | 1087 } |
1088 | 1088 |
1089 | 1089 |
1090 RUNTIME_FUNCTION(Runtime_HeapObjectGetMap) { | |
1091 SealHandleScope shs(isolate); | |
1092 DCHECK(args.length() == 1); | |
1093 CONVERT_ARG_CHECKED(HeapObject, obj, 0); | |
1094 return obj->map(); | |
1095 } | |
1096 | |
1097 | |
1098 RUNTIME_FUNCTION(Runtime_MapGetInstanceType) { | |
1099 SealHandleScope shs(isolate); | |
1100 DCHECK(args.length() == 1); | |
1101 CONVERT_ARG_CHECKED(Map, map, 0); | |
1102 return Smi::FromInt(map->instance_type()); | |
1103 } | |
1104 | |
1105 | |
1106 RUNTIME_FUNCTION(Runtime_ObjectEquals) { | 1090 RUNTIME_FUNCTION(Runtime_ObjectEquals) { |
1107 SealHandleScope shs(isolate); | 1091 SealHandleScope shs(isolate); |
1108 DCHECK(args.length() == 2); | 1092 DCHECK(args.length() == 2); |
1109 CONVERT_ARG_CHECKED(Object, obj1, 0); | 1093 CONVERT_ARG_CHECKED(Object, obj1, 0); |
1110 CONVERT_ARG_CHECKED(Object, obj2, 1); | 1094 CONVERT_ARG_CHECKED(Object, obj2, 1); |
1111 return isolate->heap()->ToBoolean(obj1 == obj2); | 1095 return isolate->heap()->ToBoolean(obj1 == obj2); |
1112 } | 1096 } |
1113 | 1097 |
1114 | 1098 |
1115 RUNTIME_FUNCTION(Runtime_IsJSReceiver) { | 1099 RUNTIME_FUNCTION(Runtime_IsJSReceiver) { |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 | 1413 |
1430 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { | 1414 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { |
1431 HandleScope scope(isolate); | 1415 HandleScope scope(isolate); |
1432 DCHECK(args.length() == 2); | 1416 DCHECK(args.length() == 2); |
1433 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); | 1417 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); |
1434 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); | 1418 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); |
1435 return JSReceiver::DefineProperties(isolate, o, properties); | 1419 return JSReceiver::DefineProperties(isolate, o, properties); |
1436 } | 1420 } |
1437 } // namespace internal | 1421 } // namespace internal |
1438 } // namespace v8 | 1422 } // namespace v8 |
OLD | NEW |