| 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/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
| (...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2944 BailoutId::None()); | 2944 BailoutId::None()); |
| 2945 | 2945 |
| 2946 return object; | 2946 return object; |
| 2947 } | 2947 } |
| 2948 | 2948 |
| 2949 | 2949 |
| 2950 Node* AstGraphBuilder::BuildRestArgumentsArray(Variable* rest, int index) { | 2950 Node* AstGraphBuilder::BuildRestArgumentsArray(Variable* rest, int index) { |
| 2951 if (rest == NULL) return NULL; | 2951 if (rest == NULL) return NULL; |
| 2952 | 2952 |
| 2953 DCHECK(index >= 0); | 2953 DCHECK(index >= 0); |
| 2954 const Operator* op = javascript()->CallRuntime(Runtime::kNewRestParamSlow, 1); | 2954 const Operator* op = javascript()->CallRuntime(Runtime::kNewRestParamSlow, 2); |
| 2955 Node* object = NewNode(op, jsgraph()->SmiConstant(index)); | 2955 Node* object = NewNode(op, jsgraph()->SmiConstant(index), |
| 2956 jsgraph()->SmiConstant(language_mode())); |
| 2956 | 2957 |
| 2957 // Assign the object to the rest array | 2958 // Assign the object to the rest array |
| 2958 DCHECK(rest->IsContextSlot() || rest->IsStackAllocated()); | 2959 DCHECK(rest->IsContextSlot() || rest->IsStackAllocated()); |
| 2959 // This should never lazy deopt, so it is fine to send invalid bailout id. | 2960 // This should never lazy deopt, so it is fine to send invalid bailout id. |
| 2960 FrameStateBeforeAndAfter states(this, BailoutId::None()); | 2961 FrameStateBeforeAndAfter states(this, BailoutId::None()); |
| 2961 BuildVariableAssignment(states, rest, object, Token::ASSIGN, | 2962 BuildVariableAssignment(states, rest, object, Token::ASSIGN, |
| 2962 BailoutId::None()); | 2963 BailoutId::None()); |
| 2963 | 2964 |
| 2964 return object; | 2965 return object; |
| 2965 } | 2966 } |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3795 // Phi does not exist yet, introduce one. | 3796 // Phi does not exist yet, introduce one. |
| 3796 value = NewPhi(inputs, value, control); | 3797 value = NewPhi(inputs, value, control); |
| 3797 value->ReplaceInput(inputs - 1, other); | 3798 value->ReplaceInput(inputs - 1, other); |
| 3798 } | 3799 } |
| 3799 return value; | 3800 return value; |
| 3800 } | 3801 } |
| 3801 | 3802 |
| 3802 } // namespace compiler | 3803 } // namespace compiler |
| 3803 } // namespace internal | 3804 } // namespace internal |
| 3804 } // namespace v8 | 3805 } // namespace v8 |
| OLD | NEW |