Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 519210c0dc92376ba3e0c5b8629c8c613442edad..405ae516dcc2d8339a485f50acf34990bf45c8c7 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -374,13 +374,38 @@ void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { |
void MacroAssembler::CheckFastElements(Register map, |
Label* fail, |
Label::Distance distance) { |
- STATIC_ASSERT(FAST_ELEMENTS == 0); |
+ STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
+ STATIC_ASSERT(FAST_ELEMENTS == 1); |
cmpb(FieldOperand(map, Map::kBitField2Offset), |
Map::kMaximumBitField2FastElementValue); |
j(above, fail, distance); |
} |
+void MacroAssembler::CheckFastObjectElements(Register map, |
+ Label* fail, |
+ Label::Distance distance) { |
+ STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
+ STATIC_ASSERT(FAST_ELEMENTS == 1); |
+ cmpb(FieldOperand(map, Map::kBitField2Offset), |
+ Map::kMaximumBitField2FastSmiOnlyElementValue); |
+ j(below_equal, fail, distance); |
+ cmpb(FieldOperand(map, Map::kBitField2Offset), |
+ Map::kMaximumBitField2FastElementValue); |
+ j(above, fail, distance); |
+} |
+ |
+ |
+void MacroAssembler::CheckFastSmiOnlyElements(Register map, |
+ Label* fail, |
+ Label::Distance distance) { |
+ STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
+ cmpb(FieldOperand(map, Map::kBitField2Offset), |
+ Map::kMaximumBitField2FastSmiOnlyElementValue); |
+ j(above, fail, distance); |
+} |
+ |
+ |
void MacroAssembler::CheckMap(Register obj, |
Handle<Map> map, |
Label* fail, |