Commit a1cf7d6e authored by whesse@chromium.org's avatar whesse@chromium.org

X64: Enable inline caching for calls, with some stubs stubbed out.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 20e4b1db
......@@ -365,13 +365,10 @@ Object* CallIC::LoadFunction(State state,
return TypeError("undefined_method", object, name);
}
// TODO(X64): Enable inline cache for calls.
#ifndef V8_TARGET_ARCH_X64
// Lookup is valid: Update inline cache and stub cache.
if (FLAG_use_ic && lookup.IsLoaded()) {
UpdateCaches(&lookup, state, object, name);
}
#endif
// Get the property.
PropertyAttributes attr;
......@@ -1252,11 +1249,6 @@ void CallIC::GenerateInitialize(MacroAssembler* masm, int argc) {
}
void CallIC::GeneratePreMonomorphic(MacroAssembler* masm, int argc) {
Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
}
void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
}
......
......@@ -174,7 +174,6 @@ class CallIC: public IC {
// Code generator routines.
static void GenerateInitialize(MacroAssembler* masm, int argc);
static void GeneratePreMonomorphic(MacroAssembler* masm, int argc);
static void GenerateMiss(MacroAssembler* masm, int argc);
static void GenerateMegamorphic(MacroAssembler* masm, int argc);
static void GenerateNormal(MacroAssembler* masm, int argc);
......
......@@ -863,6 +863,8 @@ Object* StubCompiler::CompileCallInitialize(Code::Flags flags) {
Object* StubCompiler::CompileCallPreMonomorphic(Code::Flags flags) {
HandleScope scope;
int argc = Code::ExtractArgumentsCountFromFlags(flags);
// The code of the PreMonomorphic stub is the same as the code
// of the Initialized stub. They just differ on the code object flags.
CallIC::GenerateInitialize(masm(), argc);
Object* result = GetCodeWithFlags(flags, "CompileCallPreMonomorphic");
if (!result->IsFailure()) {
......
......@@ -44,24 +44,24 @@ Object* CallStubCompiler::CompileCallConstant(Object* a,
JSFunction* c,
String* d,
StubCompiler::CheckType e) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
Object* CallStubCompiler::CompileCallField(Object* a,
JSObject* b,
int c,
String* d) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
Object* CallStubCompiler::CompileCallInterceptor(Object* a,
JSObject* b,
String* c) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
......@@ -71,8 +71,8 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
JSGlobalPropertyCell* cell,
JSFunction* function,
String* name) {
UNIMPLEMENTED();
return NULL;
// TODO(X64): Implement a real stub.
return Failure::InternalError();
}
......
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