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

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: rebase 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') | src/interpreter/interpreter.cc » ('J')
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::BuildCreateArguments(CreateArgumentsType type) { 957 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) {
946 FrameStateBeforeAndAfter states(this); 958 FrameStateBeforeAndAfter states(this);
947 const Operator* op = javascript()->CreateArguments(type); 959 const Operator* op = javascript()->CreateArguments(type);
948 Node* object = NewNode(op, GetFunctionClosure()); 960 Node* object = NewNode(op, GetFunctionClosure());
949 environment()->BindAccumulator(object, &states); 961 environment()->BindAccumulator(object, &states);
950 } 962 }
951 963
952 void BytecodeGraphBuilder::VisitCreateMappedArguments() { 964 void BytecodeGraphBuilder::VisitCreateMappedArguments() {
953 BuildCreateArguments(CreateArgumentsType::kMappedArguments); 965 BuildCreateArguments(CreateArgumentsType::kMappedArguments);
954 } 966 }
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 // Phi does not exist yet, introduce one. 1907 // Phi does not exist yet, introduce one.
1896 value = NewPhi(inputs, value, control); 1908 value = NewPhi(inputs, value, control);
1897 value->ReplaceInput(inputs - 1, other); 1909 value->ReplaceInput(inputs - 1, other);
1898 } 1910 }
1899 return value; 1911 return value;
1900 } 1912 }
1901 1913
1902 } // namespace compiler 1914 } // namespace compiler
1903 } // namespace internal 1915 } // namespace internal
1904 } // namespace v8 1916 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/interpreter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698