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

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

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/instruction.h ('k') | src/compiler/x64/code-generator-x64.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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/instruction.h" 7 #include "src/compiler/instruction.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/compiler/state-values-utils.h" 9 #include "src/compiler/state-values-utils.h"
10 10
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 printable_op.op_ = *instr.InputAt(i); 497 printable_op.op_ = *instr.InputAt(i);
498 os << " " << printable_op; 498 os << " " << printable_op;
499 } 499 }
500 } 500 }
501 return os; 501 return os;
502 } 502 }
503 503
504 504
505 Constant::Constant(int32_t v) : type_(kInt32), value_(v) {} 505 Constant::Constant(int32_t v) : type_(kInt32), value_(v) {}
506 506
507 Constant::Constant(RelocatablePtrConstantInfo info) 507 Constant::Constant(RelocatablePtrConstantInfo info) {
508 #ifdef V8_HOST_ARCH_32_BIT 508 if (info.type() == RelocatablePtrConstantInfo::kInt32) {
509 : type_(kInt32), value_(info.value()), rmode_(info.rmode()) { 509 type_ = kInt32;
510 } else if (info.type() == RelocatablePtrConstantInfo::kInt64) {
511 type_ = kInt64;
512 } else {
513 UNREACHABLE();
514 }
515 value_ = info.value();
516 rmode_ = info.rmode();
510 } 517 }
511 #else
512 : type_(kInt64), value_(info.value()), rmode_(info.rmode()) {
513 }
514 #endif
515 518
516 Handle<HeapObject> Constant::ToHeapObject() const { 519 Handle<HeapObject> Constant::ToHeapObject() const {
517 DCHECK_EQ(kHeapObject, type()); 520 DCHECK_EQ(kHeapObject, type());
518 Handle<HeapObject> value( 521 Handle<HeapObject> value(
519 bit_cast<HeapObject**>(static_cast<intptr_t>(value_))); 522 bit_cast<HeapObject**>(static_cast<intptr_t>(value_)));
520 if (value->IsConsString()) { 523 if (value->IsConsString()) {
521 value = String::Flatten(Handle<String>::cast(value), TENURED); 524 value = String::Flatten(Handle<String>::cast(value), TENURED);
522 } 525 }
523 return value; 526 return value;
524 } 527 }
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 } 1026 }
1024 for (int i = 0; i < code.InstructionBlockCount(); i++) { 1027 for (int i = 0; i < code.InstructionBlockCount(); i++) {
1025 printable.sequence_->PrintBlock(printable.register_configuration_, i); 1028 printable.sequence_->PrintBlock(printable.register_configuration_, i);
1026 } 1029 }
1027 return os; 1030 return os;
1028 } 1031 }
1029 1032
1030 } // namespace compiler 1033 } // namespace compiler
1031 } // namespace internal 1034 } // namespace internal
1032 } // namespace v8 1035 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698