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 1991203002: [generators] Replace some runtime functions with Turbofan JS operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/bytecode-graph-builder.cc » ('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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 FieldAccess access = {kTaggedBase, 123 FieldAccess access = {kTaggedBase,
124 JSFunction::kNextFunctionLinkOffset, 124 JSFunction::kNextFunctionLinkOffset,
125 Handle<Name>(), 125 Handle<Name>(),
126 Type::Any(), 126 Type::Any(),
127 MachineType::AnyTagged(), 127 MachineType::AnyTagged(),
128 kPointerWriteBarrier}; 128 kPointerWriteBarrier};
129 return access; 129 return access;
130 } 130 }
131 131
132 // static 132 // static
133 FieldAccess AccessBuilder::ForJSGeneratorObjectContext() {
134 FieldAccess access = {kTaggedBase,
135 JSGeneratorObject::kContextOffset,
136 Handle<Name>(),
137 Type::Internal(),
138 MachineType::AnyTagged(),
139 kPointerWriteBarrier};
140 return access;
141 }
142
143 // static
144 FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() {
145 TypeCache const& type_cache = TypeCache::Get();
146 FieldAccess access = {kTaggedBase,
147 JSGeneratorObject::kContinuationOffset,
148 Handle<Name>(),
149 type_cache.kSmi,
150 MachineType::AnyTagged(),
151 kNoWriteBarrier};
152 return access;
153 }
154
155 // static
156 FieldAccess AccessBuilder::ForJSGeneratorObjectOperandStack() {
157 FieldAccess access = {kTaggedBase,
158 JSGeneratorObject::kOperandStackOffset,
159 Handle<Name>(),
160 Type::Internal(),
161 MachineType::AnyTagged(),
162 kPointerWriteBarrier};
163 return access;
164 }
165
166 // static
133 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { 167 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) {
134 TypeCache const& type_cache = TypeCache::Get(); 168 TypeCache const& type_cache = TypeCache::Get();
135 FieldAccess access = {kTaggedBase, 169 FieldAccess access = {kTaggedBase,
136 JSArray::kLengthOffset, 170 JSArray::kLengthOffset,
137 Handle<Name>(), 171 Handle<Name>(),
138 type_cache.kJSArrayLengthType, 172 type_cache.kJSArrayLengthType,
139 MachineType::AnyTagged(), 173 MachineType::AnyTagged(),
140 kFullWriteBarrier}; 174 kFullWriteBarrier};
141 if (IsFastDoubleElementsKind(elements_kind)) { 175 if (IsFastDoubleElementsKind(elements_kind)) {
142 access.type = type_cache.kFixedDoubleArrayLengthType; 176 access.type = type_cache.kFixedDoubleArrayLengthType;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 533 }
500 UNREACHABLE(); 534 UNREACHABLE();
501 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), 535 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
502 kNoWriteBarrier}; 536 kNoWriteBarrier};
503 return access; 537 return access;
504 } 538 }
505 539
506 } // namespace compiler 540 } // namespace compiler
507 } // namespace internal 541 } // namespace internal
508 } // namespace v8 542 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698