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

Side by Side Diff: src/compiler/c-linkage.cc

Issue 2202433003: [wasm] Use a LazyInstance in wasm-linkage.cc to avoid a data race. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/compiler/wasm-linkage.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/assembler.h" 5 #include "src/assembler.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 7
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 9
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if (locations.return_count_ > 0) { 184 if (locations.return_count_ > 0) {
185 locations.AddReturn(regloc(kReturnRegister0, msig->GetReturn(0))); 185 locations.AddReturn(regloc(kReturnRegister0, msig->GetReturn(0)));
186 } 186 }
187 if (locations.return_count_ > 1) { 187 if (locations.return_count_ > 1) {
188 locations.AddReturn(regloc(kReturnRegister1, msig->GetReturn(1))); 188 locations.AddReturn(regloc(kReturnRegister1, msig->GetReturn(1)));
189 } 189 }
190 190
191 const int parameter_count = static_cast<int>(msig->parameter_count()); 191 const int parameter_count = static_cast<int>(msig->parameter_count());
192 192
193 #ifdef PARAM_REGISTERS 193 #ifdef PARAM_REGISTERS
194 static const Register kParamRegisters[] = {PARAM_REGISTERS}; 194 const Register kParamRegisters[] = {PARAM_REGISTERS};
195 static const int kParamRegisterCount = 195 const int kParamRegisterCount = static_cast<int>(arraysize(kParamRegisters));
196 static_cast<int>(arraysize(kParamRegisters));
197 #else 196 #else
198 static const Register* kParamRegisters = nullptr; 197 const Register* kParamRegisters = nullptr;
199 static const int kParamRegisterCount = 0; 198 const int kParamRegisterCount = 0;
200 #endif 199 #endif
201 200
202 #ifdef STACK_SHADOW_WORDS 201 #ifdef STACK_SHADOW_WORDS
203 int stack_offset = STACK_SHADOW_WORDS; 202 int stack_offset = STACK_SHADOW_WORDS;
204 #else 203 #else
205 int stack_offset = 0; 204 int stack_offset = 0;
206 #endif 205 #endif
207 // Add register and/or stack parameter(s). 206 // Add register and/or stack parameter(s).
208 for (int i = 0; i < parameter_count; i++) { 207 for (int i = 0; i < parameter_count; i++) {
209 if (i < kParamRegisterCount) { 208 if (i < kParamRegisterCount) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 0, // stack_parameter_count 242 0, // stack_parameter_count
244 Operator::kNoProperties, // properties 243 Operator::kNoProperties, // properties
245 kCalleeSaveRegisters, // callee-saved registers 244 kCalleeSaveRegisters, // callee-saved registers
246 kCalleeSaveFPRegisters, // callee-saved fp regs 245 kCalleeSaveFPRegisters, // callee-saved fp regs
247 flags, "c-call"); 246 flags, "c-call");
248 } 247 }
249 248
250 } // namespace compiler 249 } // namespace compiler
251 } // namespace internal 250 } // namespace internal
252 } // namespace v8 251 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/wasm-linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698