| 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 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 pretenure, | 1430 pretenure, |
| 1431 alloc_props, | 1431 alloc_props, |
| 1432 allocation_site.is_null() ? NULL : *allocation_site), | 1432 allocation_site.is_null() ? NULL : *allocation_site), |
| 1433 JSObject); | 1433 JSObject); |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 | 1436 |
| 1437 Handle<JSArray> Factory::NewJSArray(ElementsKind elements_kind, | 1437 Handle<JSArray> Factory::NewJSArray(ElementsKind elements_kind, |
| 1438 int length, | 1438 int length, |
| 1439 int capacity, | 1439 int capacity, |
| 1440 ArrayStorageAllocationMode mode, |
| 1440 PretenureFlag pretenure) { | 1441 PretenureFlag pretenure) { |
| 1441 if (capacity != 0) { | 1442 if (capacity != 0) { |
| 1442 elements_kind = GetHoleyElementsKind(elements_kind); | 1443 elements_kind = GetHoleyElementsKind(elements_kind); |
| 1443 } | 1444 } |
| 1444 CALL_HEAP_FUNCTION(isolate(), | 1445 CALL_HEAP_FUNCTION(isolate(), |
| 1445 isolate()->heap()->AllocateJSArrayAndStorage( | 1446 isolate()->heap()->AllocateJSArrayAndStorage( |
| 1446 elements_kind, | 1447 elements_kind, |
| 1447 length, | 1448 length, |
| 1448 capacity, | 1449 capacity, |
| 1449 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, | 1450 mode, |
| 1450 pretenure), | 1451 pretenure), |
| 1451 JSArray); | 1452 JSArray); |
| 1452 } | 1453 } |
| 1453 | 1454 |
| 1454 | 1455 |
| 1455 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, | 1456 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, |
| 1456 ElementsKind elements_kind, | 1457 ElementsKind elements_kind, |
| 1457 int length, | 1458 int length, |
| 1458 PretenureFlag pretenure) { | 1459 PretenureFlag pretenure) { |
| 1459 ASSERT(length <= elements->length()); | 1460 ASSERT(length <= elements->length()); |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2017 return Handle<Object>::null(); | 2018 return Handle<Object>::null(); |
| 2018 } | 2019 } |
| 2019 | 2020 |
| 2020 | 2021 |
| 2021 Handle<Object> Factory::ToBoolean(bool value) { | 2022 Handle<Object> Factory::ToBoolean(bool value) { |
| 2022 return value ? true_value() : false_value(); | 2023 return value ? true_value() : false_value(); |
| 2023 } | 2024 } |
| 2024 | 2025 |
| 2025 | 2026 |
| 2026 } } // namespace v8::internal | 2027 } } // namespace v8::internal |
| OLD | NEW |