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

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

Issue 210193002: Ensure the constant operand for heap-object store-named-field is not a smi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/x64/lithium-codegen-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4333 matching lines...) Expand 10 before | Expand all | Expand 10 after
4344 if (representation.IsSmi()) { 4344 if (representation.IsSmi()) {
4345 if (instr->value()->IsConstantOperand()) { 4345 if (instr->value()->IsConstantOperand()) {
4346 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 4346 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
4347 if (!IsSmi(operand_value)) { 4347 if (!IsSmi(operand_value)) {
4348 DeoptimizeIf(no_condition, instr->environment()); 4348 DeoptimizeIf(no_condition, instr->environment());
4349 } 4349 }
4350 } 4350 }
4351 } else if (representation.IsHeapObject()) { 4351 } else if (representation.IsHeapObject()) {
4352 if (instr->value()->IsConstantOperand()) { 4352 if (instr->value()->IsConstantOperand()) {
4353 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 4353 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
4354 if (IsInteger32(operand_value)) { 4354 if (chunk_->LookupConstant(operand_value)->HasSmiValue()) {
4355 DeoptimizeIf(no_condition, instr->environment()); 4355 DeoptimizeIf(no_condition, instr->environment());
4356 } 4356 }
4357 } else { 4357 } else {
4358 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 4358 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
4359 Register value = ToRegister(instr->value()); 4359 Register value = ToRegister(instr->value());
4360 __ test(value, Immediate(kSmiTagMask)); 4360 __ test(value, Immediate(kSmiTagMask));
4361 DeoptimizeIf(zero, instr->environment()); 4361 DeoptimizeIf(zero, instr->environment());
4362 4362
4363 // We know that value is a smi now, so we can omit the check below. 4363 // We know that value is a smi now, so we can omit the check below.
4364 check_needed = OMIT_SMI_CHECK; 4364 check_needed = OMIT_SMI_CHECK;
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after
6352 FixedArray::kHeaderSize - kPointerSize)); 6352 FixedArray::kHeaderSize - kPointerSize));
6353 __ bind(&done); 6353 __ bind(&done);
6354 } 6354 }
6355 6355
6356 6356
6357 #undef __ 6357 #undef __
6358 6358
6359 } } // namespace v8::internal 6359 } } // namespace v8::internal
6360 6360
6361 #endif // V8_TARGET_ARCH_IA32 6361 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698