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

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

Issue 9023006: Remove unnecessary environment from LStoreKeyedFastElements. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: removed one redundant smi-check Created 8 years, 12 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
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 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after
3397 DeoptimizeIf(hs, instr->environment()); 3397 DeoptimizeIf(hs, instr->environment());
3398 } 3398 }
3399 3399
3400 3400
3401 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3401 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3402 Register value = ToRegister(instr->value()); 3402 Register value = ToRegister(instr->value());
3403 Register elements = ToRegister(instr->object()); 3403 Register elements = ToRegister(instr->object());
3404 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3404 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3405 Register scratch = scratch0(); 3405 Register scratch = scratch0();
3406 3406
3407 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3408 // conversion, so it deopts in that case.
3409 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3410 __ tst(value, Operand(kSmiTagMask));
3411 DeoptimizeIf(ne, instr->environment());
3412 }
3413
3414 // Do the store. 3407 // Do the store.
3415 if (instr->key()->IsConstantOperand()) { 3408 if (instr->key()->IsConstantOperand()) {
3416 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3409 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3417 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3410 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3418 int offset = 3411 int offset =
3419 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3412 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3420 __ str(value, FieldMemOperand(elements, offset)); 3413 __ str(value, FieldMemOperand(elements, offset));
3421 } else { 3414 } else {
3422 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); 3415 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2));
3423 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize)); 3416 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize));
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
4727 ASSERT(osr_pc_offset_ == -1); 4720 ASSERT(osr_pc_offset_ == -1);
4728 osr_pc_offset_ = masm()->pc_offset(); 4721 osr_pc_offset_ = masm()->pc_offset();
4729 } 4722 }
4730 4723
4731 4724
4732 4725
4733 4726
4734 #undef __ 4727 #undef __
4735 4728
4736 } } // namespace v8::internal 4729 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698