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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1123213002: [turbofan] Connect non-terminating loops via Terminate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « src/compiler/instruction-selector.cc ('k') | src/compiler/opcodes.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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 20 matching lines...) Expand all
31 Lower##x(node); \ 31 Lower##x(node); \
32 break; 32 break;
33 JS_OP_LIST(DECLARE_CASE) 33 JS_OP_LIST(DECLARE_CASE)
34 #undef DECLARE_CASE 34 #undef DECLARE_CASE
35 case IrOpcode::kBranch: 35 case IrOpcode::kBranch:
36 // TODO(mstarzinger): If typing is enabled then simplified lowering will 36 // TODO(mstarzinger): If typing is enabled then simplified lowering will
37 // have inserted the correct ChangeBoolToBit, otherwise we need to perform 37 // have inserted the correct ChangeBoolToBit, otherwise we need to perform
38 // poor-man's representation inference here and insert manual change. 38 // poor-man's representation inference here and insert manual change.
39 if (!is_typing_enabled_) { 39 if (!is_typing_enabled_) {
40 Node* condition = node->InputAt(0); 40 Node* condition = node->InputAt(0);
41 if (condition->opcode() != IrOpcode::kAlways) { 41 Node* test = graph()->NewNode(machine()->WordEqual(), condition,
42 Node* test = graph()->NewNode(machine()->WordEqual(), condition, 42 jsgraph()->TrueConstant());
43 jsgraph()->TrueConstant()); 43 node->ReplaceInput(0, test);
44 node->ReplaceInput(0, test);
45 }
46 break; 44 break;
47 } 45 }
48 // Fall-through. 46 // Fall-through.
49 default: 47 default:
50 // Nothing to see. 48 // Nothing to see.
51 return NoChange(); 49 return NoChange();
52 } 50 }
53 return Changed(node); 51 return Changed(node);
54 } 52 }
55 53
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 } 570 }
573 571
574 572
575 MachineOperatorBuilder* JSGenericLowering::machine() const { 573 MachineOperatorBuilder* JSGenericLowering::machine() const {
576 return jsgraph()->machine(); 574 return jsgraph()->machine();
577 } 575 }
578 576
579 } // namespace compiler 577 } // namespace compiler
580 } // namespace internal 578 } // namespace internal
581 } // namespace v8 579 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698