Index: src/utils.cc |
diff --git a/src/utils.cc b/src/utils.cc |
index 6838cb069d143c2d3c9e8e65ea3a0cbb17b3c93b..8462615200abb254ce490e159f327e1c50b45e6d 100644 |
--- a/src/utils.cc |
+++ b/src/utils.cc |
@@ -97,4 +97,18 @@ char* SimpleStringBuilder::Finalize() { |
} |
+const DivMagicNumbers DivMagicNumberFor(int32_t divisor) { |
+ switch (divisor) { |
+ case 3: return DivMagicNumberFor3; |
+ case 5: return DivMagicNumberFor5; |
+ case 7: return DivMagicNumberFor7; |
+ case 9: return DivMagicNumberFor9; |
+ case 11: return DivMagicNumberFor11; |
+ case 25: return DivMagicNumberFor25; |
+ case 125: return DivMagicNumberFor125; |
+ case 625: return DivMagicNumberFor625; |
+ default: return InvalidDivMagicNumber; |
+ } |
+} |
+ |
} } // namespace v8::internal |