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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1468003002: [Interpreter] Add support for cast operators to bytecode graph builder and (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 5bb208ce94f7e5d8a2550d24cb9d0a1f4268c29b..9015caeacebcb9aa2dcce691a3e9e93d3203f676 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1000,25 +1000,37 @@ void BytecodeGraphBuilder::VisitTestInstanceOf(
void BytecodeGraphBuilder::VisitToBoolean(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* node =
oth 2015/11/23 13:46:41 There's a common pattern here and also in VisitLog
mythria 2015/11/24 12:58:48 I added a method for cast operators. I did not inc
+ NewNode(javascript()->ToBoolean(), environment()->LookupAccumulator());
+ AddEmptyFrameStateInputs(node);
+ environment()->BindAccumulator(node);
}
void BytecodeGraphBuilder::VisitToName(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* node =
+ NewNode(javascript()->ToName(), environment()->LookupAccumulator());
+ AddEmptyFrameStateInputs(node);
+ environment()->BindAccumulator(node);
}
void BytecodeGraphBuilder::VisitToNumber(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* node =
+ NewNode(javascript()->ToNumber(), environment()->LookupAccumulator());
+ AddEmptyFrameStateInputs(node);
+ environment()->BindAccumulator(node);
}
void BytecodeGraphBuilder::VisitToObject(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* node =
+ NewNode(javascript()->ToObject(), environment()->LookupAccumulator());
+ AddEmptyFrameStateInputs(node);
+ environment()->BindAccumulator(node);
}
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698