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 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3763 | 3763 |
3764 return share; | 3764 return share; |
3765 } | 3765 } |
3766 | 3766 |
3767 | 3767 |
3768 MaybeObject* Heap::AllocateJSMessageObject(String* type, | 3768 MaybeObject* Heap::AllocateJSMessageObject(String* type, |
3769 JSArray* arguments, | 3769 JSArray* arguments, |
3770 int start_position, | 3770 int start_position, |
3771 int end_position, | 3771 int end_position, |
3772 Object* script, | 3772 Object* script, |
3773 Object* stack_trace, | |
3774 Object* stack_frames) { | 3773 Object* stack_frames) { |
3775 Object* result; | 3774 Object* result; |
3776 { MaybeObject* maybe_result = Allocate(message_object_map(), NEW_SPACE); | 3775 { MaybeObject* maybe_result = Allocate(message_object_map(), NEW_SPACE); |
3777 if (!maybe_result->ToObject(&result)) return maybe_result; | 3776 if (!maybe_result->ToObject(&result)) return maybe_result; |
3778 } | 3777 } |
3779 JSMessageObject* message = JSMessageObject::cast(result); | 3778 JSMessageObject* message = JSMessageObject::cast(result); |
3780 message->set_properties(Heap::empty_fixed_array(), SKIP_WRITE_BARRIER); | 3779 message->set_properties(Heap::empty_fixed_array(), SKIP_WRITE_BARRIER); |
3781 message->initialize_elements(); | 3780 message->initialize_elements(); |
3782 message->set_elements(Heap::empty_fixed_array(), SKIP_WRITE_BARRIER); | 3781 message->set_elements(Heap::empty_fixed_array(), SKIP_WRITE_BARRIER); |
3783 message->set_type(type); | 3782 message->set_type(type); |
3784 message->set_arguments(arguments); | 3783 message->set_arguments(arguments); |
3785 message->set_start_position(start_position); | 3784 message->set_start_position(start_position); |
3786 message->set_end_position(end_position); | 3785 message->set_end_position(end_position); |
3787 message->set_script(script); | 3786 message->set_script(script); |
3788 message->set_stack_trace(stack_trace); | |
3789 message->set_stack_frames(stack_frames); | 3787 message->set_stack_frames(stack_frames); |
3790 return result; | 3788 return result; |
3791 } | 3789 } |
3792 | 3790 |
3793 | 3791 |
3794 MaybeObject* Heap::AllocateExternalStringFromAscii( | 3792 MaybeObject* Heap::AllocateExternalStringFromAscii( |
3795 const ExternalAsciiString::Resource* resource) { | 3793 const ExternalAsciiString::Resource* resource) { |
3796 size_t length = resource->length(); | 3794 size_t length = resource->length(); |
3797 if (length > static_cast<size_t>(String::kMaxLength)) { | 3795 if (length > static_cast<size_t>(String::kMaxLength)) { |
3798 isolate()->context()->mark_out_of_memory(); | 3796 isolate()->context()->mark_out_of_memory(); |
(...skipping 3903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7702 static_cast<int>(object_sizes_last_time_[index])); | 7700 static_cast<int>(object_sizes_last_time_[index])); |
7703 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7701 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7704 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7702 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7705 | 7703 |
7706 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7704 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7707 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7705 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7708 ClearObjectStats(); | 7706 ClearObjectStats(); |
7709 } | 7707 } |
7710 | 7708 |
7711 } } // namespace v8::internal | 7709 } } // namespace v8::internal |
OLD | NEW |