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

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

Issue 2260473003: [interpreter] Add CreateCatchContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: group context bytecodes 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::VisitCreateCatchContext() {
946 interpreter::Register reg = bytecode_iterator().GetRegisterOperand(0);
947 Node* exception = environment()->LookupRegister(reg);
948 Handle<String> name =
949 Handle<String>::cast(bytecode_iterator().GetConstantForIndexOperand(1));
950 Node* closure = environment()->LookupAccumulator();
951
952 const Operator* op = javascript()->CreateCatchContext(name);
953 Node* context = NewNode(op, exception, closure);
954 environment()->BindAccumulator(context);
955 }
956
945 void BytecodeGraphBuilder::VisitCreateWithContext() { 957 void BytecodeGraphBuilder::VisitCreateWithContext() {
946 Node* object = 958 Node* object =
947 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); 959 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
948 960
949 const Operator* op = javascript()->CreateWithContext(); 961 const Operator* op = javascript()->CreateWithContext();
950 Node* context = NewNode(op, object, environment()->LookupAccumulator()); 962 Node* context = NewNode(op, object, environment()->LookupAccumulator());
951 environment()->BindAccumulator(context); 963 environment()->BindAccumulator(context);
952 } 964 }
953 965
954 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) { 966 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) {
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 // Phi does not exist yet, introduce one. 1916 // Phi does not exist yet, introduce one.
1905 value = NewPhi(inputs, value, control); 1917 value = NewPhi(inputs, value, control);
1906 value->ReplaceInput(inputs - 1, other); 1918 value->ReplaceInput(inputs - 1, other);
1907 } 1919 }
1908 return value; 1920 return value;
1909 } 1921 }
1910 1922
1911 } // namespace compiler 1923 } // namespace compiler
1912 } // namespace internal 1924 } // namespace internal
1913 } // namespace v8 1925 } // 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