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 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, | 1486 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, |
1487 int capacity, | 1487 int capacity, |
1488 int length) { | 1488 int length) { |
1489 ElementsAccessor* accessor = array->GetElementsAccessor(); | 1489 ElementsAccessor* accessor = array->GetElementsAccessor(); |
1490 CALL_HEAP_FUNCTION_VOID( | 1490 CALL_HEAP_FUNCTION_VOID( |
1491 isolate(), | 1491 isolate(), |
1492 accessor->SetCapacityAndLength(*array, capacity, length)); | 1492 accessor->SetCapacityAndLength(*array, capacity, length)); |
1493 } | 1493 } |
1494 | 1494 |
1495 | 1495 |
1496 void Factory::SetContent(Handle<JSArray> array, | |
1497 Handle<FixedArrayBase> elements) { | |
1498 CALL_HEAP_FUNCTION_VOID( | |
1499 isolate(), | |
1500 array->SetContent(*elements)); | |
1501 } | |
1502 | |
1503 | |
1504 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject( | 1496 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject( |
1505 Handle<JSFunction> function) { | 1497 Handle<JSFunction> function) { |
1506 ASSERT(function->shared()->is_generator()); | 1498 ASSERT(function->shared()->is_generator()); |
1507 JSFunction::EnsureHasInitialMap(function); | 1499 JSFunction::EnsureHasInitialMap(function); |
1508 Handle<Map> map(function->initial_map()); | 1500 Handle<Map> map(function->initial_map()); |
1509 ASSERT(map->instance_type() == JS_GENERATOR_OBJECT_TYPE); | 1501 ASSERT(map->instance_type() == JS_GENERATOR_OBJECT_TYPE); |
1510 CALL_HEAP_FUNCTION( | 1502 CALL_HEAP_FUNCTION( |
1511 isolate(), | 1503 isolate(), |
1512 isolate()->heap()->AllocateJSObjectFromMap(*map), | 1504 isolate()->heap()->AllocateJSObjectFromMap(*map), |
1513 JSGeneratorObject); | 1505 JSGeneratorObject); |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2039 return Handle<Object>::null(); | 2031 return Handle<Object>::null(); |
2040 } | 2032 } |
2041 | 2033 |
2042 | 2034 |
2043 Handle<Object> Factory::ToBoolean(bool value) { | 2035 Handle<Object> Factory::ToBoolean(bool value) { |
2044 return value ? true_value() : false_value(); | 2036 return value ? true_value() : false_value(); |
2045 } | 2037 } |
2046 | 2038 |
2047 | 2039 |
2048 } } // namespace v8::internal | 2040 } } // namespace v8::internal |
OLD | NEW |