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

Side by Side Diff: src/type-cache.h

Issue 2199753002: [turbofan] Inline bunch of ArrayBuffer view accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 4 years, 4 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/js-graph.cc ('k') | no next file » | 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 #ifndef V8_TYPE_CACHE_H_ 5 #ifndef V8_TYPE_CACHE_H_
6 #define V8_TYPE_CACHE_H_ 6 #define V8_TYPE_CACHE_H_
7 7
8 #include "src/types.h" 8 #include "src/types.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // The FixedDoubleArray::length property always containts a smi in the range 118 // The FixedDoubleArray::length property always containts a smi in the range
119 // [0, FixedDoubleArray::kMaxLength]. 119 // [0, FixedDoubleArray::kMaxLength].
120 Type* const kFixedDoubleArrayLengthType = CreateNative( 120 Type* const kFixedDoubleArrayLengthType = CreateNative(
121 CreateRange(0.0, FixedDoubleArray::kMaxLength), Type::TaggedSigned()); 121 CreateRange(0.0, FixedDoubleArray::kMaxLength), Type::TaggedSigned());
122 122
123 // The JSArray::length property always contains a tagged number in the range 123 // The JSArray::length property always contains a tagged number in the range
124 // [0, kMaxUInt32]. 124 // [0, kMaxUInt32].
125 Type* const kJSArrayLengthType = 125 Type* const kJSArrayLengthType =
126 CreateNative(Type::Unsigned32(), Type::Tagged()); 126 CreateNative(Type::Unsigned32(), Type::Tagged());
127 127
128 // The JSTyped::length property always contains a tagged number in the range
129 // [0, kMaxSmiValue].
130 Type* const kJSTypedArrayLengthType =
131 CreateNative(Type::UnsignedSmall(), Type::TaggedSigned());
132
128 // The String::length property always contains a smi in the range 133 // The String::length property always contains a smi in the range
129 // [0, String::kMaxLength]. 134 // [0, String::kMaxLength].
130 Type* const kStringLengthType = 135 Type* const kStringLengthType =
131 CreateNative(CreateRange(0.0, String::kMaxLength), Type::TaggedSigned()); 136 CreateNative(CreateRange(0.0, String::kMaxLength), Type::TaggedSigned());
132 137
133 #define TYPED_ARRAY(TypeName, type_name, TYPE_NAME, ctype, size) \ 138 #define TYPED_ARRAY(TypeName, type_name, TYPE_NAME, ctype, size) \
134 Type* const k##TypeName##Array = CreateArray(k##TypeName); 139 Type* const k##TypeName##Array = CreateArray(k##TypeName);
135 TYPED_ARRAYS(TYPED_ARRAY) 140 TYPED_ARRAYS(TYPED_ARRAY)
136 #undef TYPED_ARRAY 141 #undef TYPED_ARRAY
137 142
(...skipping 21 matching lines...) Expand all
159 return Type::Range(min, max, zone()); 164 return Type::Range(min, max, zone());
160 } 165 }
161 166
162 Zone* zone() { return &zone_; } 167 Zone* zone() { return &zone_; }
163 }; 168 };
164 169
165 } // namespace internal 170 } // namespace internal
166 } // namespace v8 171 } // namespace v8
167 172
168 #endif // V8_TYPE_CACHE_H_ 173 #endif // V8_TYPE_CACHE_H_
OLDNEW
« no previous file with comments | « src/compiler/js-graph.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698