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

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

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes 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/scheduler.cc ('k') | src/compiler/simplified-operator.h » ('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 22 matching lines...) Expand all
33 return graph()->NewNode(machine()->WordShl(), node, shift_amount); 33 return graph()->NewNode(machine()->WordShl(), node, shift_amount);
34 } 34 }
35 35
36 36
37 Node* SimplifiedLowering::OffsetMinusTagConstant(int32_t offset) { 37 Node* SimplifiedLowering::OffsetMinusTagConstant(int32_t offset) {
38 return jsgraph()->Int32Constant(offset - kHeapObjectTag); 38 return jsgraph()->Int32Constant(offset - kHeapObjectTag);
39 } 39 }
40 40
41 41
42 static void UpdateControlSuccessors(Node* before, Node* node) { 42 static void UpdateControlSuccessors(Node* before, Node* node) {
43 ASSERT(IrOpcode::IsControlOpcode(before->opcode())); 43 DCHECK(IrOpcode::IsControlOpcode(before->opcode()));
44 UseIter iter = before->uses().begin(); 44 UseIter iter = before->uses().begin();
45 while (iter != before->uses().end()) { 45 while (iter != before->uses().end()) {
46 if (IrOpcode::IsControlOpcode((*iter)->opcode()) && 46 if (IrOpcode::IsControlOpcode((*iter)->opcode()) &&
47 NodeProperties::IsControlEdge(iter.edge())) { 47 NodeProperties::IsControlEdge(iter.edge())) {
48 iter = iter.UpdateToAndIncrement(node); 48 iter = iter.UpdateToAndIncrement(node);
49 continue; 49 continue;
50 } 50 }
51 ++iter; 51 ++iter;
52 } 52 }
53 } 53 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 113
114 void SimplifiedLowering::DoChangeUI32ToTagged(Node* node, Node* effect, 114 void SimplifiedLowering::DoChangeUI32ToTagged(Node* node, Node* effect,
115 Node* control, bool is_signed) { 115 Node* control, bool is_signed) {
116 Node* val = node->InputAt(0); 116 Node* val = node->InputAt(0);
117 Node* is_smi = NULL; 117 Node* is_smi = NULL;
118 if (is_signed) { 118 if (is_signed) {
119 if (SmiValuesAre32Bits()) { 119 if (SmiValuesAre32Bits()) {
120 // All int32s fit in this case. 120 // All int32s fit in this case.
121 ASSERT(kPointerSize == 8); 121 DCHECK(kPointerSize == 8);
122 return node->ReplaceUses(SmiTag(val)); 122 return node->ReplaceUses(SmiTag(val));
123 } else { 123 } else {
124 // TODO(turbofan): use an Int32AddWithOverflow to tag and check here. 124 // TODO(turbofan): use an Int32AddWithOverflow to tag and check here.
125 Node* lt = graph()->NewNode(machine()->Int32LessThanOrEqual(), val, 125 Node* lt = graph()->NewNode(machine()->Int32LessThanOrEqual(), val,
126 jsgraph()->Int32Constant(Smi::kMaxValue)); 126 jsgraph()->Int32Constant(Smi::kMaxValue));
127 Node* gt = 127 Node* gt =
128 graph()->NewNode(machine()->Int32LessThanOrEqual(), 128 graph()->NewNode(machine()->Int32LessThanOrEqual(),
129 jsgraph()->Int32Constant(Smi::kMinValue), val); 129 jsgraph()->Int32Constant(Smi::kMinValue), val);
130 is_smi = graph()->NewNode(machine()->Word32And(), lt, gt); 130 is_smi = graph()->NewNode(machine()->Word32And(), lt, gt);
131 } 131 }
(...skipping 202 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/scheduler.cc ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698