| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 PretenureFlag pretenure) { | 953 PretenureFlag pretenure) { |
| 954 CALL_HEAP_FUNCTION( | 954 CALL_HEAP_FUNCTION( |
| 955 isolate(), | 955 isolate(), |
| 956 isolate()->heap()->AllocateJSArrayWithElements(*elements, | 956 isolate()->heap()->AllocateJSArrayWithElements(*elements, |
| 957 elements_kind, | 957 elements_kind, |
| 958 pretenure), | 958 pretenure), |
| 959 JSArray); | 959 JSArray); |
| 960 } | 960 } |
| 961 | 961 |
| 962 | 962 |
| 963 Handle<JSArray> Factory::NewEmptyJSArray(ElementsKind elements_kind, |
| 964 PretenureFlag pretenure) { |
| 965 CALL_HEAP_FUNCTION( |
| 966 isolate(), |
| 967 isolate()->heap()->AllocateEmptyJSArray(elements_kind, pretenure), |
| 968 JSArray); |
| 969 } |
| 970 |
| 971 |
| 963 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, | 972 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, |
| 964 int capacity, | 973 int capacity, |
| 965 int length) { | 974 int length) { |
| 966 ElementsAccessor* accessor = array->GetElementsAccessor(); | 975 ElementsAccessor* accessor = array->GetElementsAccessor(); |
| 967 CALL_HEAP_FUNCTION_VOID( | 976 CALL_HEAP_FUNCTION_VOID( |
| 968 isolate(), | 977 isolate(), |
| 969 accessor->SetCapacityAndLength(*array, capacity, length)); | 978 accessor->SetCapacityAndLength(*array, capacity, length)); |
| 970 } | 979 } |
| 971 | 980 |
| 972 | 981 |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 | 1435 |
| 1427 | 1436 |
| 1428 Handle<Object> Factory::ToBoolean(bool value) { | 1437 Handle<Object> Factory::ToBoolean(bool value) { |
| 1429 return Handle<Object>(value | 1438 return Handle<Object>(value |
| 1430 ? isolate()->heap()->true_value() | 1439 ? isolate()->heap()->true_value() |
| 1431 : isolate()->heap()->false_value()); | 1440 : isolate()->heap()->false_value()); |
| 1432 } | 1441 } |
| 1433 | 1442 |
| 1434 | 1443 |
| 1435 } } // namespace v8::internal | 1444 } } // namespace v8::internal |
| OLD | NEW |