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

Side by Side Diff: src/arm/lithium-codegen-arm.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 | « no previous file | src/hydrogen.h » ('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 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after
3335 DeoptimizeIf(hs, instr->environment()); 3335 DeoptimizeIf(hs, instr->environment());
3336 } 3336 }
3337 3337
3338 3338
3339 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3339 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3340 Register value = ToRegister(instr->value()); 3340 Register value = ToRegister(instr->value());
3341 Register elements = ToRegister(instr->object()); 3341 Register elements = ToRegister(instr->object());
3342 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3342 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3343 Register scratch = scratch0(); 3343 Register scratch = scratch0();
3344 3344
3345 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3346 // conversion, so it deopts in that case.
3347 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3348 __ tst(value, Operand(kSmiTagMask));
3349 DeoptimizeIf(ne, instr->environment());
3350 }
3351
3345 // Do the store. 3352 // Do the store.
3346 if (instr->key()->IsConstantOperand()) { 3353 if (instr->key()->IsConstantOperand()) {
3347 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3354 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3348 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3355 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3349 int offset = 3356 int offset =
3350 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3357 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3351 __ str(value, FieldMemOperand(elements, offset)); 3358 __ str(value, FieldMemOperand(elements, offset));
3352 } else { 3359 } else {
3353 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); 3360 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2));
3354 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize)); 3361 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize));
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
4554 ASSERT(osr_pc_offset_ == -1); 4561 ASSERT(osr_pc_offset_ == -1);
4555 osr_pc_offset_ = masm()->pc_offset(); 4562 osr_pc_offset_ = masm()->pc_offset();
4556 } 4563 }
4557 4564
4558 4565
4559 4566
4560 4567
4561 #undef __ 4568 #undef __
4562 4569
4563 } } // namespace v8::internal 4570 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698