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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2255793002: [interpreter] Add CreateWithContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add to AllBytecodesGenerated Created 4 years, 4 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 | « no previous file | src/interpreter/bytecode-array-builder.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 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/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 environment()->BindAccumulator(context); 935 environment()->BindAccumulator(context);
936 } 936 }
937 937
938 void BytecodeGraphBuilder::VisitCreateFunctionContext() { 938 void BytecodeGraphBuilder::VisitCreateFunctionContext() {
939 uint32_t slots = bytecode_iterator().GetIndexOperand(0); 939 uint32_t slots = bytecode_iterator().GetIndexOperand(0);
940 const Operator* op = javascript()->CreateFunctionContext(slots); 940 const Operator* op = javascript()->CreateFunctionContext(slots);
941 Node* context = NewNode(op, GetFunctionClosure()); 941 Node* context = NewNode(op, GetFunctionClosure());
942 environment()->BindAccumulator(context); 942 environment()->BindAccumulator(context);
943 } 943 }
944 944
945 void BytecodeGraphBuilder::VisitCreateWithContext() {
946 Node* object =
947 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
948
949 const Operator* op = javascript()->CreateWithContext();
950 Node* context = NewNode(op, object, environment()->LookupAccumulator());
951 environment()->BindAccumulator(context);
952 }
953
945 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) { 954 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) {
946 FrameStateBeforeAndAfter states(this); 955 FrameStateBeforeAndAfter states(this);
947 const Operator* op = javascript()->CreateArguments(type); 956 const Operator* op = javascript()->CreateArguments(type);
948 Node* object = NewNode(op, GetFunctionClosure()); 957 Node* object = NewNode(op, GetFunctionClosure());
949 environment()->BindAccumulator(object, &states); 958 environment()->BindAccumulator(object, &states);
950 } 959 }
951 960
952 void BytecodeGraphBuilder::VisitCreateMappedArguments() { 961 void BytecodeGraphBuilder::VisitCreateMappedArguments() {
953 BuildCreateArguments(CreateArgumentsType::kMappedArguments); 962 BuildCreateArguments(CreateArgumentsType::kMappedArguments);
954 } 963 }
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 // Phi does not exist yet, introduce one. 1904 // Phi does not exist yet, introduce one.
1896 value = NewPhi(inputs, value, control); 1905 value = NewPhi(inputs, value, control);
1897 value->ReplaceInput(inputs - 1, other); 1906 value->ReplaceInput(inputs - 1, other);
1898 } 1907 }
1899 return value; 1908 return value;
1900 } 1909 }
1901 1910
1902 } // namespace compiler 1911 } // namespace compiler
1903 } // namespace internal 1912 } // namespace internal
1904 } // namespace v8 1913 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698