| OLD | NEW |
| 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/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 | 1088 |
| 1089 void BytecodeGraphBuilder::VisitPopContext() { | 1089 void BytecodeGraphBuilder::VisitPopContext() { |
| 1090 Node* context = | 1090 Node* context = |
| 1091 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 1091 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 1092 environment()->SetContext(context); | 1092 environment()->SetContext(context); |
| 1093 } | 1093 } |
| 1094 | 1094 |
| 1095 void BytecodeGraphBuilder::VisitCreateClosure() { | 1095 void BytecodeGraphBuilder::VisitCreateClosure() { |
| 1096 Handle<SharedFunctionInfo> shared_info = Handle<SharedFunctionInfo>::cast( | 1096 Handle<SharedFunctionInfo> shared_info = Handle<SharedFunctionInfo>::cast( |
| 1097 bytecode_iterator().GetConstantForIndexOperand(0)); | 1097 bytecode_iterator().GetConstantForIndexOperand(0)); |
| 1098 int const slot_id = bytecode_iterator().GetIndexOperand(1); |
| 1099 VectorSlotPair pair = CreateVectorSlotPair(slot_id); |
| 1098 PretenureFlag tenured = | 1100 PretenureFlag tenured = |
| 1099 interpreter::CreateClosureFlags::PretenuredBit::decode( | 1101 interpreter::CreateClosureFlags::PretenuredBit::decode( |
| 1100 bytecode_iterator().GetFlagOperand(1)) | 1102 bytecode_iterator().GetFlagOperand(2)) |
| 1101 ? TENURED | 1103 ? TENURED |
| 1102 : NOT_TENURED; | 1104 : NOT_TENURED; |
| 1103 const Operator* op = javascript()->CreateClosure(shared_info, tenured); | 1105 const Operator* op = javascript()->CreateClosure(shared_info, pair, tenured); |
| 1104 Node* closure = NewNode(op); | 1106 Node* closure = NewNode(op); |
| 1105 environment()->BindAccumulator(closure); | 1107 environment()->BindAccumulator(closure); |
| 1106 } | 1108 } |
| 1107 | 1109 |
| 1108 void BytecodeGraphBuilder::VisitCreateBlockContext() { | 1110 void BytecodeGraphBuilder::VisitCreateBlockContext() { |
| 1109 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast( | 1111 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast( |
| 1110 bytecode_iterator().GetConstantForIndexOperand(0)); | 1112 bytecode_iterator().GetConstantForIndexOperand(0)); |
| 1111 | 1113 |
| 1112 const Operator* op = javascript()->CreateBlockContext(scope_info); | 1114 const Operator* op = javascript()->CreateBlockContext(scope_info); |
| 1113 Node* context = NewNode(op, environment()->LookupAccumulator()); | 1115 Node* context = NewNode(op, environment()->LookupAccumulator()); |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2268 it->source_position().ScriptOffset(), start_position_.InliningId())); |
| 2267 it->Advance(); | 2269 it->Advance(); |
| 2268 } else { | 2270 } else { |
| 2269 DCHECK_GT(it->code_offset(), offset); | 2271 DCHECK_GT(it->code_offset(), offset); |
| 2270 } | 2272 } |
| 2271 } | 2273 } |
| 2272 | 2274 |
| 2273 } // namespace compiler | 2275 } // namespace compiler |
| 2274 } // namespace internal | 2276 } // namespace internal |
| 2275 } // namespace v8 | 2277 } // namespace v8 |
| OLD | NEW |