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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/basic-block-instrumentor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index e59323eff05e894a15737151dbeebda4ffc8e6cf..2e594c21c7cc98f5040089af7319ffe30654fcd6 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -3015,7 +3015,7 @@ void AstGraphBuilder::VisitNot(UnaryOperation* expr) {
VisitForValue(expr->expression());
Node* operand = environment()->Pop();
Node* input = BuildToBoolean(operand, expr->expression()->test_id());
- Node* value = NewNode(common()->Select(kMachAnyTagged), input,
+ Node* value = NewNode(common()->Select(MachineRepresentation::kTagged), input,
jsgraph()->FalseConstant(), jsgraph()->TrueConstant());
ast_context()->ProduceValue(value);
}
@@ -3257,8 +3257,9 @@ Node* AstGraphBuilder::BuildHoleCheckSilent(Node* value, Node* for_hole,
Node* not_hole) {
Node* the_hole = jsgraph()->TheHoleConstant();
Node* check = NewNode(javascript()->StrictEqual(), value, the_hole);
- return NewNode(common()->Select(kMachAnyTagged, BranchHint::kFalse), check,
- for_hole, not_hole);
+ return NewNode(
+ common()->Select(MachineRepresentation::kTagged, BranchHint::kFalse),
+ check, for_hole, not_hole);
}
@@ -3653,13 +3654,14 @@ Node* AstGraphBuilder::BuildGlobalStore(Handle<Name> name, Node* value,
Node* AstGraphBuilder::BuildLoadObjectField(Node* object, int offset) {
- return NewNode(jsgraph()->machine()->Load(kMachAnyTagged), object,
+ return NewNode(jsgraph()->machine()->Load(MachineType::AnyTagged()), object,
jsgraph()->IntPtrConstant(offset - kHeapObjectTag));
}
Node* AstGraphBuilder::BuildLoadImmutableObjectField(Node* object, int offset) {
- return graph()->NewNode(jsgraph()->machine()->Load(kMachAnyTagged), object,
+ return graph()->NewNode(jsgraph()->machine()->Load(MachineType::AnyTagged()),
+ object,
jsgraph()->IntPtrConstant(offset - kHeapObjectTag),
graph()->start(), graph()->start());
}
@@ -4264,7 +4266,7 @@ void AstGraphBuilder::Environment::PrepareForLoop(BitVector* assigned,
Node* AstGraphBuilder::NewPhi(int count, Node* input, Node* control) {
- const Operator* phi_op = common()->Phi(kMachAnyTagged, count);
+ const Operator* phi_op = common()->Phi(MachineRepresentation::kTagged, count);
Node** buffer = EnsureInputBufferSize(count + 1);
MemsetPointer(buffer, input, count);
buffer[count] = control;
@@ -4326,7 +4328,8 @@ Node* AstGraphBuilder::MergeValue(Node* value, Node* other, Node* control) {
NodeProperties::GetControlInput(value) == control) {
// Phi already exists, add input.
value->InsertInput(graph_zone(), inputs - 1, other);
- NodeProperties::ChangeOp(value, common()->Phi(kMachAnyTagged, inputs));
+ NodeProperties::ChangeOp(
+ value, common()->Phi(MachineRepresentation::kTagged, inputs));
} else if (value != other) {
// Phi does not exist yet, introduce one.
value = NewPhi(inputs, value, control);
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/basic-block-instrumentor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698