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 3767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3778 maybe_result = lo_space_->AllocateRaw(obj_size, EXECUTABLE); | 3778 maybe_result = lo_space_->AllocateRaw(obj_size, EXECUTABLE); |
3779 if (!maybe_result->To<HeapObject>(&result)) return maybe_result; | 3779 if (!maybe_result->To<HeapObject>(&result)) return maybe_result; |
3780 } | 3780 } |
3781 | 3781 |
3782 // Initialize the object | 3782 // Initialize the object |
3783 result->set_map_no_write_barrier(code_map()); | 3783 result->set_map_no_write_barrier(code_map()); |
3784 Code* code = Code::cast(result); | 3784 Code* code = Code::cast(result); |
3785 ASSERT(!isolate_->code_range()->exists() || | 3785 ASSERT(!isolate_->code_range()->exists() || |
3786 isolate_->code_range()->contains(code->address())); | 3786 isolate_->code_range()->contains(code->address())); |
3787 code->set_instruction_size(desc.instr_size); | 3787 code->set_instruction_size(desc.instr_size); |
| 3788 // TODO(mstarzinger): Remove once we found the bug. |
| 3789 CHECK(reloc_info->IsByteArray()); |
3788 code->set_relocation_info(reloc_info); | 3790 code->set_relocation_info(reloc_info); |
| 3791 // TODO(mstarzinger): Remove once we found the bug. |
| 3792 CHECK(code->relocation_info()->IsByteArray()); |
3789 code->set_flags(flags); | 3793 code->set_flags(flags); |
3790 if (code->is_call_stub() || code->is_keyed_call_stub()) { | 3794 if (code->is_call_stub() || code->is_keyed_call_stub()) { |
3791 code->set_check_type(RECEIVER_MAP_CHECK); | 3795 code->set_check_type(RECEIVER_MAP_CHECK); |
3792 } | 3796 } |
3793 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER); | 3797 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER); |
3794 code->InitializeTypeFeedbackInfoNoWriteBarrier(undefined_value()); | 3798 code->InitializeTypeFeedbackInfoNoWriteBarrier(undefined_value()); |
3795 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); | 3799 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); |
3796 code->set_gc_metadata(Smi::FromInt(0)); | 3800 code->set_gc_metadata(Smi::FromInt(0)); |
3797 code->set_ic_age(global_ic_age_); | 3801 code->set_ic_age(global_ic_age_); |
3798 code->set_prologue_offset(kPrologueOffsetNotSet); | 3802 code->set_prologue_offset(kPrologueOffsetNotSet); |
(...skipping 4011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7810 static_cast<int>(object_sizes_last_time_[index])); | 7814 static_cast<int>(object_sizes_last_time_[index])); |
7811 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7815 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7812 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7816 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7813 | 7817 |
7814 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7818 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7815 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7819 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7816 ClearObjectStats(); | 7820 ClearObjectStats(); |
7817 } | 7821 } |
7818 | 7822 |
7819 } } // namespace v8::internal | 7823 } } // namespace v8::internal |
OLD | NEW |