| 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/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 6036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6047 isolate()); | 6047 isolate()); |
| 6048 bool uninitialized = false; | 6048 bool uninitialized = false; |
| 6049 Handle<Object> literals_cell(literals->literal(expr->literal_index()), | 6049 Handle<Object> literals_cell(literals->literal(expr->literal_index()), |
| 6050 isolate()); | 6050 isolate()); |
| 6051 Handle<JSObject> boilerplate_object; | 6051 Handle<JSObject> boilerplate_object; |
| 6052 if (literals_cell->IsUndefined()) { | 6052 if (literals_cell->IsUndefined()) { |
| 6053 uninitialized = true; | 6053 uninitialized = true; |
| 6054 Handle<Object> raw_boilerplate; | 6054 Handle<Object> raw_boilerplate; |
| 6055 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 6055 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
| 6056 isolate(), raw_boilerplate, | 6056 isolate(), raw_boilerplate, |
| 6057 Runtime::CreateArrayLiteralBoilerplate( | 6057 Runtime::CreateArrayLiteralBoilerplate(isolate(), literals, |
| 6058 isolate(), literals, expr->constant_elements(), | 6058 expr->constant_elements()), |
| 6059 is_strong(function_language_mode())), | |
| 6060 Bailout(kArrayBoilerplateCreationFailed)); | 6059 Bailout(kArrayBoilerplateCreationFailed)); |
| 6061 | 6060 |
| 6062 boilerplate_object = Handle<JSObject>::cast(raw_boilerplate); | 6061 boilerplate_object = Handle<JSObject>::cast(raw_boilerplate); |
| 6063 AllocationSiteCreationContext creation_context(isolate()); | 6062 AllocationSiteCreationContext creation_context(isolate()); |
| 6064 site = creation_context.EnterNewScope(); | 6063 site = creation_context.EnterNewScope(); |
| 6065 if (JSObject::DeepWalk(boilerplate_object, &creation_context).is_null()) { | 6064 if (JSObject::DeepWalk(boilerplate_object, &creation_context).is_null()) { |
| 6066 return Bailout(kArrayBoilerplateCreationFailed); | 6065 return Bailout(kArrayBoilerplateCreationFailed); |
| 6067 } | 6066 } |
| 6068 creation_context.ExitScope(site, boilerplate_object); | 6067 creation_context.ExitScope(site, boilerplate_object); |
| 6069 literals->set_literal(expr->literal_index(), *site); | 6068 literals->set_literal(expr->literal_index(), *site); |
| (...skipping 7480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13550 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13549 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13551 } | 13550 } |
| 13552 | 13551 |
| 13553 #ifdef DEBUG | 13552 #ifdef DEBUG |
| 13554 graph_->Verify(false); // No full verify. | 13553 graph_->Verify(false); // No full verify. |
| 13555 #endif | 13554 #endif |
| 13556 } | 13555 } |
| 13557 | 13556 |
| 13558 } // namespace internal | 13557 } // namespace internal |
| 13559 } // namespace v8 | 13558 } // namespace v8 |
| OLD | NEW |