Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: src/heap.cc

Issue 8932004: Implement target cache for constructor calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 Code* code = Code::cast(result); 3285 Code* code = Code::cast(result);
3286 ASSERT(!isolate_->code_range()->exists() || 3286 ASSERT(!isolate_->code_range()->exists() ||
3287 isolate_->code_range()->contains(code->address())); 3287 isolate_->code_range()->contains(code->address()));
3288 code->set_instruction_size(desc.instr_size); 3288 code->set_instruction_size(desc.instr_size);
3289 code->set_relocation_info(reloc_info); 3289 code->set_relocation_info(reloc_info);
3290 code->set_flags(flags); 3290 code->set_flags(flags);
3291 if (code->is_call_stub() || code->is_keyed_call_stub()) { 3291 if (code->is_call_stub() || code->is_keyed_call_stub()) {
3292 code->set_check_type(RECEIVER_MAP_CHECK); 3292 code->set_check_type(RECEIVER_MAP_CHECK);
3293 } 3293 }
3294 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER); 3294 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER);
3295 code->set_type_feedback_cells(TypeFeedbackCells::cast(empty_fixed_array()),
3296 SKIP_WRITE_BARRIER);
3295 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); 3297 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER);
3296 code->set_next_code_flushing_candidate(undefined_value()); 3298 code->set_next_code_flushing_candidate(undefined_value());
3297 // Allow self references to created code object by patching the handle to 3299 // Allow self references to created code object by patching the handle to
3298 // point to the newly allocated Code object. 3300 // point to the newly allocated Code object.
3299 if (!self_reference.is_null()) { 3301 if (!self_reference.is_null()) {
3300 *(self_reference.location()) = code; 3302 *(self_reference.location()) = code;
3301 } 3303 }
3302 // Migrate generated code. 3304 // Migrate generated code.
3303 // The generated code can contain Object** values (typically from handles) 3305 // The generated code can contain Object** values (typically from handles)
3304 // that are dereferenced during the copy to point directly to the actual heap 3306 // that are dereferenced during the copy to point directly to the actual heap
(...skipping 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after
6654 isolate_->heap()->store_buffer()->Compact(); 6656 isolate_->heap()->store_buffer()->Compact();
6655 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6657 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6656 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6658 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6657 next = chunk->next_chunk(); 6659 next = chunk->next_chunk();
6658 isolate_->memory_allocator()->Free(chunk); 6660 isolate_->memory_allocator()->Free(chunk);
6659 } 6661 }
6660 chunks_queued_for_free_ = NULL; 6662 chunks_queued_for_free_ = NULL;
6661 } 6663 }
6662 6664
6663 } } // namespace v8::internal 6665 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698