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

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

Issue 435923002: TF: Rename ConvertXToY machine operators to ChangeXToY. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/x64/instruction-selector-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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include "src/compiler/graph-inl.h" 7 #include "src/compiler/graph-inl.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // ConvertFloat64To(Int32|Uint32)(Load[kMachineFloat64](input, #value_offset)) 59 // ConvertFloat64To(Int32|Uint32)(Load[kMachineFloat64](input, #value_offset))
60 // else Untag(val) 60 // else Untag(val)
61 Node* val = node->InputAt(0); 61 Node* val = node->InputAt(0);
62 Node* branch = graph()->NewNode(common()->Branch(), IsTagged(val), control); 62 Node* branch = graph()->NewNode(common()->Branch(), IsTagged(val), control);
63 63
64 // true branch. 64 // true branch.
65 Node* tbranch = graph()->NewNode(common()->IfTrue(), branch); 65 Node* tbranch = graph()->NewNode(common()->IfTrue(), branch);
66 Node* loaded = graph()->NewNode( 66 Node* loaded = graph()->NewNode(
67 machine()->Load(kMachineFloat64), val, 67 machine()->Load(kMachineFloat64), val,
68 OffsetMinusTagConstant(HeapNumber::kValueOffset), effect); 68 OffsetMinusTagConstant(HeapNumber::kValueOffset), effect);
69 Operator* op = is_signed ? machine()->ConvertFloat64ToInt32() 69 Operator* op = is_signed ? machine()->ChangeFloat64ToInt32()
70 : machine()->ConvertFloat64ToUint32(); 70 : machine()->ChangeFloat64ToUint32();
71 Node* converted = graph()->NewNode(op, loaded); 71 Node* converted = graph()->NewNode(op, loaded);
72 72
73 // false branch. 73 // false branch.
74 Node* fbranch = graph()->NewNode(common()->IfFalse(), branch); 74 Node* fbranch = graph()->NewNode(common()->IfFalse(), branch);
75 Node* untagged = Untag(val); 75 Node* untagged = Untag(val);
76 76
77 // merge. 77 // merge.
78 Node* merge = graph()->NewNode(common()->Merge(2), tbranch, fbranch); 78 Node* merge = graph()->NewNode(common()->Merge(2), tbranch, fbranch);
79 Node* phi = graph()->NewNode(common()->Phi(2), converted, untagged, merge); 79 Node* phi = graph()->NewNode(common()->Phi(2), converted, untagged, merge);
80 UpdateControlSuccessors(control, merge); 80 UpdateControlSuccessors(control, merge);
(...skipping 12 matching lines...) Expand all
93 // true branch. 93 // true branch.
94 Node* tbranch = graph()->NewNode(common()->IfTrue(), branch); 94 Node* tbranch = graph()->NewNode(common()->IfTrue(), branch);
95 Node* loaded = graph()->NewNode( 95 Node* loaded = graph()->NewNode(
96 machine()->Load(kMachineFloat64), val, 96 machine()->Load(kMachineFloat64), val,
97 OffsetMinusTagConstant(HeapNumber::kValueOffset), effect); 97 OffsetMinusTagConstant(HeapNumber::kValueOffset), effect);
98 98
99 // false branch. 99 // false branch.
100 Node* fbranch = graph()->NewNode(common()->IfFalse(), branch); 100 Node* fbranch = graph()->NewNode(common()->IfFalse(), branch);
101 Node* untagged = Untag(val); 101 Node* untagged = Untag(val);
102 Node* converted = 102 Node* converted =
103 graph()->NewNode(machine()->ConvertInt32ToFloat64(), untagged); 103 graph()->NewNode(machine()->ChangeInt32ToFloat64(), untagged);
104 104
105 // merge. 105 // merge.
106 Node* merge = graph()->NewNode(common()->Merge(2), tbranch, fbranch); 106 Node* merge = graph()->NewNode(common()->Merge(2), tbranch, fbranch);
107 Node* phi = graph()->NewNode(common()->Phi(2), loaded, converted, merge); 107 Node* phi = graph()->NewNode(common()->Phi(2), loaded, converted, merge);
108 UpdateControlSuccessors(control, merge); 108 UpdateControlSuccessors(control, merge);
109 branch->ReplaceInput(1, control); 109 branch->ReplaceInput(1, control);
110 node->ReplaceUses(phi); 110 node->ReplaceUses(phi);
111 } 111 }
112 112
113 113
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 DoStoreElement(node, start, start); 334 DoStoreElement(node, start, start);
335 break; 335 break;
336 default: 336 default:
337 break; 337 break;
338 } 338 }
339 } 339 }
340 340
341 } // namespace compiler 341 } // namespace compiler
342 } // namespace internal 342 } // namespace internal
343 } // namespace v8 343 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698