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

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

Issue 1465203002: [turbofan] Initial support for inline allocations of arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unbounded inlining. Reduce code duplication. Add proper code dependencies. Created 5 years 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-typed-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 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/type-cache.h" 10 #include "src/type-cache.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // static 268 // static
269 FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() { 269 FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() {
270 FieldAccess access = {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset, 270 FieldAccess access = {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset,
271 Handle<Name>(), Type::Any(), kMachAnyTagged}; 271 Handle<Name>(), Type::Any(), kMachAnyTagged};
272 return access; 272 return access;
273 } 273 }
274 274
275 275
276 // static 276 // static
277 ElementAccess AccessBuilder::ForFixedArrayElement() { 277 ElementAccess AccessBuilder::ForFixedArrayElement() {
278 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), 278 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(),
279 kMachAnyTagged}; 279 kMachAnyTagged};
280 return access; 280 return access;
281 } 281 }
282 282
283 283
284 // static 284 // static
285 ElementAccess AccessBuilder::ForFixedDoubleArrayElement() {
286 ElementAccess access = {kTaggedBase, FixedDoubleArray::kHeaderSize,
287 TypeCache::Get().kFloat64, kMachFloat64};
288 return access;
289 }
290
291
292 // static
285 ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type, 293 ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type,
286 bool is_external) { 294 bool is_external) {
287 BaseTaggedness taggedness = is_external ? kUntaggedBase : kTaggedBase; 295 BaseTaggedness taggedness = is_external ? kUntaggedBase : kTaggedBase;
288 int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset; 296 int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset;
289 switch (type) { 297 switch (type) {
290 case kExternalInt8Array: { 298 case kExternalInt8Array: {
291 ElementAccess access = {taggedness, header_size, Type::Signed32(), 299 ElementAccess access = {taggedness, header_size, Type::Signed32(),
292 kMachInt8}; 300 kMachInt8};
293 return access; 301 return access;
294 } 302 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // static 362 // static
355 FieldAccess AccessBuilder::ForFrameMarker() { 363 FieldAccess AccessBuilder::ForFrameMarker() {
356 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, 364 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset,
357 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; 365 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged};
358 return access; 366 return access;
359 } 367 }
360 368
361 } // namespace compiler 369 } // namespace compiler
362 } // namespace internal 370 } // namespace internal
363 } // namespace v8 371 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698