Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index ae91065d59ba32e33cd8c62c02fa109bd91fb644..7ede51de447c2b8ca623457fcc733b0c11c57671 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -3766,6 +3766,14 @@ void HGraphBuilder::VisitProperty(Property* expr) { |
AddInstruction(new HCheckInstanceType(array, JS_ARRAY_TYPE, JS_ARRAY_TYPE)); |
instr = new HJSArrayLength(array); |
+ } else if (expr->IsStringLength()) { |
+ HValue* string = Pop(); |
+ AddInstruction(new HCheckNonSmi(string)); |
+ AddInstruction(new HCheckInstanceType(string, |
+ FIRST_STRING_TYPE, |
+ LAST_STRING_TYPE)); |
+ instr = new HStringLength(string); |
+ |
} else if (expr->IsFunctionPrototype()) { |
HValue* function = Pop(); |
AddInstruction(new HCheckNonSmi(function)); |