| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 CALL_HEAP_FUNCTION(Heap::AllocateFixedArray(size, pretenure), FixedArray); | 42 CALL_HEAP_FUNCTION(Heap::AllocateFixedArray(size, pretenure), FixedArray); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size) { | 46 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size) { |
| 47 ASSERT(0 <= size); | 47 ASSERT(0 <= size); |
| 48 CALL_HEAP_FUNCTION(Heap::AllocateFixedArrayWithHoles(size), FixedArray); | 48 CALL_HEAP_FUNCTION(Heap::AllocateFixedArrayWithHoles(size), FixedArray); |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 Handle<Dictionary> Factory::NewDictionary(int at_least_space_for) { | 52 Handle<StringDictionary> Factory::NewStringDictionary(int at_least_space_for) { |
| 53 ASSERT(0 <= at_least_space_for); | 53 ASSERT(0 <= at_least_space_for); |
| 54 CALL_HEAP_FUNCTION(Dictionary::Allocate(at_least_space_for), Dictionary); | 54 CALL_HEAP_FUNCTION(StringDictionary::Allocate(at_least_space_for), |
| 55 StringDictionary); |
| 56 } |
| 57 |
| 58 |
| 59 Handle<NumberDictionary> Factory::NewNumberDictionary(int at_least_space_for) { |
| 60 ASSERT(0 <= at_least_space_for); |
| 61 CALL_HEAP_FUNCTION(NumberDictionary::Allocate(at_least_space_for), |
| 62 NumberDictionary); |
| 55 } | 63 } |
| 56 | 64 |
| 57 | 65 |
| 58 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) { | 66 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) { |
| 59 ASSERT(0 <= number_of_descriptors); | 67 ASSERT(0 <= number_of_descriptors); |
| 60 CALL_HEAP_FUNCTION(DescriptorArray::Allocate(number_of_descriptors), | 68 CALL_HEAP_FUNCTION(DescriptorArray::Allocate(number_of_descriptors), |
| 61 DescriptorArray); | 69 DescriptorArray); |
| 62 } | 70 } |
| 63 | 71 |
| 64 | 72 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 return result; | 656 return result; |
| 649 } | 657 } |
| 650 | 658 |
| 651 | 659 |
| 652 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(Handle<String> name) { | 660 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(Handle<String> name) { |
| 653 CALL_HEAP_FUNCTION(Heap::AllocateSharedFunctionInfo(*name), | 661 CALL_HEAP_FUNCTION(Heap::AllocateSharedFunctionInfo(*name), |
| 654 SharedFunctionInfo); | 662 SharedFunctionInfo); |
| 655 } | 663 } |
| 656 | 664 |
| 657 | 665 |
| 658 Handle<Dictionary> Factory::DictionaryAtNumberPut(Handle<Dictionary> dictionary, | 666 Handle<NumberDictionary> Factory::DictionaryAtNumberPut( |
| 659 uint32_t key, | 667 Handle<NumberDictionary> dictionary, |
| 660 Handle<Object> value) { | 668 uint32_t key, |
| 661 CALL_HEAP_FUNCTION(dictionary->AtNumberPut(key, *value), Dictionary); | 669 Handle<Object> value) { |
| 670 CALL_HEAP_FUNCTION(dictionary->AtNumberPut(key, *value), NumberDictionary); |
| 662 } | 671 } |
| 663 | 672 |
| 664 | 673 |
| 665 Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name, | 674 Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name, |
| 666 Handle<Object> prototype) { | 675 Handle<Object> prototype) { |
| 667 Handle<SharedFunctionInfo> function_share = NewSharedFunctionInfo(name); | 676 Handle<SharedFunctionInfo> function_share = NewSharedFunctionInfo(name); |
| 668 CALL_HEAP_FUNCTION(Heap::AllocateFunction(*Top::function_map(), | 677 CALL_HEAP_FUNCTION(Heap::AllocateFunction(*Top::function_map(), |
| 669 *function_share, | 678 *function_share, |
| 670 *prototype), | 679 *prototype), |
| 671 JSFunction); | 680 JSFunction); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 Execution::ConfigureInstance(instance, | 919 Execution::ConfigureInstance(instance, |
| 911 instance_template, | 920 instance_template, |
| 912 pending_exception); | 921 pending_exception); |
| 913 } else { | 922 } else { |
| 914 *pending_exception = false; | 923 *pending_exception = false; |
| 915 } | 924 } |
| 916 } | 925 } |
| 917 | 926 |
| 918 | 927 |
| 919 } } // namespace v8::internal | 928 } } // namespace v8::internal |
| OLD | NEW |