OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 } | 710 } |
711 | 711 |
712 | 712 |
713 | 713 |
714 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { | 714 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { |
715 CALL_HEAP_FUNCTION(Heap::AllocateJSObjectFromMap(*map, NOT_TENURED), | 715 CALL_HEAP_FUNCTION(Heap::AllocateJSObjectFromMap(*map, NOT_TENURED), |
716 JSObject); | 716 JSObject); |
717 } | 717 } |
718 | 718 |
719 | 719 |
720 Handle<JSArray> Factory::NewJSArray(int length, | 720 Handle<JSArray> Factory::NewJSArray(int capacity, |
721 PretenureFlag pretenure) { | 721 PretenureFlag pretenure) { |
722 Handle<JSObject> obj = NewJSObject(Top::array_function(), pretenure); | 722 Handle<JSObject> obj = NewJSObject(Top::array_function(), pretenure); |
723 CALL_HEAP_FUNCTION(Handle<JSArray>::cast(obj)->Initialize(length), JSArray); | 723 CALL_HEAP_FUNCTION(Handle<JSArray>::cast(obj)->Initialize(capacity), JSArray); |
724 } | 724 } |
725 | 725 |
726 | 726 |
727 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements, | 727 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements, |
728 PretenureFlag pretenure) { | 728 PretenureFlag pretenure) { |
729 Handle<JSArray> result = | 729 Handle<JSArray> result = |
730 Handle<JSArray>::cast(NewJSObject(Top::array_function(), pretenure)); | 730 Handle<JSArray>::cast(NewJSObject(Top::array_function(), pretenure)); |
731 result->SetContent(*elements); | 731 result->SetContent(*elements); |
732 return result; | 732 return result; |
733 } | 733 } |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 Execution::ConfigureInstance(instance, | 1069 Execution::ConfigureInstance(instance, |
1070 instance_template, | 1070 instance_template, |
1071 pending_exception); | 1071 pending_exception); |
1072 } else { | 1072 } else { |
1073 *pending_exception = false; | 1073 *pending_exception = false; |
1074 } | 1074 } |
1075 } | 1075 } |
1076 | 1076 |
1077 | 1077 |
1078 } } // namespace v8::internal | 1078 } } // namespace v8::internal |
OLD | NEW |