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

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

Issue 8857001: [hydrogen] don't bailout assignments to consts (Closed) Base URL: gh:v8/v8@master
Patch Set: fixed naming, added test Created 9 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 Register context = ToRegister(instr->context()); 2303 Register context = ToRegister(instr->context());
2304 Register result = ToRegister(instr->result()); 2304 Register result = ToRegister(instr->result());
2305 __ ldr(result, ContextOperand(context, instr->slot_index())); 2305 __ ldr(result, ContextOperand(context, instr->slot_index()));
2306 } 2306 }
2307 2307
2308 2308
2309 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 2309 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
2310 Register context = ToRegister(instr->context()); 2310 Register context = ToRegister(instr->context());
2311 Register value = ToRegister(instr->value()); 2311 Register value = ToRegister(instr->value());
2312 MemOperand target = ContextOperand(context, instr->slot_index()); 2312 MemOperand target = ContextOperand(context, instr->slot_index());
2313
2314 Label skip_assignment;
2315
2316 if (instr->RequiresHoleCheck()) {
2317 __ cmp(value, Operand(factory()->the_hole_value()));
2318 __ b(ne, &skip_assignment);
2319 }
2320
2313 __ str(value, target); 2321 __ str(value, target);
2314 if (instr->hydrogen()->NeedsWriteBarrier()) { 2322 if (instr->hydrogen()->NeedsWriteBarrier()) {
2315 HType type = instr->hydrogen()->value()->type(); 2323 HType type = instr->hydrogen()->value()->type();
2316 SmiCheck check_needed = 2324 SmiCheck check_needed =
2317 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 2325 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
2318 __ RecordWriteContextSlot(context, 2326 __ RecordWriteContextSlot(context,
2319 target.offset(), 2327 target.offset(),
2320 value, 2328 value,
2321 scratch0(), 2329 scratch0(),
2322 kLRHasBeenSaved, 2330 kLRHasBeenSaved,
2323 kSaveFPRegs, 2331 kSaveFPRegs,
2324 EMIT_REMEMBERED_SET, 2332 EMIT_REMEMBERED_SET,
2325 check_needed); 2333 check_needed);
2326 } 2334 }
2335
2336 __ bind(&skip_assignment);
2327 } 2337 }
2328 2338
2329 2339
2330 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2340 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2331 Register object = ToRegister(instr->InputAt(0)); 2341 Register object = ToRegister(instr->InputAt(0));
2332 Register result = ToRegister(instr->result()); 2342 Register result = ToRegister(instr->result());
2333 if (instr->hydrogen()->is_in_object()) { 2343 if (instr->hydrogen()->is_in_object()) {
2334 __ ldr(result, FieldMemOperand(object, instr->hydrogen()->offset())); 2344 __ ldr(result, FieldMemOperand(object, instr->hydrogen()->offset()));
2335 } else { 2345 } else {
2336 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 2346 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after
4702 ASSERT(osr_pc_offset_ == -1); 4712 ASSERT(osr_pc_offset_ == -1);
4703 osr_pc_offset_ = masm()->pc_offset(); 4713 osr_pc_offset_ = masm()->pc_offset();
4704 } 4714 }
4705 4715
4706 4716
4707 4717
4708 4718
4709 #undef __ 4719 #undef __
4710 4720
4711 } } // namespace v8::internal 4721 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698