Register PropertyHandlerCompiler::CheckPrototypes(
- Handle<HeapType> type, Register object_reg, Handle<JSObject> holder,
- Register holder_reg, Register scratch1, Register scratch2,
- Handle<Name> name, Label* miss, PrototypeCheckType check) {
- Handle<Map> receiver_map(IC::TypeToMap(*type, isolate()));
+ Register object_reg, Handle<JSObject> holder, Register holder_reg,
+ Register scratch1, Register scratch2, Handle<Name> name, Label* miss,
+ PrototypeCheckType check) {
+ Handle<Map> receiver_map(IC::TypeToMap(*type(), isolate()));
// Make sure there's no overlap between holder and object registers.
ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg));
int depth = 0;
Handle<JSObject> current = Handle<JSObject>::null();
- if (type->IsConstant()) current =
- Handle<JSObject>::cast(type->AsConstant()->Value());
+ if (type()->IsConstant())
+ current = Handle<JSObject>::cast(type()->AsConstant()->Value());
Handle<JSObject> prototype = Handle<JSObject>::null();
Handle<Map> current_map = receiver_map;
Handle<Map> holder_map(holder->map());
}
-Register NamedLoadHandlerCompiler::CallbackFrontend(Handle<HeapType> type,
- Register object_reg,
+Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
Handle<JSObject> holder,
Handle<Name> name,
Handle<Object> callback) {
Label miss;
- Register reg = FrontendHeader(type, object_reg, holder, name, &miss);
+ Register reg = FrontendHeader(object_reg, holder, name, &miss);
if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) {
ASSERT(!reg.is(scratch2()));
void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
- Register holder_reg, Handle<Object> object,
- Handle<JSObject> interceptor_holder, LookupResult* lookup,
- Handle<Name> name) {
+ Register holder_reg, Handle<JSObject> interceptor_holder,
+ LookupResult* lookup, Handle<Name> name) {
ASSERT(interceptor_holder->HasNamedInterceptor());
ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined());
compile_followup_inline = true;
} else if (lookup->type() == CALLBACKS &&
lookup->GetCallbackObject()->IsExecutableAccessorInfo()) {
- ExecutableAccessorInfo* callback =
- ExecutableAccessorInfo::cast(lookup->GetCallbackObject());
- compile_followup_inline = callback->getter() != NULL &&
- callback->IsCompatibleReceiver(*object);
+ Handle<ExecutableAccessorInfo> callback(
+ ExecutableAccessorInfo::cast(lookup->GetCallbackObject()));
+ compile_followup_inline =
+ callback->getter() != NULL &&
+ ExecutableAccessorInfo::IsCompatibleReceiverType(isolate(), callback,
+ type());
}
}
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name,
Handle<ExecutableAccessorInfo> callback) {
- Register holder_reg =
- Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name);
+ Register holder_reg = Frontend(receiver(), holder, name);
__ pop(scratch1()); // remove the return address
__ push(receiver());
Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
- Handle<HeapType> type, Handle<JSObject> last, Handle<Name> name) {
- NonexistentFrontend(type, last, name);
+ Handle<JSObject> last, Handle<Name> name) {
+ NonexistentFrontend(last, name);
// Return undefined if maps of the full prototype chain are still the
// same and no global property with this name contains a value.
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
- Handle<HeapType> type, Handle<GlobalObject> global,
- Handle<PropertyCell> cell, Handle<Name> name, bool is_dont_delete) {
+ Handle<GlobalObject> global, Handle<PropertyCell> cell, Handle<Name> name,
+ bool is_dont_delete) {
Label miss;
- FrontendHeader(type, receiver(), global, name, &miss);
+ FrontendHeader(receiver(), global, name, &miss);
// Get the value from the cell.
+ Register result = StoreIC::ValueRegister();
if (masm()->serializer_enabled()) {
- __ mov(eax, Immediate(cell));
- __ mov(eax, FieldOperand(eax, PropertyCell::kValueOffset));
+ __ mov(result, Immediate(cell));
+ __ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
} else {
- __ mov(eax, Operand::ForCell(cell));
+ __ mov(result, Operand::ForCell(cell));
}
// Check for deleted property if property can actually be deleted.
if (!is_dont_delete) {
- __ cmp(eax, factory()->the_hole_value());
+ __ cmp(result, factory()->the_hole_value());
__ j(equal, &miss);
} else if (FLAG_debug_code) {
- __ cmp(eax, factory()->the_hole_value());
+ __ cmp(result, factory()->the_hole_value());
__ Check(not_equal, kDontDeleteCellsCannotContainTheHole);
}