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

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

Issue 2169813002: [interpreter] Add output register to ToName (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@addregouts
Patch Set: comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
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 9ff111722063c8d9c50eddcc73b0ed2ac008abe9..676c74baa40fe93347d7fea24914c825d994cfef 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1304,18 +1304,19 @@ void BytecodeGraphBuilder::VisitTestInstanceOf() {
BuildCompareOp(javascript()->InstanceOf());
}
-void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) {
- FrameStateBeforeAndAfter states(this);
- Node* node = NewNode(js_op, environment()->LookupAccumulator());
- environment()->BindAccumulator(node, &states);
-}
-
void BytecodeGraphBuilder::VisitToName() {
- BuildCastOperator(javascript()->ToName());
+ FrameStateBeforeAndAfter states(this);
+ Node* value =
+ NewNode(javascript()->ToName(), environment()->LookupAccumulator());
+ environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value,
+ &states);
}
void BytecodeGraphBuilder::VisitToObject() {
- BuildCastOperator(javascript()->ToObject());
+ FrameStateBeforeAndAfter states(this);
+ Node* node =
+ NewNode(javascript()->ToObject(), environment()->LookupAccumulator());
+ environment()->BindAccumulator(node, &states);
}
void BytecodeGraphBuilder::VisitToNumber() {
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698