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

Side by Side Diff: src/compiler/instruction.h

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ben's review 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/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction.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 #ifndef V8_COMPILER_INSTRUCTION_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 ConstantMap::const_iterator it = constants_.find(virtual_register); 1324 ConstantMap::const_iterator it = constants_.find(virtual_register);
1325 DCHECK(it != constants_.end()); 1325 DCHECK(it != constants_.end());
1326 DCHECK_EQ(virtual_register, it->first); 1326 DCHECK_EQ(virtual_register, it->first);
1327 return it->second; 1327 return it->second;
1328 } 1328 }
1329 1329
1330 typedef ZoneVector<Constant> Immediates; 1330 typedef ZoneVector<Constant> Immediates;
1331 Immediates& immediates() { return immediates_; } 1331 Immediates& immediates() { return immediates_; }
1332 1332
1333 ImmediateOperand AddImmediate(const Constant& constant) { 1333 ImmediateOperand AddImmediate(const Constant& constant) {
1334 if (constant.type() == Constant::kInt32) { 1334 if (constant.type() == Constant::kInt32 &&
1335 RelocInfo::IsNone(constant.rmode())) {
1335 return ImmediateOperand(ImmediateOperand::INLINE, constant.ToInt32()); 1336 return ImmediateOperand(ImmediateOperand::INLINE, constant.ToInt32());
1336 } 1337 }
1337 int index = static_cast<int>(immediates_.size()); 1338 int index = static_cast<int>(immediates_.size());
1338 immediates_.push_back(constant); 1339 immediates_.push_back(constant);
1339 return ImmediateOperand(ImmediateOperand::INDEXED, index); 1340 return ImmediateOperand(ImmediateOperand::INDEXED, index);
1340 } 1341 }
1341 1342
1342 Constant GetImmediate(const ImmediateOperand* op) const { 1343 Constant GetImmediate(const ImmediateOperand* op) const {
1343 switch (op->type()) { 1344 switch (op->type()) {
1344 case ImmediateOperand::INLINE: 1345 case ImmediateOperand::INLINE:
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 1427
1427 1428
1428 std::ostream& operator<<(std::ostream& os, 1429 std::ostream& operator<<(std::ostream& os,
1429 const PrintableInstructionSequence& code); 1430 const PrintableInstructionSequence& code);
1430 1431
1431 } // namespace compiler 1432 } // namespace compiler
1432 } // namespace internal 1433 } // namespace internal
1433 } // namespace v8 1434 } // namespace v8
1434 1435
1435 #endif // V8_COMPILER_INSTRUCTION_H_ 1436 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698