Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: src/compiler/access-builder.cc

Issue 1057813002: Fixed the range information for string lengths. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-intrinsic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-builder.cc
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc
index c69f22cb870fb7361774aa4322867555c3b61f08..9e5a0bbb8d84268d3117cf12ba10be0f57a82cca 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -59,10 +59,9 @@ FieldAccess AccessBuilder::ForMapInstanceType() {
// static
-FieldAccess AccessBuilder::ForStringLength() {
+FieldAccess AccessBuilder::ForStringLength(Zone* zone) {
return {kTaggedBase, String::kLengthOffset, Handle<Name>(),
- Type::Intersect(Type::UnsignedSmall(), Type::TaggedSigned()),
- kMachAnyTagged};
+ Type::Range(0, String::kMaxLength, zone), kMachAnyTagged};
}
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-intrinsic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698