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

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

Issue 1031383002: Add %_IncrementStatsCounter intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // static 76 // static
77 FieldAccess AccessBuilder::ForContextSlot(size_t index) { 77 FieldAccess AccessBuilder::ForContextSlot(size_t index) {
78 int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize; 78 int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize;
79 DCHECK_EQ(offset, 79 DCHECK_EQ(offset,
80 Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag); 80 Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag);
81 return {kTaggedBase, offset, Handle<Name>(), Type::Any(), kMachAnyTagged}; 81 return {kTaggedBase, offset, Handle<Name>(), Type::Any(), kMachAnyTagged};
82 } 82 }
83 83
84 84
85 // static 85 // static
86 FieldAccess AccessBuilder::ForStatsCounter() {
87 return {kUntaggedBase, 0, MaybeHandle<Name>(), Type::Signed32(), kMachInt32};
88 }
89
90
91 // static
86 ElementAccess AccessBuilder::ForFixedArrayElement() { 92 ElementAccess AccessBuilder::ForFixedArrayElement() {
87 return {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), kMachAnyTagged}; 93 return {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), kMachAnyTagged};
88 } 94 }
89 95
90 96
91 // static 97 // static
92 ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type, 98 ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type,
93 bool is_external) { 99 bool is_external) {
94 BaseTaggedness taggedness = is_external ? kUntaggedBase : kTaggedBase; 100 BaseTaggedness taggedness = is_external ? kUntaggedBase : kTaggedBase;
95 int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset; 101 int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return {kTaggedBase, SeqString::kHeaderSize, Type::Unsigned32(), 133 return {kTaggedBase, SeqString::kHeaderSize, Type::Unsigned32(),
128 kMachUint16}; 134 kMachUint16};
129 } 135 }
130 UNREACHABLE(); 136 UNREACHABLE();
131 return {kUntaggedBase, 0, Type::None(), kMachNone}; 137 return {kUntaggedBase, 0, Type::None(), kMachNone};
132 } 138 }
133 139
134 } // namespace compiler 140 } // namespace compiler
135 } // namespace internal 141 } // namespace internal
136 } // namespace v8 142 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698