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

Side by Side Diff: src/objects.cc

Issue 136703002: Handlify AllocationSite AddDependentCompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/objects.h ('k') | no next file » | 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 12860 matching lines...) Expand 10 before | Expand all | Expand 10 after
12871 } 12871 }
12872 SetElementsKind(to_kind); 12872 SetElementsKind(to_kind);
12873 dependent_code()->DeoptimizeDependentCodeGroup( 12873 dependent_code()->DeoptimizeDependentCodeGroup(
12874 isolate, DependentCode::kAllocationSiteTransitionChangedGroup); 12874 isolate, DependentCode::kAllocationSiteTransitionChangedGroup);
12875 } 12875 }
12876 } 12876 }
12877 return this; 12877 return this;
12878 } 12878 }
12879 12879
12880 12880
12881 void AllocationSite::AddDependentCompilationInfo(Reason reason, 12881 // static
mvstanton 2014/01/13 14:37:56 nit: I don't think we usually add // static (altho
Hannes Payer (out of office) 2014/01/13 14:53:20 That is a Chrome thing. We do it inconsistently, I
12882 void AllocationSite::AddDependentCompilationInfo(Handle<AllocationSite> site,
12883 Reason reason,
12882 CompilationInfo* info) { 12884 CompilationInfo* info) {
12883 DependentCode::DependencyGroup group = ToDependencyGroup(reason); 12885 DependentCode::DependencyGroup group = site->ToDependencyGroup(reason);
12884 Handle<DependentCode> dep(dependent_code()); 12886 Handle<DependentCode> dep(site->dependent_code());
12885 Handle<DependentCode> codes = 12887 Handle<DependentCode> codes =
12886 DependentCode::Insert(dep, group, info->object_wrapper()); 12888 DependentCode::Insert(dep, group, info->object_wrapper());
12887 if (*codes != dependent_code()) set_dependent_code(*codes); 12889 if (*codes != site->dependent_code()) site->set_dependent_code(*codes);
12888 info->dependencies(group)->Add(Handle<HeapObject>(this), info->zone()); 12890 info->dependencies(group)->Add(Handle<HeapObject>(site), info->zone());
12889 } 12891 }
12890 12892
12891 12893
12892 void AllocationSite::AddDependentCode(Reason reason, Handle<Code> code) { 12894 void AllocationSite::AddDependentCode(Reason reason, Handle<Code> code) {
12893 DependentCode::DependencyGroup group = ToDependencyGroup(reason); 12895 DependentCode::DependencyGroup group = ToDependencyGroup(reason);
12894 Handle<DependentCode> codes = DependentCode::Insert( 12896 Handle<DependentCode> codes = DependentCode::Insert(
12895 Handle<DependentCode>(dependent_code()), group, code); 12897 Handle<DependentCode>(dependent_code()), group, code);
12896 if (*codes != dependent_code()) set_dependent_code(*codes); 12898 if (*codes != dependent_code()) set_dependent_code(*codes);
Benedikt Meurer 2014/01/13 14:38:47 Please remove this method.
Hannes Payer (out of office) 2014/01/13 14:53:20 Done.
12897 } 12899 }
12898 12900
12899 12901
12900 void JSObject::UpdateAllocationSite(Handle<JSObject> object, 12902 void JSObject::UpdateAllocationSite(Handle<JSObject> object,
12901 ElementsKind to_kind) { 12903 ElementsKind to_kind) {
12902 CALL_HEAP_FUNCTION_VOID(object->GetIsolate(), 12904 CALL_HEAP_FUNCTION_VOID(object->GetIsolate(),
12903 object->UpdateAllocationSite(to_kind)); 12905 object->UpdateAllocationSite(to_kind));
12904 } 12906 }
12905 12907
12906 12908
(...skipping 3769 matching lines...) Expand 10 before | Expand all | Expand 10 after
16676 #define ERROR_MESSAGES_TEXTS(C, T) T, 16678 #define ERROR_MESSAGES_TEXTS(C, T) T,
16677 static const char* error_messages_[] = { 16679 static const char* error_messages_[] = {
16678 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16680 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16679 }; 16681 };
16680 #undef ERROR_MESSAGES_TEXTS 16682 #undef ERROR_MESSAGES_TEXTS
16681 return error_messages_[reason]; 16683 return error_messages_[reason];
16682 } 16684 }
16683 16685
16684 16686
16685 } } // namespace v8::internal 16687 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698