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

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

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/access-builder.h ('k') | src/compiler/js-builtin-reducer.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 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/handles-inl.h" 9 #include "src/handles-inl.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { 209 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() {
210 FieldAccess access = {kTaggedBase, 210 FieldAccess access = {kTaggedBase,
211 JSArrayBuffer::kBackingStoreOffset, 211 JSArrayBuffer::kBackingStoreOffset,
212 MaybeHandle<Name>(), 212 MaybeHandle<Name>(),
213 Type::UntaggedPointer(), 213 Type::UntaggedPointer(),
214 MachineType::Pointer(), 214 MachineType::Pointer(),
215 kNoWriteBarrier}; 215 kNoWriteBarrier};
216 return access; 216 return access;
217 } 217 }
218 218
219
220 // static 219 // static
221 FieldAccess AccessBuilder::ForJSArrayBufferBitField() { 220 FieldAccess AccessBuilder::ForJSArrayBufferBitField() {
222 FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset, 221 FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset,
223 MaybeHandle<Name>(), TypeCache::Get().kInt8, 222 MaybeHandle<Name>(), TypeCache::Get().kUint8,
224 MachineType::Int8(), kNoWriteBarrier}; 223 MachineType::Uint32(), kNoWriteBarrier};
225 return access; 224 return access;
226 } 225 }
227 226
228
229 // static 227 // static
230 FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() { 228 FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() {
231 FieldAccess access = {kTaggedBase, 229 FieldAccess access = {kTaggedBase,
232 JSArrayBufferView::kBufferOffset, 230 JSArrayBufferView::kBufferOffset,
233 MaybeHandle<Name>(), 231 MaybeHandle<Name>(),
234 Type::TaggedPointer(), 232 Type::TaggedPointer(),
235 MachineType::AnyTagged(), 233 MachineType::AnyTagged(),
236 kPointerWriteBarrier}; 234 kPointerWriteBarrier};
237 return access; 235 return access;
238 } 236 }
239 237
238 // static
239 FieldAccess AccessBuilder::ForJSArrayBufferViewByteLength() {
240 FieldAccess access = {kTaggedBase,
241 JSArrayBufferView::kByteLengthOffset,
242 MaybeHandle<Name>(),
243 TypeCache::Get().kPositiveInteger,
244 MachineType::AnyTagged(),
245 kFullWriteBarrier};
246 return access;
247 }
248
249 // static
250 FieldAccess AccessBuilder::ForJSArrayBufferViewByteOffset() {
251 FieldAccess access = {kTaggedBase,
252 JSArrayBufferView::kByteOffsetOffset,
253 MaybeHandle<Name>(),
254 TypeCache::Get().kPositiveInteger,
255 MachineType::AnyTagged(),
256 kFullWriteBarrier};
257 return access;
258 }
259
260 // static
261 FieldAccess AccessBuilder::ForJSTypedArrayLength() {
262 FieldAccess access = {kTaggedBase,
263 JSTypedArray::kLengthOffset,
264 MaybeHandle<Name>(),
265 TypeCache::Get().kJSTypedArrayLengthType,
266 MachineType::AnyTagged(),
267 kNoWriteBarrier};
268 return access;
269 }
240 270
241 // static 271 // static
242 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { 272 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) {
243 FieldAccess access = {kTaggedBase, 273 FieldAccess access = {kTaggedBase,
244 JSDate::kValueOffset + index * kPointerSize, 274 JSDate::kValueOffset + index * kPointerSize,
245 MaybeHandle<Name>(), 275 MaybeHandle<Name>(),
246 Type::Number(), 276 Type::Number(),
247 MachineType::AnyTagged(), 277 MachineType::AnyTagged(),
248 kFullWriteBarrier}; 278 kFullWriteBarrier};
249 return access; 279 return access;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 651 }
622 UNREACHABLE(); 652 UNREACHABLE();
623 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), 653 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
624 kNoWriteBarrier}; 654 kNoWriteBarrier};
625 return access; 655 return access;
626 } 656 }
627 657
628 } // namespace compiler 658 } // namespace compiler
629 } // namespace internal 659 } // namespace internal
630 } // namespace v8 660 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698