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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer() { | 1073 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer() { |
1074 JSFunction* array_buffer_fun = | 1074 JSFunction* array_buffer_fun = |
1075 isolate()->context()->native_context()->array_buffer_fun(); | 1075 isolate()->context()->native_context()->array_buffer_fun(); |
1076 CALL_HEAP_FUNCTION( | 1076 CALL_HEAP_FUNCTION( |
1077 isolate(), | 1077 isolate(), |
1078 isolate()->heap()->AllocateJSObject(array_buffer_fun), | 1078 isolate()->heap()->AllocateJSObject(array_buffer_fun), |
1079 JSArrayBuffer); | 1079 JSArrayBuffer); |
1080 } | 1080 } |
1081 | 1081 |
1082 | 1082 |
| 1083 Handle<JSDataView> Factory::NewJSDataView() { |
| 1084 JSFunction* data_view_fun = |
| 1085 isolate()->context()->native_context()->data_view_fun(); |
| 1086 CALL_HEAP_FUNCTION( |
| 1087 isolate(), |
| 1088 isolate()->heap()->AllocateJSObject(data_view_fun), |
| 1089 JSDataView); |
| 1090 } |
| 1091 |
| 1092 |
1083 Handle<JSTypedArray> Factory::NewJSTypedArray(ExternalArrayType type) { | 1093 Handle<JSTypedArray> Factory::NewJSTypedArray(ExternalArrayType type) { |
1084 JSFunction* typed_array_fun; | 1094 JSFunction* typed_array_fun; |
1085 Context* native_context = isolate()->context()->native_context(); | 1095 Context* native_context = isolate()->context()->native_context(); |
1086 switch (type) { | 1096 switch (type) { |
1087 case kExternalUnsignedByteArray: | 1097 case kExternalUnsignedByteArray: |
1088 typed_array_fun = native_context->uint8_array_fun(); | 1098 typed_array_fun = native_context->uint8_array_fun(); |
1089 break; | 1099 break; |
1090 | 1100 |
1091 case kExternalByteArray: | 1101 case kExternalByteArray: |
1092 typed_array_fun = native_context->int8_array_fun(); | 1102 typed_array_fun = native_context->int8_array_fun(); |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1572 return Handle<Object>::null(); | 1582 return Handle<Object>::null(); |
1573 } | 1583 } |
1574 | 1584 |
1575 | 1585 |
1576 Handle<Object> Factory::ToBoolean(bool value) { | 1586 Handle<Object> Factory::ToBoolean(bool value) { |
1577 return value ? true_value() : false_value(); | 1587 return value ? true_value() : false_value(); |
1578 } | 1588 } |
1579 | 1589 |
1580 | 1590 |
1581 } } // namespace v8::internal | 1591 } } // namespace v8::internal |
OLD | NEW |