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

Side by Side Diff: src/compiler/int64-lowering.cc

Issue 1770333002: [wasm] Use MachineOperatorBuilder::word() instead of kPointerSize to determine the word size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use Is32 instead of word() == MachineRepresentation::kWord32 Created 4 years, 9 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-compiler.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/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 14 matching lines...) Expand all
25 machine_(machine), 25 machine_(machine),
26 common_(common), 26 common_(common),
27 state_(graph, 4), 27 state_(graph, 4),
28 stack_(zone), 28 stack_(zone),
29 replacements_(zone->NewArray<Replacement>(graph->NodeCount())), 29 replacements_(zone->NewArray<Replacement>(graph->NodeCount())),
30 signature_(signature) { 30 signature_(signature) {
31 memset(replacements_, 0, sizeof(Replacement) * graph->NodeCount()); 31 memset(replacements_, 0, sizeof(Replacement) * graph->NodeCount());
32 } 32 }
33 33
34 void Int64Lowering::LowerGraph() { 34 void Int64Lowering::LowerGraph() {
35 if (4 != kPointerSize) { 35 if (!machine()->Is32()) {
36 return; 36 return;
37 } 37 }
38 stack_.push(graph()->end()); 38 stack_.push(graph()->end());
39 state_.Set(graph()->end(), State::kOnStack); 39 state_.Set(graph()->end(), State::kOnStack);
40 40
41 while (!stack_.empty()) { 41 while (!stack_.empty()) {
42 Node* top = stack_.top(); 42 Node* top = stack_.top();
43 if (state_.Get(top) == State::kInputsPushed) { 43 if (state_.Get(top) == State::kInputsPushed) {
44 stack_.pop(); 44 stack_.pop();
45 state_.Set(top, State::kVisited); 45 state_.Set(top, State::kVisited);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 Node* Int64Lowering::GetReplacementHigh(Node* node) { 437 Node* Int64Lowering::GetReplacementHigh(Node* node) {
438 Node* result = replacements_[node->id()].high; 438 Node* result = replacements_[node->id()].high;
439 DCHECK(result); 439 DCHECK(result);
440 return result; 440 return result;
441 } 441 }
442 } // namespace compiler 442 } // namespace compiler
443 } // namespace internal 443 } // namespace internal
444 } // namespace v8 444 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698