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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 14794007: Preserve optimized code map during GCs weakly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to other architecture. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index f7ded184ecc386ee47777caf4bd4e079ffcc7a58..1bfb9bdafbc77b83677724821ea7603bd7d9f3f2 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -287,8 +287,8 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) {
// The optimized code map must never be empty, so check the first elements.
Label install_optimized;
// Speculatively move code object into edx.
- __ movq(rdx, FieldOperand(rbx, FixedArray::kHeaderSize + kPointerSize));
- __ cmpq(rcx, FieldOperand(rbx, FixedArray::kHeaderSize));
+ __ movq(rdx, FieldOperand(rbx, SharedFunctionInfo::kFirstCodeSlot));
+ __ cmpq(rcx, FieldOperand(rbx, SharedFunctionInfo::kFirstContextSlot));
__ j(equal, &install_optimized);
// Iterate through the rest of map backwards. rdx holds an index.
@@ -298,7 +298,7 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) {
__ SmiToInteger32(rdx, rdx);
__ bind(&loop);
// Do not double check first entry.
- __ cmpq(rdx, Immediate(SharedFunctionInfo::kEntryLength));
+ __ cmpq(rdx, Immediate(SharedFunctionInfo::kSecondEntryIndex));
__ j(equal, &restore);
__ subq(rdx, Immediate(SharedFunctionInfo::kEntryLength)); // Skip an entry.
__ cmpq(rcx, FieldOperand(rbx,
« src/objects.cc ('K') | « src/objects-visiting-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698