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
This commit is contained in:
parent
20e4b1dbc5
commit
a1cf7d6e3d
@ -365,13 +365,10 @@ Object* CallIC::LoadFunction(State state,
|
|||||||
return TypeError("undefined_method", object, name);
|
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.
|
// Lookup is valid: Update inline cache and stub cache.
|
||||||
if (FLAG_use_ic && lookup.IsLoaded()) {
|
if (FLAG_use_ic && lookup.IsLoaded()) {
|
||||||
UpdateCaches(&lookup, state, object, name);
|
UpdateCaches(&lookup, state, object, name);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Get the property.
|
// Get the property.
|
||||||
PropertyAttributes attr;
|
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) {
|
void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
|
||||||
Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
|
Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
|
||||||
}
|
}
|
||||||
|
1
src/ic.h
1
src/ic.h
@ -174,7 +174,6 @@ class CallIC: public IC {
|
|||||||
|
|
||||||
// Code generator routines.
|
// Code generator routines.
|
||||||
static void GenerateInitialize(MacroAssembler* masm, int argc);
|
static void GenerateInitialize(MacroAssembler* masm, int argc);
|
||||||
static void GeneratePreMonomorphic(MacroAssembler* masm, int argc);
|
|
||||||
static void GenerateMiss(MacroAssembler* masm, int argc);
|
static void GenerateMiss(MacroAssembler* masm, int argc);
|
||||||
static void GenerateMegamorphic(MacroAssembler* masm, int argc);
|
static void GenerateMegamorphic(MacroAssembler* masm, int argc);
|
||||||
static void GenerateNormal(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) {
|
Object* StubCompiler::CompileCallPreMonomorphic(Code::Flags flags) {
|
||||||
HandleScope scope;
|
HandleScope scope;
|
||||||
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
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);
|
CallIC::GenerateInitialize(masm(), argc);
|
||||||
Object* result = GetCodeWithFlags(flags, "CompileCallPreMonomorphic");
|
Object* result = GetCodeWithFlags(flags, "CompileCallPreMonomorphic");
|
||||||
if (!result->IsFailure()) {
|
if (!result->IsFailure()) {
|
||||||
|
@ -44,24 +44,24 @@ Object* CallStubCompiler::CompileCallConstant(Object* a,
|
|||||||
JSFunction* c,
|
JSFunction* c,
|
||||||
String* d,
|
String* d,
|
||||||
StubCompiler::CheckType e) {
|
StubCompiler::CheckType e) {
|
||||||
UNIMPLEMENTED();
|
// TODO(X64): Implement a real stub.
|
||||||
return NULL;
|
return Failure::InternalError();
|
||||||
}
|
}
|
||||||
|
|
||||||
Object* CallStubCompiler::CompileCallField(Object* a,
|
Object* CallStubCompiler::CompileCallField(Object* a,
|
||||||
JSObject* b,
|
JSObject* b,
|
||||||
int c,
|
int c,
|
||||||
String* d) {
|
String* d) {
|
||||||
UNIMPLEMENTED();
|
// TODO(X64): Implement a real stub.
|
||||||
return NULL;
|
return Failure::InternalError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Object* CallStubCompiler::CompileCallInterceptor(Object* a,
|
Object* CallStubCompiler::CompileCallInterceptor(Object* a,
|
||||||
JSObject* b,
|
JSObject* b,
|
||||||
String* c) {
|
String* c) {
|
||||||
UNIMPLEMENTED();
|
// TODO(X64): Implement a real stub.
|
||||||
return NULL;
|
return Failure::InternalError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -71,8 +71,8 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
|
|||||||
JSGlobalPropertyCell* cell,
|
JSGlobalPropertyCell* cell,
|
||||||
JSFunction* function,
|
JSFunction* function,
|
||||||
String* name) {
|
String* name) {
|
||||||
UNIMPLEMENTED();
|
// TODO(X64): Implement a real stub.
|
||||||
return NULL;
|
return Failure::InternalError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user