Index: runtime/vm/intrinsifier.cc |
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc |
index 15a0fa9275c5e0ae839856f01ee82d33846147c6..9e049d0541a8e92021d8713bbab6fed4390ae9dc 100644 |
--- a/runtime/vm/intrinsifier.cc |
+++ b/runtime/vm/intrinsifier.cc |
@@ -373,6 +373,12 @@ static void PrepareIndexedOp(BlockBuilder* builder, |
Definition* array, |
Definition* index, |
intptr_t length_offset) { |
+ TokenPosition token_pos = builder->TokenPos(); |
+ builder->AddInstruction( |
+ new CheckSmiInstr(new Value(index), |
+ Thread::kNoDeoptId, |
+ token_pos)); |
+ |
Definition* length = builder->AddDefinition( |
new LoadFieldInstr(new Value(array), |
length_offset, |