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

Side by Side Diff: src/heap.cc

Issue 8700008: New approach to Crankshaft decision-making (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix snapshot build and memory leaks Created 9 years 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 isolate_->global_handles()->IterateNewSpaceWeakIndependentRoots( 1150 isolate_->global_handles()->IterateNewSpaceWeakIndependentRoots(
1151 &scavenge_visitor); 1151 &scavenge_visitor);
1152 new_space_front = DoScavenge(&scavenge_visitor, new_space_front); 1152 new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
1153 1153
1154 UpdateNewSpaceReferencesInExternalStringTable( 1154 UpdateNewSpaceReferencesInExternalStringTable(
1155 &UpdateNewSpaceReferenceInExternalStringTableEntry); 1155 &UpdateNewSpaceReferenceInExternalStringTableEntry);
1156 1156
1157 promotion_queue_.Destroy(); 1157 promotion_queue_.Destroy();
1158 1158
1159 LiveObjectList::UpdateReferencesForScavengeGC(); 1159 LiveObjectList::UpdateReferencesForScavengeGC();
1160 isolate()->runtime_profiler()->UpdateSamplesAfterScavenge();
1161 incremental_marking()->UpdateMarkingDequeAfterScavenge(); 1160 incremental_marking()->UpdateMarkingDequeAfterScavenge();
1162 1161
1163 ASSERT(new_space_front == new_space_.top()); 1162 ASSERT(new_space_front == new_space_.top());
1164 1163
1165 // Set age mark. 1164 // Set age mark.
1166 new_space_.set_age_mark(new_space_.top()); 1165 new_space_.set_age_mark(new_space_.top());
1167 1166
1168 new_space_.LowerInlineAllocationLimit( 1167 new_space_.LowerInlineAllocationLimit(
1169 new_space_.inline_allocation_limit_step()); 1168 new_space_.inline_allocation_limit_step());
1170 1169
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 Code* construct_stub = 2739 Code* construct_stub =
2741 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); 2740 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric);
2742 share->set_construct_stub(construct_stub); 2741 share->set_construct_stub(construct_stub);
2743 share->set_instance_class_name(Object_symbol()); 2742 share->set_instance_class_name(Object_symbol());
2744 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); 2743 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER);
2745 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); 2744 share->set_script(undefined_value(), SKIP_WRITE_BARRIER);
2746 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); 2745 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER);
2747 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); 2746 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER);
2748 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); 2747 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER);
2749 share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER); 2748 share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER);
2749 share->set_call_counter(SharedFunctionInfo::kCallsUntilPrimitiveOptimization);
2750 share->set_deopt_counter(Smi::FromInt(FLAG_deopt_every_n_times)); 2750 share->set_deopt_counter(Smi::FromInt(FLAG_deopt_every_n_times));
2751 2751
2752 // Set integer fields (smi or int, depending on the architecture). 2752 // Set integer fields (smi or int, depending on the architecture).
2753 share->set_length(0); 2753 share->set_length(0);
2754 share->set_formal_parameter_count(0); 2754 share->set_formal_parameter_count(0);
2755 share->set_expected_nof_properties(0); 2755 share->set_expected_nof_properties(0);
2756 share->set_num_literals(0); 2756 share->set_num_literals(0);
2757 share->set_start_position_and_type(0); 2757 share->set_start_position_and_type(0);
2758 share->set_end_position(0); 2758 share->set_end_position(0);
2759 share->set_function_token_position(0); 2759 share->set_function_token_position(0);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
3365 Object* prototype) { 3365 Object* prototype) {
3366 ASSERT(!prototype->IsMap()); 3366 ASSERT(!prototype->IsMap());
3367 function->initialize_properties(); 3367 function->initialize_properties();
3368 function->initialize_elements(); 3368 function->initialize_elements();
3369 function->set_shared(shared); 3369 function->set_shared(shared);
3370 function->set_code(shared->code()); 3370 function->set_code(shared->code());
3371 function->set_prototype_or_initial_map(prototype); 3371 function->set_prototype_or_initial_map(prototype);
3372 function->set_context(undefined_value()); 3372 function->set_context(undefined_value());
3373 function->set_literals_or_bindings(empty_fixed_array()); 3373 function->set_literals_or_bindings(empty_fixed_array());
3374 function->set_next_function_link(undefined_value()); 3374 function->set_next_function_link(undefined_value());
3375 function->set_profiler_ticks(0);
3375 } 3376 }
3376 3377
3377 3378
3378 MaybeObject* Heap::AllocateFunctionPrototype(JSFunction* function) { 3379 MaybeObject* Heap::AllocateFunctionPrototype(JSFunction* function) {
3379 // Allocate the prototype. Make sure to use the object function 3380 // Allocate the prototype. Make sure to use the object function
3380 // from the function's context, since the function can be from a 3381 // from the function's context, since the function can be from a
3381 // different context. 3382 // different context.
3382 JSFunction* object_function = 3383 JSFunction* object_function =
3383 function->context()->global_context()->object_function(); 3384 function->context()->global_context()->object_function();
3384 3385
(...skipping 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
6583 isolate_->heap()->store_buffer()->Compact(); 6584 isolate_->heap()->store_buffer()->Compact();
6584 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6585 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6585 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6586 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6586 next = chunk->next_chunk(); 6587 next = chunk->next_chunk();
6587 isolate_->memory_allocator()->Free(chunk); 6588 isolate_->memory_allocator()->Free(chunk);
6588 } 6589 }
6589 chunks_queued_for_free_ = NULL; 6590 chunks_queued_for_free_ = NULL;
6590 } 6591 }
6591 6592
6592 } } // namespace v8::internal 6593 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | src/platform-linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698