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

Side by Side Diff: src/hydrogen.cc

Issue 132063004: More efficient use of space in AllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 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
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 previous_object, previous_object_size); 2635 previous_object, previous_object_size);
2636 AddStoreMapConstant( 2636 AddStoreMapConstant(
2637 allocation_memento, isolate()->factory()->allocation_memento_map()); 2637 allocation_memento, isolate()->factory()->allocation_memento_map());
2638 Add<HStoreNamedField>( 2638 Add<HStoreNamedField>(
2639 allocation_memento, 2639 allocation_memento,
2640 HObjectAccess::ForAllocationMementoSite(), 2640 HObjectAccess::ForAllocationMementoSite(),
2641 allocation_site); 2641 allocation_site);
2642 if (FLAG_allocation_site_pretenuring) { 2642 if (FLAG_allocation_site_pretenuring) {
2643 HValue* memento_create_count = Add<HLoadNamedField>( 2643 HValue* memento_create_count = Add<HLoadNamedField>(
2644 allocation_site, HObjectAccess::ForAllocationSiteOffset( 2644 allocation_site, HObjectAccess::ForAllocationSiteOffset(
2645 AllocationSite::kMementoCreateCountOffset)); 2645 AllocationSite::kPretenureCreateCountOffset));
2646 memento_create_count = AddUncasted<HAdd>( 2646 memento_create_count = AddUncasted<HAdd>(
2647 memento_create_count, graph()->GetConstant1()); 2647 memento_create_count, graph()->GetConstant1());
2648 // This smi value is reset to zero after every gc, overflow isn't a problem 2648 // This smi value is reset to zero after every gc, overflow isn't a problem
2649 // since the counter is bounded by the new space size. 2649 // since the counter is bounded by the new space size.
2650 memento_create_count->ClearFlag(HValue::kCanOverflow); 2650 memento_create_count->ClearFlag(HValue::kCanOverflow);
2651 HStoreNamedField* store = Add<HStoreNamedField>( 2651 HStoreNamedField* store = Add<HStoreNamedField>(
2652 allocation_site, HObjectAccess::ForAllocationSiteOffset( 2652 allocation_site, HObjectAccess::ForAllocationSiteOffset(
2653 AllocationSite::kMementoCreateCountOffset), memento_create_count); 2653 AllocationSite::kPretenureCreateCountOffset), memento_create_count);
2654 // No write barrier needed to store a smi. 2654 // No write barrier needed to store a smi.
2655 store->SkipWriteBarrier(); 2655 store->SkipWriteBarrier();
2656 } 2656 }
2657 } 2657 }
2658 2658
2659 2659
2660 HInstruction* HGraphBuilder::BuildGetNativeContext(HValue* closure) { 2660 HInstruction* HGraphBuilder::BuildGetNativeContext(HValue* closure) {
2661 // Get the global context, then the native context 2661 // Get the global context, then the native context
2662 HInstruction* context = 2662 HInstruction* context =
2663 Add<HLoadNamedField>(closure, HObjectAccess::ForFunctionContextPointer()); 2663 Add<HLoadNamedField>(closure, HObjectAccess::ForFunctionContextPointer());
(...skipping 8296 matching lines...) Expand 10 before | Expand all | Expand 10 after
10960 if (ShouldProduceTraceOutput()) { 10960 if (ShouldProduceTraceOutput()) {
10961 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 10961 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
10962 } 10962 }
10963 10963
10964 #ifdef DEBUG 10964 #ifdef DEBUG
10965 graph_->Verify(false); // No full verify. 10965 graph_->Verify(false); // No full verify.
10966 #endif 10966 #endif
10967 } 10967 }
10968 10968
10969 } } // namespace v8::internal 10969 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698