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

Unified Diff: src/code-stub-assembler.cc

Issue 2674593003: [TypeFeedbackVector] Root feedback vectors at function literal site. (Closed)
Patch Set: REBASE. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index ad0dd093eafa0fd8c629bdbd854504c596dff425..1349ed373feddc79d7130bb70c1090095bd8db7f 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -5546,7 +5546,8 @@ Node* CodeStubAssembler::ElementOffsetFromIndex(Node* index_node,
Node* CodeStubAssembler::LoadTypeFeedbackVectorForStub() {
Node* function =
LoadFromParentFrame(JavaScriptFrameConstants::kFunctionOffset);
- return LoadObjectField(function, JSFunction::kFeedbackVectorOffset);
+ Node* cell = LoadObjectField(function, JSFunction::kFeedbackVectorOffset);
+ return LoadObjectField(cell, Cell::kValueOffset);
}
void CodeStubAssembler::UpdateFeedback(Node* feedback,
@@ -8354,7 +8355,7 @@ Node* CodeStubAssembler::AllocateFunctionWithMapAndContext(Node* map,
StoreObjectFieldRoot(fun, JSObject::kElementsOffset,
Heap::kEmptyFixedArrayRootIndex);
StoreObjectFieldRoot(fun, JSFunction::kFeedbackVectorOffset,
- Heap::kEmptyTypeFeedbackVectorRootIndex);
+ Heap::kUndefinedCellRootIndex);
StoreObjectFieldRoot(fun, JSFunction::kPrototypeOrInitialMapOffset,
Heap::kTheHoleValueRootIndex);
StoreObjectFieldNoWriteBarrier(fun, JSFunction::kSharedFunctionInfoOffset,
« no previous file with comments | « src/builtins/x87/builtins-x87.cc ('k') | src/compilation-cache.h » ('j') | src/debug/liveedit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698