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

Side by Side Diff: src/heap.cc

Issue 9207002: Add a deoptimization count to each function to limit number of re-compilations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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.
Jakob Kummerow 2012/01/16 11:41:25 nit: 2012
fschneider 2012/01/19 10:26:11 Done.
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
11 // with the distribution. 11 // with the distribution.
(...skipping 2759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 Code* construct_stub = 2771 Code* construct_stub =
2772 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); 2772 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric);
2773 share->set_construct_stub(construct_stub); 2773 share->set_construct_stub(construct_stub);
2774 share->set_instance_class_name(Object_symbol()); 2774 share->set_instance_class_name(Object_symbol());
2775 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); 2775 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER);
2776 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); 2776 share->set_script(undefined_value(), SKIP_WRITE_BARRIER);
2777 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); 2777 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER);
2778 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); 2778 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER);
2779 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); 2779 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER);
2780 share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER); 2780 share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER);
2781 share->set_deopt_counter(Smi::FromInt(FLAG_deopt_every_n_times)); 2781 share->set_stress_deopt_counter(Smi::FromInt(FLAG_deopt_every_n_times));
2782 2782
2783 // Set integer fields (smi or int, depending on the architecture). 2783 // Set integer fields (smi or int, depending on the architecture).
2784 share->set_length(0); 2784 share->set_length(0);
2785 share->set_formal_parameter_count(0); 2785 share->set_formal_parameter_count(0);
2786 share->set_expected_nof_properties(0); 2786 share->set_expected_nof_properties(0);
2787 share->set_num_literals(0); 2787 share->set_num_literals(0);
2788 share->set_start_position_and_type(0); 2788 share->set_start_position_and_type(0);
2789 share->set_end_position(0); 2789 share->set_end_position(0);
2790 share->set_function_token_position(0); 2790 share->set_function_token_position(0);
2791 // All compiler hints default to false or 0. 2791 // All compiler hints default to false or 0.
2792 share->set_compiler_hints(0); 2792 share->set_compiler_hints(0);
2793 share->set_this_property_assignments_count(0); 2793 share->set_this_property_assignments_count(0);
2794 share->set_opt_count(0); 2794 share->set_deopt_count(0);
2795 2795
2796 return share; 2796 return share;
2797 } 2797 }
2798 2798
2799 2799
2800 MaybeObject* Heap::AllocateJSMessageObject(String* type, 2800 MaybeObject* Heap::AllocateJSMessageObject(String* type,
2801 JSArray* arguments, 2801 JSArray* arguments,
2802 int start_position, 2802 int start_position,
2803 int end_position, 2803 int end_position,
2804 Object* script, 2804 Object* script,
(...skipping 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
6632 isolate_->heap()->store_buffer()->Compact(); 6632 isolate_->heap()->store_buffer()->Compact();
6633 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6633 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6634 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6634 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6635 next = chunk->next_chunk(); 6635 next = chunk->next_chunk();
6636 isolate_->memory_allocator()->Free(chunk); 6636 isolate_->memory_allocator()->Free(chunk);
6637 } 6637 }
6638 chunks_queued_for_free_ = NULL; 6638 chunks_queued_for_free_ = NULL;
6639 } 6639 }
6640 6640
6641 } } // namespace v8::internal 6641 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698