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

Side by Side 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, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/types-inl.h" 6 #include "src/types-inl.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 53
54 // static 54 // static
55 FieldAccess AccessBuilder::ForMapInstanceType() { 55 FieldAccess AccessBuilder::ForMapInstanceType() {
56 return {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(), 56 return {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(),
57 Type::UntaggedUnsigned8(), kMachUint8}; 57 Type::UntaggedUnsigned8(), kMachUint8};
58 } 58 }
59 59
60 60
61 // static 61 // static
62 FieldAccess AccessBuilder::ForStringLength() { 62 FieldAccess AccessBuilder::ForStringLength(Zone* zone) {
63 return {kTaggedBase, String::kLengthOffset, Handle<Name>(), 63 return {kTaggedBase, String::kLengthOffset, Handle<Name>(),
64 Type::Intersect(Type::UnsignedSmall(), Type::TaggedSigned()), 64 Type::Range(0, String::kMaxLength, zone), kMachAnyTagged};
65 kMachAnyTagged};
66 } 65 }
67 66
68 67
69 // static 68 // static
70 FieldAccess AccessBuilder::ForValue() { 69 FieldAccess AccessBuilder::ForValue() {
71 return {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), Type::Any(), 70 return {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), Type::Any(),
72 kMachAnyTagged}; 71 kMachAnyTagged};
73 } 72 }
74 73
75 74
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return {kTaggedBase, SeqString::kHeaderSize, Type::Unsigned32(), 132 return {kTaggedBase, SeqString::kHeaderSize, Type::Unsigned32(),
134 kMachUint16}; 133 kMachUint16};
135 } 134 }
136 UNREACHABLE(); 135 UNREACHABLE();
137 return {kUntaggedBase, 0, Type::None(), kMachNone}; 136 return {kUntaggedBase, 0, Type::None(), kMachNone};
138 } 137 }
139 138
140 } // namespace compiler 139 } // namespace compiler
141 } // namespace internal 140 } // namespace internal
142 } // namespace v8 141 } // namespace v8
OLDNEW
« 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