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/bytecode-graph-builder.cc

Issue 1507683005: [Interpreter] Removes ToBoolean bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased the patch. 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 #include "src/interpreter/bytecode-array-iterator.h" 9 #include "src/interpreter/bytecode-array-iterator.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 1085
1086 1086
1087 void BytecodeGraphBuilder::BuildCastOperator( 1087 void BytecodeGraphBuilder::BuildCastOperator(
1088 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) { 1088 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) {
1089 Node* node = NewNode(js_op, environment()->LookupAccumulator()); 1089 Node* node = NewNode(js_op, environment()->LookupAccumulator());
1090 AddEmptyFrameStateInputs(node); 1090 AddEmptyFrameStateInputs(node);
1091 environment()->BindAccumulator(node); 1091 environment()->BindAccumulator(node);
1092 } 1092 }
1093 1093
1094 1094
1095 void BytecodeGraphBuilder::VisitToBoolean(
1096 const interpreter::BytecodeArrayIterator& iterator) {
1097 BuildCastOperator(javascript()->ToBoolean(ToBooleanHint::kAny), iterator);
1098 }
1099
1100
1101 void BytecodeGraphBuilder::VisitToName( 1095 void BytecodeGraphBuilder::VisitToName(
1102 const interpreter::BytecodeArrayIterator& iterator) { 1096 const interpreter::BytecodeArrayIterator& iterator) {
1103 BuildCastOperator(javascript()->ToName(), iterator); 1097 BuildCastOperator(javascript()->ToName(), iterator);
1104 } 1098 }
1105 1099
1106 1100
1107 void BytecodeGraphBuilder::VisitToNumber( 1101 void BytecodeGraphBuilder::VisitToNumber(
1108 const interpreter::BytecodeArrayIterator& iterator) { 1102 const interpreter::BytecodeArrayIterator& iterator) {
1109 BuildCastOperator(javascript()->ToNumber(), iterator); 1103 BuildCastOperator(javascript()->ToNumber(), iterator);
1110 } 1104 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1316
1323 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 1317 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
1324 if (environment()->IsMarkedAsUnreachable()) return; 1318 if (environment()->IsMarkedAsUnreachable()) return;
1325 environment()->MarkAsUnreachable(); 1319 environment()->MarkAsUnreachable();
1326 exit_controls_.push_back(exit); 1320 exit_controls_.push_back(exit);
1327 } 1321 }
1328 1322
1329 } // namespace compiler 1323 } // namespace compiler
1330 } // namespace internal 1324 } // namespace internal
1331 } // namespace v8 1325 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698