OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3248 } | 3248 } |
3249 | 3249 |
3250 | 3250 |
3251 Node* AstGraphBuilder::BuildNewTargetVariable(Variable* new_target_var) { | 3251 Node* AstGraphBuilder::BuildNewTargetVariable(Variable* new_target_var) { |
3252 if (new_target_var == nullptr) return nullptr; | 3252 if (new_target_var == nullptr) return nullptr; |
3253 | 3253 |
3254 // Retrieve the original constructor in case we are called as a constructor. | 3254 // Retrieve the original constructor in case we are called as a constructor. |
3255 const Operator* op = | 3255 const Operator* op = |
3256 javascript()->CallRuntime(Runtime::kGetOriginalConstructor, 0); | 3256 javascript()->CallRuntime(Runtime::kGetOriginalConstructor, 0); |
3257 Node* object = NewNode(op); | 3257 Node* object = NewNode(op); |
| 3258 PrepareFrameState(object, BailoutId::None()); |
3258 | 3259 |
3259 // Assign the object to the {new.target} variable. This should never lazy | 3260 // Assign the object to the {new.target} variable. This should never lazy |
3260 // deopt, so it is fine to send invalid bailout id. | 3261 // deopt, so it is fine to send invalid bailout id. |
3261 FrameStateBeforeAndAfter states(this, BailoutId::None()); | 3262 FrameStateBeforeAndAfter states(this, BailoutId::None()); |
3262 BuildVariableAssignment(new_target_var, object, Token::INIT_CONST, | 3263 BuildVariableAssignment(new_target_var, object, Token::INIT_CONST, |
3263 VectorSlotPair(), BailoutId::None(), states); | 3264 VectorSlotPair(), BailoutId::None(), states); |
3264 return object; | 3265 return object; |
3265 } | 3266 } |
3266 | 3267 |
3267 | 3268 |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4360 // Phi does not exist yet, introduce one. | 4361 // Phi does not exist yet, introduce one. |
4361 value = NewPhi(inputs, value, control); | 4362 value = NewPhi(inputs, value, control); |
4362 value->ReplaceInput(inputs - 1, other); | 4363 value->ReplaceInput(inputs - 1, other); |
4363 } | 4364 } |
4364 return value; | 4365 return value; |
4365 } | 4366 } |
4366 | 4367 |
4367 } // namespace compiler | 4368 } // namespace compiler |
4368 } // namespace internal | 4369 } // namespace internal |
4369 } // namespace v8 | 4370 } // namespace v8 |
OLD | NEW |