Use the right kind of guard for debug code.
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/232883002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b460910644
commit
7653b6ef7b
@ -2939,11 +2939,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
|||||||
Representation representation = access.representation();
|
Representation representation = access.representation();
|
||||||
if (representation.IsSmi() && SmiValuesAre32Bits() &&
|
if (representation.IsSmi() && SmiValuesAre32Bits() &&
|
||||||
instr->hydrogen()->representation().IsInteger32()) {
|
instr->hydrogen()->representation().IsInteger32()) {
|
||||||
#ifdef DEBUG
|
if (FLAG_debug_code) {
|
||||||
Register scratch = kScratchRegister;
|
Register scratch = kScratchRegister;
|
||||||
__ Load(scratch, FieldOperand(object, offset), representation);
|
__ Load(scratch, FieldOperand(object, offset), representation);
|
||||||
__ AssertSmi(scratch);
|
__ AssertSmi(scratch);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Read int value directly from upper half of the smi.
|
// Read int value directly from upper half of the smi.
|
||||||
STATIC_ASSERT(kSmiTag == 0);
|
STATIC_ASSERT(kSmiTag == 0);
|
||||||
@ -3154,17 +3154,17 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
|
|||||||
if (representation.IsInteger32() && SmiValuesAre32Bits() &&
|
if (representation.IsInteger32() && SmiValuesAre32Bits() &&
|
||||||
hinstr->elements_kind() == FAST_SMI_ELEMENTS) {
|
hinstr->elements_kind() == FAST_SMI_ELEMENTS) {
|
||||||
ASSERT(!requires_hole_check);
|
ASSERT(!requires_hole_check);
|
||||||
#ifdef DEBUG
|
if (FLAG_debug_code) {
|
||||||
Register scratch = kScratchRegister;
|
Register scratch = kScratchRegister;
|
||||||
__ Load(scratch,
|
__ Load(scratch,
|
||||||
BuildFastArrayOperand(instr->elements(),
|
BuildFastArrayOperand(instr->elements(),
|
||||||
key,
|
key,
|
||||||
FAST_ELEMENTS,
|
FAST_ELEMENTS,
|
||||||
offset,
|
offset,
|
||||||
instr->additional_index()),
|
instr->additional_index()),
|
||||||
Representation::Smi());
|
Representation::Smi());
|
||||||
__ AssertSmi(scratch);
|
__ AssertSmi(scratch);
|
||||||
#endif
|
}
|
||||||
// Read int value directly from upper half of the smi.
|
// Read int value directly from upper half of the smi.
|
||||||
STATIC_ASSERT(kSmiTag == 0);
|
STATIC_ASSERT(kSmiTag == 0);
|
||||||
ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
||||||
@ -4078,11 +4078,11 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
|||||||
if (representation.IsSmi() && SmiValuesAre32Bits() &&
|
if (representation.IsSmi() && SmiValuesAre32Bits() &&
|
||||||
hinstr->value()->representation().IsInteger32()) {
|
hinstr->value()->representation().IsInteger32()) {
|
||||||
ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
|
ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
|
||||||
#ifdef DEBUG
|
if (FLAG_debug_code) {
|
||||||
Register scratch = kScratchRegister;
|
Register scratch = kScratchRegister;
|
||||||
__ Load(scratch, FieldOperand(write_register, offset), representation);
|
__ Load(scratch, FieldOperand(write_register, offset), representation);
|
||||||
__ AssertSmi(scratch);
|
__ AssertSmi(scratch);
|
||||||
#endif
|
}
|
||||||
// Store int value directly to upper half of the smi.
|
// Store int value directly to upper half of the smi.
|
||||||
STATIC_ASSERT(kSmiTag == 0);
|
STATIC_ASSERT(kSmiTag == 0);
|
||||||
ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
||||||
@ -4301,17 +4301,17 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
|
|||||||
if (representation.IsInteger32() && SmiValuesAre32Bits()) {
|
if (representation.IsInteger32() && SmiValuesAre32Bits()) {
|
||||||
ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
|
ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
|
||||||
ASSERT(hinstr->elements_kind() == FAST_SMI_ELEMENTS);
|
ASSERT(hinstr->elements_kind() == FAST_SMI_ELEMENTS);
|
||||||
#ifdef DEBUG
|
if (FLAG_debug_code) {
|
||||||
Register scratch = kScratchRegister;
|
Register scratch = kScratchRegister;
|
||||||
__ Load(scratch,
|
__ Load(scratch,
|
||||||
BuildFastArrayOperand(instr->elements(),
|
BuildFastArrayOperand(instr->elements(),
|
||||||
key,
|
key,
|
||||||
FAST_ELEMENTS,
|
FAST_ELEMENTS,
|
||||||
offset,
|
offset,
|
||||||
instr->additional_index()),
|
instr->additional_index()),
|
||||||
Representation::Smi());
|
Representation::Smi());
|
||||||
__ AssertSmi(scratch);
|
__ AssertSmi(scratch);
|
||||||
#endif
|
}
|
||||||
// Store int value directly to upper half of the smi.
|
// Store int value directly to upper half of the smi.
|
||||||
STATIC_ASSERT(kSmiTag == 0);
|
STATIC_ASSERT(kSmiTag == 0);
|
||||||
ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
||||||
|
Loading…
Reference in New Issue
Block a user