}
}
- // TODO(X64): Enable inline cache for load.
- #ifndef V8_TARGET_ARCH_X64
// Update inline cache and stub cache.
if (FLAG_use_ic && lookup.IsLoaded()) {
UpdateCaches(&lookup, state, object, name);
}
- #endif
PropertyAttributes attr;
if (lookup.IsValid() && lookup.type() == INTERCEPTOR) {
Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
}
+
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- rcx : name
+ // -- rsp[0] : return address
+ // -- rsp[8] : receiver
+ // -----------------------------------
+
+ __ movq(rax, Operand(rsp, kPointerSize));
+
+ // Probe the stub cache.
+ Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC,
+ NOT_IN_LOOP,
+ MONOMORPHIC);
+ StubCache::GenerateProbe(masm, flags, rax, rcx, rbx, rdx);
+
+ // Cache miss: Jump to runtime.
Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
}
+
void LoadIC::GenerateMiss(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- rcx : name
+ // -- rsp[0] : return address
+ // -- rsp[8] : receiver
+ // -----------------------------------
+
Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
}
}
bool LoadIC::PatchInlinedLoad(Address address, Object* map, int index) {
- UNIMPLEMENTED();
+ // TODO(X64): Implement this function. Until then, the code is not patched.
return false;
}
JSObject* b,
AccessorInfo* c,
String* d) {
- UNIMPLEMENTED();
- return NULL;
+ // TODO(X64): Implement a real stub.
+ return Failure::InternalError();
}
JSObject* b,
Object* c,
String* d) {
- UNIMPLEMENTED();
- return NULL;
+ // TODO(X64): Implement a real stub.
+ return Failure::InternalError();
}
JSObject* b,
int c,
String* d) {
- UNIMPLEMENTED();
- return NULL;
+ // TODO(X64): Implement a real stub.
+ return Failure::InternalError();
}
Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* a,
JSObject* b,
String* c) {
- UNIMPLEMENTED();
- return NULL;
+ // TODO(X64): Implement a real stub.
+ return Failure::InternalError();
}
JSGlobalPropertyCell* cell,
String* name,
bool is_dont_delete) {
- UNIMPLEMENTED();
- return NULL;
+ // TODO(X64): Implement a real stub.
+ return Failure::InternalError();
}
}
}
+
+void StubCache::GenerateProbe(MacroAssembler* masm,
+ Code::Flags flags,
+ Register receiver,
+ Register name,
+ Register scratch,
+ Register extra) {
+ Label miss;
+ // TODO(X64): Probe the primary and secondary StubCache tables.
+
+ // Cache miss: Fall-through and let caller handle the miss by
+ // entering the runtime system.
+ __ bind(&miss);
+}
+
+
#undef __