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

Side by Side Diff: src/objects.cc

Issue 309623007: Tenure allocation sites only when semi-space is maximum size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/objects.h ('k') | src/objects-inl.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "allocation-site-scopes.h" 8 #include "allocation-site-scopes.h"
9 #include "api.h" 9 #include "api.h"
10 #include "arguments.h" 10 #include "arguments.h"
(...skipping 13418 matching lines...) Expand 10 before | Expand all | Expand 10 after
13429 CompilationInfo* info) { 13429 CompilationInfo* info) {
13430 DependentCode::DependencyGroup group = site->ToDependencyGroup(reason); 13430 DependentCode::DependencyGroup group = site->ToDependencyGroup(reason);
13431 Handle<DependentCode> dep(site->dependent_code()); 13431 Handle<DependentCode> dep(site->dependent_code());
13432 Handle<DependentCode> codes = 13432 Handle<DependentCode> codes =
13433 DependentCode::Insert(dep, group, info->object_wrapper()); 13433 DependentCode::Insert(dep, group, info->object_wrapper());
13434 if (*codes != site->dependent_code()) site->set_dependent_code(*codes); 13434 if (*codes != site->dependent_code()) site->set_dependent_code(*codes);
13435 info->dependencies(group)->Add(Handle<HeapObject>(*site), info->zone()); 13435 info->dependencies(group)->Add(Handle<HeapObject>(*site), info->zone());
13436 } 13436 }
13437 13437
13438 13438
13439 const char* AllocationSite::PretenureDecisionName(PretenureDecision decision) {
13440 switch (decision) {
13441 case kUndecided: return "undecided";
13442 case kDontTenure: return "don't tenure";
13443 case kMaybeTenure: return "maybe tenure";
13444 case kTenure: return "tenure";
13445 case kZombie: return "zombie";
13446 default: UNREACHABLE();
13447 }
13448 return NULL;
13449 }
13450
13451
13439 void JSObject::UpdateAllocationSite(Handle<JSObject> object, 13452 void JSObject::UpdateAllocationSite(Handle<JSObject> object,
13440 ElementsKind to_kind) { 13453 ElementsKind to_kind) {
13441 if (!object->IsJSArray()) return; 13454 if (!object->IsJSArray()) return;
13442 13455
13443 Heap* heap = object->GetHeap(); 13456 Heap* heap = object->GetHeap();
13444 if (!heap->InNewSpace(*object)) return; 13457 if (!heap->InNewSpace(*object)) return;
13445 13458
13446 Handle<AllocationSite> site; 13459 Handle<AllocationSite> site;
13447 { 13460 {
13448 DisallowHeapAllocation no_allocation; 13461 DisallowHeapAllocation no_allocation;
(...skipping 3847 matching lines...) Expand 10 before | Expand all | Expand 10 after
17296 #define ERROR_MESSAGES_TEXTS(C, T) T, 17309 #define ERROR_MESSAGES_TEXTS(C, T) T,
17297 static const char* error_messages_[] = { 17310 static const char* error_messages_[] = {
17298 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17311 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17299 }; 17312 };
17300 #undef ERROR_MESSAGES_TEXTS 17313 #undef ERROR_MESSAGES_TEXTS
17301 return error_messages_[reason]; 17314 return error_messages_[reason];
17302 } 17315 }
17303 17316
17304 17317
17305 } } // namespace v8::internal 17318 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698