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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1592713002: Clean up dead code after spread desugaring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug that visited dead AST node in for/of Created 4 years, 11 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/contexts.cc ('k') | src/crankshaft/typing.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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 6051 matching lines...) Expand 10 before | Expand all | Expand 10 after
6062 } 6062 }
6063 6063
6064 // The array is expected in the bailout environment during computation 6064 // The array is expected in the bailout environment during computation
6065 // of the property values and is the value of the entire expression. 6065 // of the property values and is the value of the entire expression.
6066 Push(literal); 6066 Push(literal);
6067 6067
6068 HInstruction* elements = NULL; 6068 HInstruction* elements = NULL;
6069 6069
6070 for (int i = 0; i < length; i++) { 6070 for (int i = 0; i < length; i++) {
6071 Expression* subexpr = subexprs->at(i); 6071 Expression* subexpr = subexprs->at(i);
6072 if (subexpr->IsSpread()) { 6072 DCHECK(!subexpr->IsSpread());
6073 return Bailout(kSpread);
6074 }
6075 6073
6076 // If the subexpression is a literal or a simple materialized literal it 6074 // If the subexpression is a literal or a simple materialized literal it
6077 // is already set in the cloned array. 6075 // is already set in the cloned array.
6078 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 6076 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
6079 6077
6080 CHECK_ALIVE(VisitForValue(subexpr)); 6078 CHECK_ALIVE(VisitForValue(subexpr));
6081 HValue* value = Pop(); 6079 HValue* value = Pop();
6082 if (!Smi::IsValid(i)) return Bailout(kNonSmiKeyInArrayLiteral); 6080 if (!Smi::IsValid(i)) return Bailout(kNonSmiKeyInArrayLiteral);
6083 6081
6084 elements = AddLoadElements(literal); 6082 elements = AddLoadElements(literal);
(...skipping 7505 matching lines...) Expand 10 before | Expand all | Expand 10 after
13590 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13588 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13591 } 13589 }
13592 13590
13593 #ifdef DEBUG 13591 #ifdef DEBUG
13594 graph_->Verify(false); // No full verify. 13592 graph_->Verify(false); // No full verify.
13595 #endif 13593 #endif
13596 } 13594 }
13597 13595
13598 } // namespace internal 13596 } // namespace internal
13599 } // namespace v8 13597 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698