Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 15881003: Remove offset() and is_in_object() from hydrogen and lithium LoadNamedField and StoreNamedField and… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 kSaveFPRegs, 3066 kSaveFPRegs,
3067 EMIT_REMEMBERED_SET, 3067 EMIT_REMEMBERED_SET,
3068 check_needed); 3068 check_needed);
3069 } 3069 }
3070 3070
3071 __ bind(&skip_assignment); 3071 __ bind(&skip_assignment);
3072 } 3072 }
3073 3073
3074 3074
3075 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 3075 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
3076 int offset = instr->hydrogen()->offset(); 3076 HObjectAccess access = instr->hydrogen()->access();
3077 int offset = access.offset();
3077 Register object = ToRegister(instr->object()); 3078 Register object = ToRegister(instr->object());
3078 if (instr->hydrogen()->representation().IsDouble()) { 3079 if (instr->hydrogen()->representation().IsDouble()) {
3079 DwVfpRegister result = ToDoubleRegister(instr->result()); 3080 DwVfpRegister result = ToDoubleRegister(instr->result());
3080 __ vldr(result, FieldMemOperand(object, offset)); 3081 __ vldr(result, FieldMemOperand(object, offset));
3081 return; 3082 return;
3082 } 3083 }
3083 3084
3084 Register result = ToRegister(instr->result()); 3085 Register result = ToRegister(instr->result());
3085 if (instr->hydrogen()->is_in_object()) { 3086 if (access.IsInobject()) {
3086 __ ldr(result, FieldMemOperand(object, offset)); 3087 __ ldr(result, FieldMemOperand(object, offset));
3087 } else { 3088 } else {
3088 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 3089 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
3089 __ ldr(result, FieldMemOperand(result, offset)); 3090 __ ldr(result, FieldMemOperand(result, offset));
3090 } 3091 }
3091 } 3092 }
3092 3093
3093 3094
3094 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, 3095 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result,
3095 Register object, 3096 Register object,
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 Register base = ToRegister(instr->base_object()); 4227 Register base = ToRegister(instr->base_object());
4227 __ add(result, base, Operand(instr->offset())); 4228 __ add(result, base, Operand(instr->offset()));
4228 } 4229 }
4229 4230
4230 4231
4231 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4232 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4232 Representation representation = instr->representation(); 4233 Representation representation = instr->representation();
4233 4234
4234 Register object = ToRegister(instr->object()); 4235 Register object = ToRegister(instr->object());
4235 Register scratch = scratch0(); 4236 Register scratch = scratch0();
4236 int offset = instr->offset(); 4237
4238 HObjectAccess access = instr->hydrogen()->access();
4239 int offset = access.offset();
4237 4240
4238 Handle<Map> transition = instr->transition(); 4241 Handle<Map> transition = instr->transition();
4239 4242
4240 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 4243 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
4241 Register value = ToRegister(instr->value()); 4244 Register value = ToRegister(instr->value());
4242 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 4245 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
4243 __ SmiTst(value); 4246 __ SmiTst(value);
4244 DeoptimizeIf(eq, instr->environment()); 4247 DeoptimizeIf(eq, instr->environment());
4245 } 4248 }
4246 } else if (FLAG_track_double_fields && representation.IsDouble()) { 4249 } else if (FLAG_track_double_fields && representation.IsDouble()) {
4247 ASSERT(transition.is_null()); 4250 ASSERT(transition.is_null());
4248 ASSERT(instr->is_in_object()); 4251 ASSERT(access.IsInobject());
4249 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 4252 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
4250 DwVfpRegister value = ToDoubleRegister(instr->value()); 4253 DwVfpRegister value = ToDoubleRegister(instr->value());
4251 __ vstr(value, FieldMemOperand(object, offset)); 4254 __ vstr(value, FieldMemOperand(object, offset));
4252 return; 4255 return;
4253 } 4256 }
4254 4257
4255 if (!transition.is_null()) { 4258 if (!transition.is_null()) {
4256 if (transition->CanBeDeprecated()) { 4259 if (transition->CanBeDeprecated()) {
4257 transition_maps_.Add(transition, info()->zone()); 4260 transition_maps_.Add(transition, info()->zone());
4258 } 4261 }
(...skipping 12 matching lines...) Expand all
4271 OMIT_SMI_CHECK); 4274 OMIT_SMI_CHECK);
4272 } 4275 }
4273 } 4276 }
4274 4277
4275 // Do the store. 4278 // Do the store.
4276 Register value = ToRegister(instr->value()); 4279 Register value = ToRegister(instr->value());
4277 ASSERT(!object.is(value)); 4280 ASSERT(!object.is(value));
4278 HType type = instr->hydrogen()->value()->type(); 4281 HType type = instr->hydrogen()->value()->type();
4279 SmiCheck check_needed = 4282 SmiCheck check_needed =
4280 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 4283 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
4281 if (instr->is_in_object()) { 4284 if (access.IsInobject()) {
4282 __ str(value, FieldMemOperand(object, offset)); 4285 __ str(value, FieldMemOperand(object, offset));
4283 if (instr->hydrogen()->NeedsWriteBarrier()) { 4286 if (instr->hydrogen()->NeedsWriteBarrier()) {
4284 // Update the write barrier for the object for in-object properties. 4287 // Update the write barrier for the object for in-object properties.
4285 __ RecordWriteField(object, 4288 __ RecordWriteField(object,
4286 offset, 4289 offset,
4287 value, 4290 value,
4288 scratch, 4291 scratch,
4289 GetLinkRegisterState(), 4292 GetLinkRegisterState(),
4290 kSaveFPRegs, 4293 kSaveFPRegs,
4291 EMIT_REMEMBERED_SET, 4294 EMIT_REMEMBERED_SET,
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
5995 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5998 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5996 __ ldr(result, FieldMemOperand(scratch, 5999 __ ldr(result, FieldMemOperand(scratch,
5997 FixedArray::kHeaderSize - kPointerSize)); 6000 FixedArray::kHeaderSize - kPointerSize));
5998 __ bind(&done); 6001 __ bind(&done);
5999 } 6002 }
6000 6003
6001 6004
6002 #undef __ 6005 #undef __
6003 6006
6004 } } // namespace v8::internal 6007 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698