| OLD | NEW |
| 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/signature.h" | 5 #include "src/signature.h" |
| 6 | 6 |
| 7 #include "src/bit-vector.h" | 7 #include "src/bit-vector.h" |
| 8 #include "src/flags.h" | 8 #include "src/flags.h" |
| 9 #include "src/handles.h" | 9 #include "src/handles.h" |
| 10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
| (...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 | 1098 |
| 1099 void PushIf(SsaEnv* end_env, SsaEnv* false_env) { | 1099 void PushIf(SsaEnv* end_env, SsaEnv* false_env) { |
| 1100 int stack_depth = static_cast<int>(stack_.size()); | 1100 int stack_depth = static_cast<int>(stack_.size()); |
| 1101 control_.push_back( | 1101 control_.push_back( |
| 1102 {pc_, stack_depth, end_env, false_env, nullptr, kAstStmt, false}); | 1102 {pc_, stack_depth, end_env, false_env, nullptr, kAstStmt, false}); |
| 1103 } | 1103 } |
| 1104 | 1104 |
| 1105 int DecodeLoadMem(LocalType type, MachineType mem_type) { | 1105 int DecodeLoadMem(LocalType type, MachineType mem_type) { |
| 1106 MemoryAccessOperand operand(this, pc_); | 1106 MemoryAccessOperand operand(this, pc_); |
| 1107 Value index = Pop(0, kAstI32); | 1107 Value index = Pop(0, kAstI32); |
| 1108 TFNode* node = | 1108 TFNode* node = BUILD(LoadMem, type, mem_type, index.node, operand.offset, |
| 1109 BUILD(LoadMem, type, mem_type, index.node, operand.offset, position()); | 1109 operand.alignment, position()); |
| 1110 Push(type, node); | 1110 Push(type, node); |
| 1111 return 1 + operand.length; | 1111 return 1 + operand.length; |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 int DecodeStoreMem(LocalType type, MachineType mem_type) { | 1114 int DecodeStoreMem(LocalType type, MachineType mem_type) { |
| 1115 MemoryAccessOperand operand(this, pc_); | 1115 MemoryAccessOperand operand(this, pc_); |
| 1116 Value val = Pop(1, type); | 1116 Value val = Pop(1, type); |
| 1117 Value index = Pop(0, kAstI32); | 1117 Value index = Pop(0, kAstI32); |
| 1118 BUILD(StoreMem, mem_type, index.node, operand.offset, val.node, position()); | 1118 BUILD(StoreMem, mem_type, index.node, operand.offset, operand.alignment, |
| 1119 val.node, position()); |
| 1119 Push(type, val.node); | 1120 Push(type, val.node); |
| 1120 return 1 + operand.length; | 1121 return 1 + operand.length; |
| 1121 } | 1122 } |
| 1122 | 1123 |
| 1123 void DoReturn() { | 1124 void DoReturn() { |
| 1124 int count = static_cast<int>(sig_->return_count()); | 1125 int count = static_cast<int>(sig_->return_count()); |
| 1125 TFNode** buffer = nullptr; | 1126 TFNode** buffer = nullptr; |
| 1126 if (build()) buffer = builder_->Buffer(count); | 1127 if (build()) buffer = builder_->Buffer(count); |
| 1127 | 1128 |
| 1128 // Pop return values off the stack in reverse order. | 1129 // Pop return values off the stack in reverse order. |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1615 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 1616 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
| 1616 const byte* start, const byte* end) { | 1617 const byte* start, const byte* end) { |
| 1617 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; | 1618 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; |
| 1618 SR_WasmDecoder decoder(zone, nullptr, body); | 1619 SR_WasmDecoder decoder(zone, nullptr, body); |
| 1619 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); | 1620 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); |
| 1620 } | 1621 } |
| 1621 | 1622 |
| 1622 } // namespace wasm | 1623 } // namespace wasm |
| 1623 } // namespace internal | 1624 } // namespace internal |
| 1624 } // namespace v8 | 1625 } // namespace v8 |
| OLD | NEW |