OLD | NEW |
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/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
(...skipping 5971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5982 } else { | 5982 } else { |
5983 return ast_context()->ReturnValue(Pop()); | 5983 return ast_context()->ReturnValue(Pop()); |
5984 } | 5984 } |
5985 } | 5985 } |
5986 | 5986 |
5987 | 5987 |
5988 void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { | 5988 void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
5989 DCHECK(!HasStackOverflow()); | 5989 DCHECK(!HasStackOverflow()); |
5990 DCHECK(current_block() != NULL); | 5990 DCHECK(current_block() != NULL); |
5991 DCHECK(current_block()->HasPredecessor()); | 5991 DCHECK(current_block()->HasPredecessor()); |
5992 expr->BuildConstantElements(isolate()); | |
5993 ZoneList<Expression*>* subexprs = expr->values(); | 5992 ZoneList<Expression*>* subexprs = expr->values(); |
5994 int length = subexprs->length(); | 5993 int length = subexprs->length(); |
5995 HInstruction* literal; | 5994 HInstruction* literal; |
5996 | 5995 |
5997 Handle<AllocationSite> site; | 5996 Handle<AllocationSite> site; |
5998 Handle<LiteralsArray> literals(environment()->closure()->literals(), | 5997 Handle<LiteralsArray> literals(environment()->closure()->literals(), |
5999 isolate()); | 5998 isolate()); |
6000 bool uninitialized = false; | 5999 bool uninitialized = false; |
6001 Handle<Object> literals_cell(literals->literal(expr->literal_index()), | 6000 Handle<Object> literals_cell(literals->literal(expr->literal_index()), |
6002 isolate()); | 6001 isolate()); |
(...skipping 7659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13662 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13661 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13663 } | 13662 } |
13664 | 13663 |
13665 #ifdef DEBUG | 13664 #ifdef DEBUG |
13666 graph_->Verify(false); // No full verify. | 13665 graph_->Verify(false); // No full verify. |
13667 #endif | 13666 #endif |
13668 } | 13667 } |
13669 | 13668 |
13670 } // namespace internal | 13669 } // namespace internal |
13671 } // namespace v8 | 13670 } // namespace v8 |
OLD | NEW |