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

Side by Side Diff: src/compiler/access-builder.cc

Issue 1216593003: [turbofan] Optimize string "length" property access based on types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 5 years, 5 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 | « BUILD.gn ('k') | src/compiler/js-type-feedback-lowering.h » ('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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // static 108 // static
109 FieldAccess AccessBuilder::ForMapInstanceType() { 109 FieldAccess AccessBuilder::ForMapInstanceType() {
110 return {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(), 110 return {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(),
111 Type::UntaggedUnsigned8(), kMachUint8}; 111 Type::UntaggedUnsigned8(), kMachUint8};
112 } 112 }
113 113
114 114
115 // static 115 // static
116 FieldAccess AccessBuilder::ForStringLength(Zone* zone) { 116 FieldAccess AccessBuilder::ForStringLength(Zone* zone) {
117 return {kTaggedBase, String::kLengthOffset, Handle<Name>(), 117 return {kTaggedBase, String::kLengthOffset, Handle<Name>(),
118 Type::Range(0, String::kMaxLength, zone), kMachAnyTagged}; 118 Type::Intersect(Type::Range(0, String::kMaxLength, zone),
119 Type::TaggedSigned(), zone),
120 kMachAnyTagged};
119 } 121 }
120 122
121 123
122 // static 124 // static
123 FieldAccess AccessBuilder::ForValue() { 125 FieldAccess AccessBuilder::ForValue() {
124 return {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), Type::Any(), 126 return {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), Type::Any(),
125 kMachAnyTagged}; 127 kMachAnyTagged};
126 } 128 }
127 129
128 130
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 216
215 // static 217 // static
216 FieldAccess AccessBuilder::ForFrameMarker() { 218 FieldAccess AccessBuilder::ForFrameMarker() {
217 return {kUntaggedBase, StandardFrameConstants::kMarkerOffset, 219 return {kUntaggedBase, StandardFrameConstants::kMarkerOffset,
218 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; 220 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged};
219 } 221 }
220 222
221 } // namespace compiler 223 } // namespace compiler
222 } // namespace internal 224 } // namespace internal
223 } // namespace v8 225 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler/js-type-feedback-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698