| 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 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3295 ASSERT(!isolate_->code_range()->exists() || | 3295 ASSERT(!isolate_->code_range()->exists() || |
| 3296 isolate_->code_range()->contains(code->address())); | 3296 isolate_->code_range()->contains(code->address())); |
| 3297 code->set_instruction_size(desc.instr_size); | 3297 code->set_instruction_size(desc.instr_size); |
| 3298 code->set_relocation_info(reloc_info); | 3298 code->set_relocation_info(reloc_info); |
| 3299 code->set_flags(flags); | 3299 code->set_flags(flags); |
| 3300 if (code->is_call_stub() || code->is_keyed_call_stub()) { | 3300 if (code->is_call_stub() || code->is_keyed_call_stub()) { |
| 3301 code->set_check_type(RECEIVER_MAP_CHECK); | 3301 code->set_check_type(RECEIVER_MAP_CHECK); |
| 3302 } | 3302 } |
| 3303 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER); | 3303 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER); |
| 3304 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); | 3304 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); |
| 3305 code->set_next_code_flushing_candidate(undefined_value()); | 3305 code->set_gc_metadata(Smi::FromInt(0)); |
| 3306 // Allow self references to created code object by patching the handle to | 3306 // Allow self references to created code object by patching the handle to |
| 3307 // point to the newly allocated Code object. | 3307 // point to the newly allocated Code object. |
| 3308 if (!self_reference.is_null()) { | 3308 if (!self_reference.is_null()) { |
| 3309 *(self_reference.location()) = code; | 3309 *(self_reference.location()) = code; |
| 3310 } | 3310 } |
| 3311 // Migrate generated code. | 3311 // Migrate generated code. |
| 3312 // The generated code can contain Object** values (typically from handles) | 3312 // The generated code can contain Object** values (typically from handles) |
| 3313 // that are dereferenced during the copy to point directly to the actual heap | 3313 // that are dereferenced during the copy to point directly to the actual heap |
| 3314 // objects. These pointers can include references to the code object itself, | 3314 // objects. These pointers can include references to the code object itself, |
| 3315 // through the self_reference parameter. | 3315 // through the self_reference parameter. |
| (...skipping 3371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6687 isolate_->heap()->store_buffer()->Compact(); | 6687 isolate_->heap()->store_buffer()->Compact(); |
| 6688 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); | 6688 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); |
| 6689 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { | 6689 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { |
| 6690 next = chunk->next_chunk(); | 6690 next = chunk->next_chunk(); |
| 6691 isolate_->memory_allocator()->Free(chunk); | 6691 isolate_->memory_allocator()->Free(chunk); |
| 6692 } | 6692 } |
| 6693 chunks_queued_for_free_ = NULL; | 6693 chunks_queued_for_free_ = NULL; |
| 6694 } | 6694 } |
| 6695 | 6695 |
| 6696 } } // namespace v8::internal | 6696 } } // namespace v8::internal |
| OLD | NEW |