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

Unified Diff: src/ic/arm64/handler-compiler-arm64.cc

Issue 778673002: Do not embed function in DirectLoadGlobalFunctionPrototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/handler-compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/arm64/handler-compiler-arm64.cc
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc
index 8571faec714fa05b8a250b4d88310d21aa15cb6b..64f615841698718d651d3f842a66293246623426 100644
--- a/src/ic/arm64/handler-compiler-arm64.cc
+++ b/src/ic/arm64/handler-compiler-arm64.cc
@@ -57,24 +57,27 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype(
- MacroAssembler* masm, int index, Register prototype, Label* miss) {
+ MacroAssembler* masm, int index, Register prototype, Register scratch,
+ Label* miss) {
Isolate* isolate = masm->isolate();
// Get the global function with the given index.
- Handle<JSFunction> function(
+ Handle<JSFunction> jsfunction(
JSFunction::cast(isolate->native_context()->get(index)));
+ Handle<WeakCell> cell = isolate->factory()->NewWeakCell(jsfunction);
// Check we're still in the same context.
- Register scratch = prototype;
+ Register function = prototype;
__ Ldr(scratch, GlobalObjectMemOperand());
__ Ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
- __ Ldr(scratch, ContextMemOperand(scratch, index));
- __ Cmp(scratch, Operand(function));
+ __ Ldr(function, ContextMemOperand(scratch, index));
+ __ CmpWeakValue(function, cell, scratch);
Toon Verwaest 2014/12/03 16:22:09 Why still embed the weak cell if all you do is mis
__ B(ne, miss);
// Load its initial map. The global functions all have initial maps.
- __ Mov(prototype, Operand(Handle<Map>(function->initial_map())));
+ __ Ldr(scratch,
+ FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
// Load the prototype from the initial map.
- __ Ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset));
+ __ Ldr(prototype, FieldMemOperand(scratch, Map::kPrototypeOffset));
}
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/handler-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698