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

Side by Side Diff: src/hydrogen.cc

Issue 1143813002: Reland "[strong] Object literals create strong objects" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix handlification bug 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/factory.cc ('k') | src/objects.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 5772 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 bool uninitialized = false; 5783 bool uninitialized = false;
5784 Handle<Object> literals_cell(literals->get(expr->literal_index()), 5784 Handle<Object> literals_cell(literals->get(expr->literal_index()),
5785 isolate()); 5785 isolate());
5786 Handle<JSObject> boilerplate_object; 5786 Handle<JSObject> boilerplate_object;
5787 if (literals_cell->IsUndefined()) { 5787 if (literals_cell->IsUndefined()) {
5788 uninitialized = true; 5788 uninitialized = true;
5789 Handle<Object> raw_boilerplate; 5789 Handle<Object> raw_boilerplate;
5790 ASSIGN_RETURN_ON_EXCEPTION_VALUE( 5790 ASSIGN_RETURN_ON_EXCEPTION_VALUE(
5791 isolate(), raw_boilerplate, 5791 isolate(), raw_boilerplate,
5792 Runtime::CreateArrayLiteralBoilerplate( 5792 Runtime::CreateArrayLiteralBoilerplate(
5793 isolate(), literals, expr->constant_elements()), 5793 isolate(), literals, expr->constant_elements(),
5794 is_strong(function_language_mode())),
5794 Bailout(kArrayBoilerplateCreationFailed)); 5795 Bailout(kArrayBoilerplateCreationFailed));
5795 5796
5796 boilerplate_object = Handle<JSObject>::cast(raw_boilerplate); 5797 boilerplate_object = Handle<JSObject>::cast(raw_boilerplate);
5797 AllocationSiteCreationContext creation_context(isolate()); 5798 AllocationSiteCreationContext creation_context(isolate());
5798 site = creation_context.EnterNewScope(); 5799 site = creation_context.EnterNewScope();
5799 if (JSObject::DeepWalk(boilerplate_object, &creation_context).is_null()) { 5800 if (JSObject::DeepWalk(boilerplate_object, &creation_context).is_null()) {
5800 return Bailout(kArrayBoilerplateCreationFailed); 5801 return Bailout(kArrayBoilerplateCreationFailed);
5801 } 5802 }
5802 creation_context.ExitScope(site, boilerplate_object); 5803 creation_context.ExitScope(site, boilerplate_object);
5803 literals->set(expr->literal_index(), *site); 5804 literals->set(expr->literal_index(), *site);
(...skipping 7322 matching lines...) Expand 10 before | Expand all | Expand 10 after
13126 if (ShouldProduceTraceOutput()) { 13127 if (ShouldProduceTraceOutput()) {
13127 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13128 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13128 } 13129 }
13129 13130
13130 #ifdef DEBUG 13131 #ifdef DEBUG
13131 graph_->Verify(false); // No full verify. 13132 graph_->Verify(false); // No full verify.
13132 #endif 13133 #endif
13133 } 13134 }
13134 13135
13135 } } // namespace v8::internal 13136 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698