Chromium Code Reviews| Index: src/ic/handler-compiler.cc |
| diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc |
| index 2eff81f6b5fcf4fc594aed5c750e2b5cc8f87ceb..14ef966b34b98549a538628125b2eb0c56127f47 100644 |
| --- a/src/ic/handler-compiler.cc |
| +++ b/src/ic/handler-compiler.cc |
| @@ -358,6 +358,20 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor( |
| return GetCode(kind(), it->name()); |
| } |
| +void NamedLoadHandlerCompiler::GenerateLoadCallback( |
| + Register reg, Handle<AccessorInfo> callback) { |
| + DCHECK(receiver().is(ApiGetterDescriptor::ReceiverRegister())); |
| + if (!reg.is(ApiGetterDescriptor::HolderRegister())) { |
|
Jakob Kummerow
2016/04/18 13:22:35
You can drop this line; MacroAssembler::Move conta
|
| + __ Move(ApiGetterDescriptor::HolderRegister(), reg); |
| + } |
| + // The callback is alive if this instruction is executed, |
| + // so the weak cell is not cleared and points to data. |
| + Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
| + __ GetWeakValue(ApiGetterDescriptor::CallbackRegister(), cell); |
| + |
| + CallApiGetterStub stub(isolate()); |
| + __ TailCallStub(&stub); |
| +} |
| void NamedLoadHandlerCompiler::GenerateLoadPostInterceptor( |
| LookupIterator* it, Register interceptor_reg) { |