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

Unified Diff: src/objects.cc

Issue 726423002: Hydrogen should recognize literal smi arrays as fast literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test failure revealed forgotten requirement with dependencies. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 7f6f1a050618a4aaec8483fb91bdc377a9f46993..96a1aa19c9adf0e90b6f97899203a16336f645cb 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12959,10 +12959,32 @@ void AllocationSite::DigestTransitionFeedback(Handle<AllocationSite> site,
// static
-void AllocationSite::AddDependentCompilationInfo(Handle<AllocationSite> site,
- Reason reason,
- CompilationInfo* info) {
- DependentCode::DependencyGroup group = site->ToDependencyGroup(reason);
+void AllocationSite::RegisterForDeoptOnTenureChange(Handle<AllocationSite> site,
+ CompilationInfo* info) {
+ AddDependentCompilationInfo(
+ site, DependentCode::kAllocationSiteTenuringChangedGroup, info);
+}
+
+
+// static
+void AllocationSite::RegisterForDeoptOnTransitionChange(
+ Handle<AllocationSite> site, CompilationInfo* info) {
+ // Do nothing if the object doesn't have any useful element transitions left.
+ ElementsKind kind =
+ site->SitePointsToLiteral()
+ ? JSObject::cast(site->transition_info())->GetElementsKind()
+ : site->GetElementsKind();
+ if (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) {
+ AddDependentCompilationInfo(
+ site, DependentCode::kAllocationSiteTransitionChangedGroup, info);
+ }
+}
+
+
+// static
+void AllocationSite::AddDependentCompilationInfo(
+ Handle<AllocationSite> site, DependentCode::DependencyGroup group,
+ CompilationInfo* info) {
Handle<DependentCode> dep(site->dependent_code());
Handle<DependentCode> codes =
DependentCode::Insert(dep, group, info->object_wrapper());
« 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