OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 } | 1820 } |
1821 | 1821 |
1822 | 1822 |
1823 Object* Heap::AllocateSharedFunctionInfo(Object* name) { | 1823 Object* Heap::AllocateSharedFunctionInfo(Object* name) { |
1824 Object* result = Allocate(THIS->shared_function_info_map(), | 1824 Object* result = Allocate(THIS->shared_function_info_map(), |
1825 OLD_POINTER_SPACE); | 1825 OLD_POINTER_SPACE); |
1826 if (result->IsFailure()) return result; | 1826 if (result->IsFailure()) return result; |
1827 | 1827 |
1828 SharedFunctionInfo* share = SharedFunctionInfo::cast(result); | 1828 SharedFunctionInfo* share = SharedFunctionInfo::cast(result); |
1829 share->set_name(name); | 1829 share->set_name(name); |
1830 Code* illegal = Builtins::builtin(Builtins::Illegal); | 1830 Code* illegal = isolate_->builtins()->builtin(Builtins::Illegal); |
1831 share->set_code(illegal); | 1831 share->set_code(illegal); |
1832 Code* construct_stub = Builtins::builtin(Builtins::JSConstructStubGeneric); | 1832 Code* construct_stub = isolate_->builtins()->builtin( |
| 1833 Builtins::JSConstructStubGeneric); |
1833 share->set_construct_stub(construct_stub); | 1834 share->set_construct_stub(construct_stub); |
1834 share->set_expected_nof_properties(0); | 1835 share->set_expected_nof_properties(0); |
1835 share->set_length(0); | 1836 share->set_length(0); |
1836 share->set_formal_parameter_count(0); | 1837 share->set_formal_parameter_count(0); |
1837 share->set_instance_class_name(THIS->Object_symbol()); | 1838 share->set_instance_class_name(THIS->Object_symbol()); |
1838 share->set_function_data(THIS->undefined_value()); | 1839 share->set_function_data(THIS->undefined_value()); |
1839 share->set_script(THIS->undefined_value()); | 1840 share->set_script(THIS->undefined_value()); |
1840 share->set_start_position_and_type(0); | 1841 share->set_start_position_and_type(0); |
1841 share->set_debug_info(THIS->undefined_value()); | 1842 share->set_debug_info(THIS->undefined_value()); |
1842 share->set_inferred_name(THIS->empty_string()); | 1843 share->set_inferred_name(THIS->empty_string()); |
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3785 v->Synchronize("compilationcache"); | 3786 v->Synchronize("compilationcache"); |
3786 | 3787 |
3787 // Iterate over local handles in handle scopes. | 3788 // Iterate over local handles in handle scopes. |
3788 isolate_->handle_scope_implementer()->Iterate(v); | 3789 isolate_->handle_scope_implementer()->Iterate(v); |
3789 v->Synchronize("handlescope"); | 3790 v->Synchronize("handlescope"); |
3790 | 3791 |
3791 // Iterate over the builtin code objects and code stubs in the | 3792 // Iterate over the builtin code objects and code stubs in the |
3792 // heap. Note that it is not necessary to iterate over code objects | 3793 // heap. Note that it is not necessary to iterate over code objects |
3793 // on scavenge collections. | 3794 // on scavenge collections. |
3794 if (mode != VISIT_ALL_IN_SCAVENGE) { | 3795 if (mode != VISIT_ALL_IN_SCAVENGE) { |
3795 Builtins::IterateBuiltins(v); | 3796 isolate_->builtins()->IterateBuiltins(v); |
3796 } | 3797 } |
3797 v->Synchronize("builtins"); | 3798 v->Synchronize("builtins"); |
3798 | 3799 |
3799 // Iterate over global handles. | 3800 // Iterate over global handles. |
3800 if (mode == VISIT_ONLY_STRONG) { | 3801 if (mode == VISIT_ONLY_STRONG) { |
3801 isolate_->global_handles()->IterateStrongRoots(v); | 3802 isolate_->global_handles()->IterateStrongRoots(v); |
3802 } else { | 3803 } else { |
3803 isolate_->global_handles()->IterateAllRoots(v); | 3804 isolate_->global_handles()->IterateAllRoots(v); |
3804 } | 3805 } |
3805 v->Synchronize("globalhandles"); | 3806 v->Synchronize("globalhandles"); |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4778 void ExternalStringTable::TearDown() { | 4779 void ExternalStringTable::TearDown() { |
4779 new_space_strings_.Free(); | 4780 new_space_strings_.Free(); |
4780 old_space_strings_.Free(); | 4781 old_space_strings_.Free(); |
4781 } | 4782 } |
4782 | 4783 |
4783 | 4784 |
4784 List<Object*> ExternalStringTable::new_space_strings_; | 4785 List<Object*> ExternalStringTable::new_space_strings_; |
4785 List<Object*> ExternalStringTable::old_space_strings_; | 4786 List<Object*> ExternalStringTable::old_space_strings_; |
4786 | 4787 |
4787 } } // namespace v8::internal | 4788 } } // namespace v8::internal |
OLD | NEW |