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

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

Issue 8002019: Add Crankshaft support for smi-only elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments, added tests Created 9 years, 2 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/hydrogen-instructions.h ('k') | src/ic.cc » ('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 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 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 } 3182 }
3183 } 3183 }
3184 } 3184 }
3185 3185
3186 3186
3187 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3187 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3188 Register value = ToRegister(instr->value()); 3188 Register value = ToRegister(instr->value());
3189 Register elements = ToRegister(instr->object()); 3189 Register elements = ToRegister(instr->object());
3190 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3190 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3191 3191
3192 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3193 // conversion, so it deopts in that case.
3194 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3195 __ test(value, Immediate(kSmiTagMask));
3196 DeoptimizeIf(not_zero, instr->environment());
3197 }
3198
3192 // Do the store. 3199 // Do the store.
3193 if (instr->key()->IsConstantOperand()) { 3200 if (instr->key()->IsConstantOperand()) {
3194 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3201 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3195 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3202 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3196 int offset = 3203 int offset =
3197 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3204 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3198 __ mov(FieldOperand(elements, offset), value); 3205 __ mov(FieldOperand(elements, offset), value);
3199 } else { 3206 } else {
3200 __ mov(FieldOperand(elements, 3207 __ mov(FieldOperand(elements,
3201 key, 3208 key,
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
4423 env->deoptimization_index()); 4430 env->deoptimization_index());
4424 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4431 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4425 } 4432 }
4426 4433
4427 4434
4428 #undef __ 4435 #undef __
4429 4436
4430 } } // namespace v8::internal 4437 } } // namespace v8::internal
4431 4438
4432 #endif // V8_TARGET_ARCH_IA32 4439 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698