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

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

Issue 642883003: [turbofan] Add support for deferred code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add cctest Created 6 years, 2 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') | test/cctest/compiler/test-scheduler.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 <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 node->RemoveInput(2); 1020 node->RemoveInput(2);
1021 } else { 1021 } else {
1022 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check); 1022 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check);
1023 1023
1024 Node* base = node->InputAt(0); 1024 Node* base = node->InputAt(0);
1025 Node* length = node->InputAt(2); 1025 Node* length = node->InputAt(2);
1026 Node* effect = node->InputAt(3); 1026 Node* effect = node->InputAt(3);
1027 Node* control = node->InputAt(4); 1027 Node* control = node->InputAt(4);
1028 1028
1029 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length); 1029 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length);
1030 Node* branch = graph()->NewNode(common()->Branch(), check, control); 1030 Node* branch =
1031 graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control);
1031 1032
1032 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); 1033 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
1033 Node* load = graph()->NewNode(op, base, index, effect, if_true); 1034 Node* load = graph()->NewNode(op, base, index, effect, if_true);
1034 Node* result = load; 1035 Node* result = load;
1035 if (output_type & kRepTagged) { 1036 if (output_type & kRepTagged) {
1036 // TODO(turbofan): This is ugly as hell! 1037 // TODO(turbofan): This is ugly as hell!
1037 SimplifiedOperatorBuilder simplified(graph()->zone()); 1038 SimplifiedOperatorBuilder simplified(graph()->zone());
1038 RepresentationChanger changer(jsgraph(), &simplified, 1039 RepresentationChanger changer(jsgraph(), &simplified,
1039 graph()->zone()->isolate()); 1040 graph()->zone()->isolate());
1040 result = changer.GetTaggedRepresentationFor(result, access.machine_type); 1041 result = changer.GetTaggedRepresentationFor(result, access.machine_type);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 } else { 1092 } else {
1092 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check); 1093 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check);
1093 1094
1094 Node* base = node->InputAt(0); 1095 Node* base = node->InputAt(0);
1095 Node* length = node->InputAt(2); 1096 Node* length = node->InputAt(2);
1096 Node* value = node->InputAt(3); 1097 Node* value = node->InputAt(3);
1097 Node* effect = node->InputAt(4); 1098 Node* effect = node->InputAt(4);
1098 Node* control = node->InputAt(5); 1099 Node* control = node->InputAt(5);
1099 1100
1100 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length); 1101 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length);
1101 Node* branch = graph()->NewNode(common()->Branch(), check, control); 1102 Node* branch =
1103 graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control);
1102 1104
1103 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); 1105 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
1104 Node* store = graph()->NewNode(op, base, index, value, effect, if_true); 1106 Node* store = graph()->NewNode(op, base, index, value, effect, if_true);
1105 1107
1106 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); 1108 Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
1107 1109
1108 Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false); 1110 Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
1109 1111
1110 node->set_op(common()->EffectPhi(2)); 1112 node->set_op(common()->EffectPhi(2));
1111 node->ReplaceInput(0, store); 1113 node->ReplaceInput(0, store);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1168 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1167 node->set_op(machine()->IntLessThanOrEqual()); 1169 node->set_op(machine()->IntLessThanOrEqual());
1168 node->ReplaceInput(0, StringComparison(node, true)); 1170 node->ReplaceInput(0, StringComparison(node, true));
1169 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1171 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1170 } 1172 }
1171 1173
1172 1174
1173 } // namespace compiler 1175 } // namespace compiler
1174 } // namespace internal 1176 } // namespace internal
1175 } // namespace v8 1177 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/scheduler.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698