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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 } 3308 }
3309 } 3309 }
3310 } 3310 }
3311 3311
3312 3312
3313 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3313 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3314 Register value = ToRegister(instr->value()); 3314 Register value = ToRegister(instr->value());
3315 Register elements = ToRegister(instr->object()); 3315 Register elements = ToRegister(instr->object());
3316 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3316 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3317 3317
3318 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3319 // conversion, so it deopts in that case.
3320 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3321 __ test(value, Immediate(kSmiTagMask));
3322 DeoptimizeIf(not_zero, instr->environment());
3323 }
3324
3325 // Do the store. 3318 // Do the store.
3326 if (instr->key()->IsConstantOperand()) { 3319 if (instr->key()->IsConstantOperand()) {
3327 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3320 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3328 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3321 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3329 int offset = 3322 int offset =
3330 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3323 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3331 __ mov(FieldOperand(elements, offset), value); 3324 __ mov(FieldOperand(elements, offset), value);
3332 } else { 3325 } else {
3333 __ mov(FieldOperand(elements, 3326 __ mov(FieldOperand(elements,
3334 key, 3327 key,
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
4629 this, pointers, Safepoint::kLazyDeopt); 4622 this, pointers, Safepoint::kLazyDeopt);
4630 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4623 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4631 } 4624 }
4632 4625
4633 4626
4634 #undef __ 4627 #undef __
4635 4628
4636 } } // namespace v8::internal 4629 } } // namespace v8::internal
4637 4630
4638 #endif // V8_TARGET_ARCH_IA32 4631 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698