| 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 } | 961 } |
| 962 | 962 |
| 963 | 963 |
| 964 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, | 964 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, |
| 965 ElementsKind elements_kind, | 965 ElementsKind elements_kind, |
| 966 PretenureFlag pretenure) { | 966 PretenureFlag pretenure) { |
| 967 CALL_HEAP_FUNCTION( | 967 CALL_HEAP_FUNCTION( |
| 968 isolate(), | 968 isolate(), |
| 969 isolate()->heap()->AllocateJSArrayWithElements(*elements, | 969 isolate()->heap()->AllocateJSArrayWithElements(*elements, |
| 970 elements_kind, | 970 elements_kind, |
| 971 elements->length(), |
| 971 pretenure), | 972 pretenure), |
| 972 JSArray); | 973 JSArray); |
| 973 } | 974 } |
| 974 | 975 |
| 975 | 976 |
| 976 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, | 977 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, |
| 977 int capacity, | 978 int capacity, |
| 978 int length) { | 979 int length) { |
| 979 ElementsAccessor* accessor = array->GetElementsAccessor(); | 980 ElementsAccessor* accessor = array->GetElementsAccessor(); |
| 980 CALL_HEAP_FUNCTION_VOID( | 981 CALL_HEAP_FUNCTION_VOID( |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 | 1440 |
| 1440 | 1441 |
| 1441 Handle<Object> Factory::ToBoolean(bool value) { | 1442 Handle<Object> Factory::ToBoolean(bool value) { |
| 1442 return Handle<Object>(value | 1443 return Handle<Object>(value |
| 1443 ? isolate()->heap()->true_value() | 1444 ? isolate()->heap()->true_value() |
| 1444 : isolate()->heap()->false_value()); | 1445 : isolate()->heap()->false_value()); |
| 1445 } | 1446 } |
| 1446 | 1447 |
| 1447 | 1448 |
| 1448 } } // namespace v8::internal | 1449 } } // namespace v8::internal |
| OLD | NEW |