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

Side by Side Diff: src/compiler/js-graph.cc

Issue 1759383003: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix uninitialized variable causing msan failure Created 4 years, 8 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.h ('k') | src/compiler/opcodes.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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/typer.h" 8 #include "src/compiler/typer.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 133
134 Node* JSGraph::Int64Constant(int64_t value) { 134 Node* JSGraph::Int64Constant(int64_t value) {
135 Node** loc = cache_.FindInt64Constant(value); 135 Node** loc = cache_.FindInt64Constant(value);
136 if (*loc == nullptr) { 136 if (*loc == nullptr) {
137 *loc = graph()->NewNode(common()->Int64Constant(value)); 137 *loc = graph()->NewNode(common()->Int64Constant(value));
138 } 138 }
139 return *loc; 139 return *loc;
140 } 140 }
141 141
142 Node* JSGraph::RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode) {
143 Node** loc = cache_.FindRelocatableInt32Constant(value);
144 if (*loc == nullptr) {
145 *loc = graph()->NewNode(common()->RelocatableInt32Constant(value, rmode));
146 }
147 return *loc;
148 }
149
150 Node* JSGraph::RelocatableInt64Constant(int64_t value, RelocInfo::Mode rmode) {
151 Node** loc = cache_.FindRelocatableInt64Constant(value);
152 if (*loc == nullptr) {
153 *loc = graph()->NewNode(common()->RelocatableInt64Constant(value, rmode));
154 }
155 return *loc;
156 }
157
158 Node* JSGraph::RelocatableIntPtrConstant(intptr_t value,
159 RelocInfo::Mode rmode) {
160 return kPointerSize == 8
161 ? RelocatableInt64Constant(value, rmode)
162 : RelocatableInt32Constant(static_cast<int>(value), rmode);
163 }
142 164
143 Node* JSGraph::NumberConstant(double value) { 165 Node* JSGraph::NumberConstant(double value) {
144 Node** loc = cache_.FindNumberConstant(value); 166 Node** loc = cache_.FindNumberConstant(value);
145 if (*loc == nullptr) { 167 if (*loc == nullptr) {
146 *loc = graph()->NewNode(common()->NumberConstant(value)); 168 *loc = graph()->NewNode(common()->NumberConstant(value));
147 } 169 }
148 return *loc; 170 return *loc;
149 } 171 }
150 172
151 173
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { 228 for (size_t i = 0; i < arraysize(cached_nodes_); i++) {
207 if (Node* node = cached_nodes_[i]) { 229 if (Node* node = cached_nodes_[i]) {
208 if (!node->IsDead()) nodes->push_back(node); 230 if (!node->IsDead()) nodes->push_back(node);
209 } 231 }
210 } 232 }
211 } 233 }
212 234
213 } // namespace compiler 235 } // namespace compiler
214 } // namespace internal 236 } // namespace internal
215 } // namespace v8 237 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698