OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 void Factory::EnsureCanContainElements(Handle<JSArray> array, | 1039 void Factory::EnsureCanContainElements(Handle<JSArray> array, |
1040 Handle<FixedArrayBase> elements, | 1040 Handle<FixedArrayBase> elements, |
1041 uint32_t length, | 1041 uint32_t length, |
1042 EnsureElementsMode mode) { | 1042 EnsureElementsMode mode) { |
1043 CALL_HEAP_FUNCTION_VOID( | 1043 CALL_HEAP_FUNCTION_VOID( |
1044 isolate(), | 1044 isolate(), |
1045 array->EnsureCanContainElements(*elements, length, mode)); | 1045 array->EnsureCanContainElements(*elements, length, mode)); |
1046 } | 1046 } |
1047 | 1047 |
1048 | 1048 |
| 1049 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer() { |
| 1050 JSFunction* array_buffer_fun = |
| 1051 isolate()->context()->native_context()->array_buffer_fun(); |
| 1052 CALL_HEAP_FUNCTION( |
| 1053 isolate(), |
| 1054 isolate()->heap()->AllocateJSObject(array_buffer_fun), |
| 1055 JSArrayBuffer); |
| 1056 } |
| 1057 |
| 1058 |
1049 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, | 1059 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, |
1050 Handle<Object> prototype) { | 1060 Handle<Object> prototype) { |
1051 CALL_HEAP_FUNCTION( | 1061 CALL_HEAP_FUNCTION( |
1052 isolate(), | 1062 isolate(), |
1053 isolate()->heap()->AllocateJSProxy(*handler, *prototype), | 1063 isolate()->heap()->AllocateJSProxy(*handler, *prototype), |
1054 JSProxy); | 1064 JSProxy); |
1055 } | 1065 } |
1056 | 1066 |
1057 | 1067 |
1058 void Factory::BecomeJSObject(Handle<JSReceiver> object) { | 1068 void Factory::BecomeJSObject(Handle<JSReceiver> object) { |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 return Handle<Object>::null(); | 1496 return Handle<Object>::null(); |
1487 } | 1497 } |
1488 | 1498 |
1489 | 1499 |
1490 Handle<Object> Factory::ToBoolean(bool value) { | 1500 Handle<Object> Factory::ToBoolean(bool value) { |
1491 return value ? true_value() : false_value(); | 1501 return value ? true_value() : false_value(); |
1492 } | 1502 } |
1493 | 1503 |
1494 | 1504 |
1495 } } // namespace v8::internal | 1505 } } // namespace v8::internal |
OLD | NEW |