Handlify CompileStoreCallback, CompileStoreInterceptor.
R=kmillikin@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/8390045 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b195db5174
commit
405d57fe00
@ -2843,9 +2843,10 @@ Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object,
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
AccessorInfo* callback,
|
||||
String* name) {
|
||||
Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
||||
Handle<JSObject> object,
|
||||
Handle<AccessorInfo> callback,
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r0 : value
|
||||
// -- r1 : receiver
|
||||
@ -2872,7 +2873,7 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
|
||||
|
||||
__ push(r1); // receiver
|
||||
__ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback info
|
||||
__ mov(ip, Operand(callback)); // callback info
|
||||
__ Push(ip, r2, r0);
|
||||
|
||||
// Do tail-call to the runtime system.
|
||||
@ -2887,12 +2888,13 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
__ Jump(ic, RelocInfo::CODE_TARGET);
|
||||
|
||||
// Return the generated code.
|
||||
return TryGetCode(CALLBACKS, name);
|
||||
return GetCode(CALLBACKS, name);
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
|
||||
String* name) {
|
||||
Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
||||
Handle<JSObject> receiver,
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r0 : value
|
||||
// -- r1 : receiver
|
||||
@ -2935,7 +2937,7 @@ MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
|
||||
__ Jump(ic, RelocInfo::CODE_TARGET);
|
||||
|
||||
// Return the generated code.
|
||||
return TryGetCode(INTERCEPTOR, name);
|
||||
return GetCode(INTERCEPTOR, name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2725,9 +2725,10 @@ Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object,
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
AccessorInfo* callback,
|
||||
String* name) {
|
||||
Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
||||
Handle<JSObject> object,
|
||||
Handle<AccessorInfo> callback,
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- eax : value
|
||||
// -- ecx : name
|
||||
@ -2755,7 +2756,7 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
|
||||
__ pop(ebx); // remove the return address
|
||||
__ push(edx); // receiver
|
||||
__ push(Immediate(Handle<AccessorInfo>(callback))); // callback info
|
||||
__ push(Immediate(callback)); // callback info
|
||||
__ push(ecx); // name
|
||||
__ push(eax); // value
|
||||
__ push(ebx); // restore return address
|
||||
@ -2771,12 +2772,13 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
__ jmp(ic, RelocInfo::CODE_TARGET);
|
||||
|
||||
// Return the generated code.
|
||||
return TryGetCode(CALLBACKS, name);
|
||||
return GetCode(CALLBACKS, name);
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
|
||||
String* name) {
|
||||
Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
||||
Handle<JSObject> receiver,
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- eax : value
|
||||
// -- ecx : name
|
||||
@ -2820,7 +2822,7 @@ MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
|
||||
__ jmp(ic, RelocInfo::CODE_TARGET);
|
||||
|
||||
// Return the generated code.
|
||||
return TryGetCode(INTERCEPTOR, name);
|
||||
return GetCode(INTERCEPTOR, name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -518,17 +518,6 @@ Handle<Code> StubCache::ComputeStoreGlobal(Handle<String> name,
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
||||
Handle<JSObject> object,
|
||||
Handle<AccessorInfo> callback,
|
||||
Handle<String> name) {
|
||||
CALL_HEAP_FUNCTION(isolate(),
|
||||
(set_failure(NULL),
|
||||
CompileStoreCallback(*object, *callback, *name)),
|
||||
Code);
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> StubCache::ComputeStoreCallback(Handle<String> name,
|
||||
Handle<JSObject> receiver,
|
||||
Handle<AccessorInfo> callback,
|
||||
@ -548,15 +537,6 @@ Handle<Code> StubCache::ComputeStoreCallback(Handle<String> name,
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> StoreStubCompiler::CompileStoreInterceptor(Handle<JSObject> object,
|
||||
Handle<String> name) {
|
||||
CALL_HEAP_FUNCTION(isolate(),
|
||||
(set_failure(NULL),
|
||||
CompileStoreInterceptor(*object, *name)),
|
||||
Code);
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> StubCache::ComputeStoreInterceptor(Handle<String> name,
|
||||
Handle<JSObject> receiver,
|
||||
StrictModeFlag strict_mode) {
|
||||
@ -1558,25 +1538,6 @@ Handle<Code> StoreStubCompiler::GetCode(PropertyType type,
|
||||
}
|
||||
|
||||
|
||||
// TODO(ulan): Eliminate this function when the stub cache is fully
|
||||
// handlified.
|
||||
MaybeObject* StoreStubCompiler::TryGetCode(PropertyType type, String* name) {
|
||||
Code::Flags flags =
|
||||
Code::ComputeMonomorphicFlags(Code::STORE_IC, type, strict_mode_);
|
||||
MaybeObject* result = TryGetCodeWithFlags(flags, name);
|
||||
if (!result->IsFailure()) {
|
||||
PROFILE(isolate(),
|
||||
CodeCreateEvent(Logger::STORE_IC_TAG,
|
||||
Code::cast(result->ToObjectUnchecked()),
|
||||
name));
|
||||
GDBJIT(AddCode(GDBJITInterface::STORE_IC,
|
||||
name,
|
||||
Code::cast(result->ToObjectUnchecked())));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> KeyedStoreStubCompiler::GetCode(PropertyType type,
|
||||
Handle<String> name,
|
||||
InlineCacheState state) {
|
||||
|
@ -712,22 +712,14 @@ class StoreStubCompiler: public StubCompiler {
|
||||
Handle<AccessorInfo> callback,
|
||||
Handle<String> name);
|
||||
|
||||
MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object,
|
||||
AccessorInfo* callback,
|
||||
String* name);
|
||||
Handle<Code> CompileStoreInterceptor(Handle<JSObject> object,
|
||||
Handle<String> name);
|
||||
|
||||
MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object,
|
||||
String* name);
|
||||
|
||||
Handle<Code> CompileStoreGlobal(Handle<GlobalObject> object,
|
||||
Handle<JSGlobalPropertyCell> holder,
|
||||
Handle<String> name);
|
||||
|
||||
private:
|
||||
MaybeObject* TryGetCode(PropertyType type, String* name);
|
||||
|
||||
Handle<Code> GetCode(PropertyType type, Handle<String> name);
|
||||
|
||||
StrictModeFlag strict_mode_;
|
||||
|
@ -2593,9 +2593,10 @@ Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object,
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
AccessorInfo* callback,
|
||||
String* name) {
|
||||
Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
||||
Handle<JSObject> object,
|
||||
Handle<AccessorInfo> callback,
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- rax : value
|
||||
// -- rcx : name
|
||||
@ -2623,7 +2624,7 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
|
||||
__ pop(rbx); // remove the return address
|
||||
__ push(rdx); // receiver
|
||||
__ Push(Handle<AccessorInfo>(callback)); // callback info
|
||||
__ Push(callback); // callback info
|
||||
__ push(rcx); // name
|
||||
__ push(rax); // value
|
||||
__ push(rbx); // restore return address
|
||||
@ -2639,12 +2640,13 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
|
||||
__ Jump(ic, RelocInfo::CODE_TARGET);
|
||||
|
||||
// Return the generated code.
|
||||
return TryGetCode(CALLBACKS, name);
|
||||
return GetCode(CALLBACKS, name);
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
|
||||
String* name) {
|
||||
Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
||||
Handle<JSObject> receiver,
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- rax : value
|
||||
// -- rcx : name
|
||||
@ -2688,7 +2690,7 @@ MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
|
||||
__ Jump(ic, RelocInfo::CODE_TARGET);
|
||||
|
||||
// Return the generated code.
|
||||
return TryGetCode(INTERCEPTOR, name);
|
||||
return GetCode(INTERCEPTOR, name);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user