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

Side by Side Diff: src/allocation-site-scopes.cc

Issue 40063002: Bookkeeping for allocation site pretenuring (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 7 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
« no previous file with comments | « src/allocation-site-scopes.h ('k') | src/arm/full-codegen-arm.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } else { 75 } else {
76 PrintF("Setting AllocationSite (%p, %p) transition_info %p\n", 76 PrintF("Setting AllocationSite (%p, %p) transition_info %p\n",
77 static_cast<void*>(*top()), 77 static_cast<void*>(*top()),
78 static_cast<void*>(*scope_site), 78 static_cast<void*>(*scope_site),
79 static_cast<void*>(*object)); 79 static_cast<void*>(*object));
80 } 80 }
81 } 81 }
82 } 82 }
83 } 83 }
84 84
85
86 bool AllocationSiteUsageContext::ShouldCreateMemento(Handle<JSObject> object) {
87 if (activated_ && AllocationSite::CanTrack(object->map()->instance_type())) {
88 if (FLAG_allocation_site_pretenuring ||
89 AllocationSite::GetMode(object->GetElementsKind()) ==
90 TRACK_ALLOCATION_SITE) {
91 if (FLAG_trace_creation_allocation_sites) {
92 PrintF("*** Creating Memento for %s %p\n",
93 object->IsJSArray() ? "JSArray" : "JSObject",
94 static_cast<void*>(*object));
95 }
96 return true;
97 }
98 }
99 return false;
100 }
101
85 } } // namespace v8::internal 102 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/allocation-site-scopes.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698