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

Side by Side Diff: src/x64/lithium-codegen-x64.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 | « src/ia32/lithium-codegen-ia32.cc ('k') | test/mjsunit/regress/regress-store-heapobject.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3948 matching lines...) Expand 10 before | Expand all | Expand 10 after
3959 if (instr->value()->IsConstantOperand()) { 3959 if (instr->value()->IsConstantOperand()) {
3960 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 3960 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
3961 if (!IsInteger32Constant(operand_value) && 3961 if (!IsInteger32Constant(operand_value) &&
3962 !IsSmiConstant(operand_value)) { 3962 !IsSmiConstant(operand_value)) {
3963 DeoptimizeIf(no_condition, instr->environment()); 3963 DeoptimizeIf(no_condition, instr->environment());
3964 } 3964 }
3965 } 3965 }
3966 } else if (representation.IsHeapObject()) { 3966 } else if (representation.IsHeapObject()) {
3967 if (instr->value()->IsConstantOperand()) { 3967 if (instr->value()->IsConstantOperand()) {
3968 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 3968 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
3969 if (IsInteger32Constant(operand_value)) { 3969 if (chunk_->LookupConstant(operand_value)->HasSmiValue()) {
3970 DeoptimizeIf(no_condition, instr->environment()); 3970 DeoptimizeIf(no_condition, instr->environment());
3971 } 3971 }
3972 } else { 3972 } else {
3973 if (!hinstr->value()->type().IsHeapObject()) { 3973 if (!hinstr->value()->type().IsHeapObject()) {
3974 Register value = ToRegister(instr->value()); 3974 Register value = ToRegister(instr->value());
3975 Condition cc = masm()->CheckSmi(value); 3975 Condition cc = masm()->CheckSmi(value);
3976 DeoptimizeIf(cc, instr->environment()); 3976 DeoptimizeIf(cc, instr->environment());
3977 3977
3978 // We know that value is a smi now, so we can omit the check below. 3978 // We know that value is a smi now, so we can omit the check below.
3979 check_needed = OMIT_SMI_CHECK; 3979 check_needed = OMIT_SMI_CHECK;
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after
5659 FixedArray::kHeaderSize - kPointerSize)); 5659 FixedArray::kHeaderSize - kPointerSize));
5660 __ bind(&done); 5660 __ bind(&done);
5661 } 5661 }
5662 5662
5663 5663
5664 #undef __ 5664 #undef __
5665 5665
5666 } } // namespace v8::internal 5666 } } // namespace v8::internal
5667 5667
5668 #endif // V8_TARGET_ARCH_X64 5668 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | test/mjsunit/regress/regress-store-heapobject.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698