Commit 7f886c85 authored by whesse@chromium.org's avatar whesse@chromium.org

X64: Enable more of LoadIC, disable individual stub types.

Review URL: http://codereview.chromium.org/155763

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7c8a166b
......@@ -609,13 +609,10 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
}
}
// 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) {
......
......@@ -285,11 +285,34 @@ void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
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)));
}
......@@ -302,7 +325,7 @@ void LoadIC::GenerateStringLength(MacroAssembler* masm) {
}
bool LoadIC::PatchInlinedLoad(Address address, Object* map, int index) {
UNIMPLEMENTED();
// TODO(X64): Implement this function. Until then, the code is not patched.
return false;
}
......
......@@ -311,8 +311,8 @@ Object* LoadStubCompiler::CompileLoadCallback(JSObject* a,
JSObject* b,
AccessorInfo* c,
String* d) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
......@@ -320,8 +320,8 @@ Object* LoadStubCompiler::CompileLoadConstant(JSObject* a,
JSObject* b,
Object* c,
String* d) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
......@@ -329,16 +329,16 @@ Object* LoadStubCompiler::CompileLoadField(JSObject* a,
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();
}
......@@ -347,8 +347,8 @@ Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
JSGlobalPropertyCell* cell,
String* name,
bool is_dont_delete) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
......@@ -488,6 +488,22 @@ void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
}
}
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 __
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment