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

Side by Side Diff: src/x64/lithium-codegen-x64.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/runtime.cc ('k') | test/mjsunit/element-kind.js » ('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 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 } 3151 }
3152 DeoptimizeIf(below_equal, instr->environment()); 3152 DeoptimizeIf(below_equal, instr->environment());
3153 } 3153 }
3154 3154
3155 3155
3156 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3156 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3157 Register value = ToRegister(instr->value()); 3157 Register value = ToRegister(instr->value());
3158 Register elements = ToRegister(instr->object()); 3158 Register elements = ToRegister(instr->object());
3159 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3159 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3160 3160
3161 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3162 // conversion, so it deopts in that case.
3163 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3164 Condition cc = masm()->CheckSmi(value);
3165 DeoptimizeIf(NegateCondition(cc), instr->environment());
3166 }
3167
3161 // Do the store. 3168 // Do the store.
3162 if (instr->key()->IsConstantOperand()) { 3169 if (instr->key()->IsConstantOperand()) {
3163 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3170 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3164 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3171 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3165 int offset = 3172 int offset =
3166 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3173 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3167 __ movq(FieldOperand(elements, offset), value); 3174 __ movq(FieldOperand(elements, offset), value);
3168 } else { 3175 } else {
3169 __ movq(FieldOperand(elements, 3176 __ movq(FieldOperand(elements,
3170 key, 3177 key,
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
4184 RegisterEnvironmentForDeoptimization(environment); 4191 RegisterEnvironmentForDeoptimization(environment);
4185 ASSERT(osr_pc_offset_ == -1); 4192 ASSERT(osr_pc_offset_ == -1);
4186 osr_pc_offset_ = masm()->pc_offset(); 4193 osr_pc_offset_ = masm()->pc_offset();
4187 } 4194 }
4188 4195
4189 #undef __ 4196 #undef __
4190 4197
4191 } } // namespace v8::internal 4198 } } // namespace v8::internal
4192 4199
4193 #endif // V8_TARGET_ARCH_X64 4200 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/element-kind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698