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

Side by Side Diff: src/hydrogen.cc

Issue 1125183008: [es6] Spread in array literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup 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/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 5843 matching lines...) Expand 10 before | Expand all | Expand 10 after
5854 // The array is expected in the bailout environment during computation 5854 // The array is expected in the bailout environment during computation
5855 // of the property values and is the value of the entire expression. 5855 // of the property values and is the value of the entire expression.
5856 Push(literal); 5856 Push(literal);
5857 // The literal index is on the stack, too. 5857 // The literal index is on the stack, too.
5858 Push(Add<HConstant>(expr->literal_index())); 5858 Push(Add<HConstant>(expr->literal_index()));
5859 5859
5860 HInstruction* elements = NULL; 5860 HInstruction* elements = NULL;
5861 5861
5862 for (int i = 0; i < length; i++) { 5862 for (int i = 0; i < length; i++) {
5863 Expression* subexpr = subexprs->at(i); 5863 Expression* subexpr = subexprs->at(i);
5864 if (subexpr->IsSpread()) {
5865 return Bailout(kSpread);
5866 }
5867
5864 // If the subexpression is a literal or a simple materialized literal it 5868 // If the subexpression is a literal or a simple materialized literal it
5865 // is already set in the cloned array. 5869 // is already set in the cloned array.
5866 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 5870 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
5867 5871
5868 CHECK_ALIVE(VisitForValue(subexpr)); 5872 CHECK_ALIVE(VisitForValue(subexpr));
5869 HValue* value = Pop(); 5873 HValue* value = Pop();
5870 if (!Smi::IsValid(i)) return Bailout(kNonSmiKeyInArrayLiteral); 5874 if (!Smi::IsValid(i)) return Bailout(kNonSmiKeyInArrayLiteral);
5871 5875
5872 elements = AddLoadElements(literal); 5876 elements = AddLoadElements(literal);
5873 5877
(...skipping 7256 matching lines...) Expand 10 before | Expand all | Expand 10 after
13130 if (ShouldProduceTraceOutput()) { 13134 if (ShouldProduceTraceOutput()) {
13131 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13135 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13132 } 13136 }
13133 13137
13134 #ifdef DEBUG 13138 #ifdef DEBUG
13135 graph_->Verify(false); // No full verify. 13139 graph_->Verify(false); // No full verify.
13136 #endif 13140 #endif
13137 } 13141 }
13138 13142
13139 } } // namespace v8::internal 13143 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698