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

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

Issue 1151853003: [strong] create strong array literals Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a test Created 5 years, 7 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 | « src/builtins.cc ('k') | src/compiler/js-typed-lowering.cc » ('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 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 2924 matching lines...) Expand 10 before | Expand all | Expand 10 after
2935 BailoutId::None()); 2935 BailoutId::None());
2936 2936
2937 return object; 2937 return object;
2938 } 2938 }
2939 2939
2940 2940
2941 Node* AstGraphBuilder::BuildRestArgumentsArray(Variable* rest, int index) { 2941 Node* AstGraphBuilder::BuildRestArgumentsArray(Variable* rest, int index) {
2942 if (rest == NULL) return NULL; 2942 if (rest == NULL) return NULL;
2943 2943
2944 DCHECK(index >= 0); 2944 DCHECK(index >= 0);
2945 const Operator* op = javascript()->CallRuntime(Runtime::kNewRestParamSlow, 1); 2945 const Operator* op = javascript()->CallRuntime(Runtime::kNewRestParamSlow, 2);
2946 Node* object = NewNode(op, jsgraph()->SmiConstant(index)); 2946 Node* object = NewNode(op, jsgraph()->SmiConstant(index),
2947 jsgraph()->SmiConstant(language_mode()));
2947 2948
2948 // Assign the object to the rest array 2949 // Assign the object to the rest array
2949 DCHECK(rest->IsContextSlot() || rest->IsStackAllocated()); 2950 DCHECK(rest->IsContextSlot() || rest->IsStackAllocated());
2950 // This should never lazy deopt, so it is fine to send invalid bailout id. 2951 // This should never lazy deopt, so it is fine to send invalid bailout id.
2951 FrameStateBeforeAndAfter states(this, BailoutId::None()); 2952 FrameStateBeforeAndAfter states(this, BailoutId::None());
2952 BuildVariableAssignment(states, rest, object, Token::ASSIGN, 2953 BuildVariableAssignment(states, rest, object, Token::ASSIGN,
2953 BailoutId::None()); 2954 BailoutId::None());
2954 2955
2955 return object; 2956 return object;
2956 } 2957 }
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
3778 // Phi does not exist yet, introduce one. 3779 // Phi does not exist yet, introduce one.
3779 value = NewPhi(inputs, value, control); 3780 value = NewPhi(inputs, value, control);
3780 value->ReplaceInput(inputs - 1, other); 3781 value->ReplaceInput(inputs - 1, other);
3781 } 3782 }
3782 return value; 3783 return value;
3783 } 3784 }
3784 3785
3785 } // namespace compiler 3786 } // namespace compiler
3786 } // namespace internal 3787 } // namespace internal
3787 } // namespace v8 3788 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698