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

Side by Side Diff: src/mips/lithium-codegen-mips.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 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 | 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 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3304 Operand(ToRegister(instr->length()))); 3304 Operand(ToRegister(instr->length())));
3305 } 3305 }
3306 3306
3307 3307
3308 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3308 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3309 Register value = ToRegister(instr->value()); 3309 Register value = ToRegister(instr->value());
3310 Register elements = ToRegister(instr->object()); 3310 Register elements = ToRegister(instr->object());
3311 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3311 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3312 Register scratch = scratch0(); 3312 Register scratch = scratch0();
3313 3313
3314 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3315 // conversion, so it deopts in that case.
3316 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3317 __ And(at, value, Operand(kSmiTagMask));
3318 DeoptimizeIf(ne, instr->environment(), at, Operand(zero_reg));
3319 }
3320
3321 // Do the store. 3314 // Do the store.
3322 if (instr->key()->IsConstantOperand()) { 3315 if (instr->key()->IsConstantOperand()) {
3323 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3316 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3324 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3317 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3325 int offset = 3318 int offset =
3326 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3319 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3327 __ sw(value, FieldMemOperand(elements, offset)); 3320 __ sw(value, FieldMemOperand(elements, offset));
3328 } else { 3321 } else {
3329 __ sll(scratch, key, kPointerSizeLog2); 3322 __ sll(scratch, key, kPointerSizeLog2);
3330 __ addu(scratch, elements, scratch); 3323 __ addu(scratch, elements, scratch);
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
4680 ASSERT(!environment->HasBeenRegistered()); 4673 ASSERT(!environment->HasBeenRegistered());
4681 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4674 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4682 ASSERT(osr_pc_offset_ == -1); 4675 ASSERT(osr_pc_offset_ == -1);
4683 osr_pc_offset_ = masm()->pc_offset(); 4676 osr_pc_offset_ = masm()->pc_offset();
4684 } 4677 }
4685 4678
4686 4679
4687 #undef __ 4680 #undef __
4688 4681
4689 } } // namespace v8::internal 4682 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698