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

Side by Side Diff: src/hydrogen.cc

Issue 1409543002: Revert of Add bailout for large objects when allocating arrays in optimized code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | 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/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 3486 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 Representation::Smi()); 3497 Representation::Smi());
3498 length_field = 3498 length_field =
3499 builder()->AddUncasted<HForceRepresentation>(length_field, 3499 builder()->AddUncasted<HForceRepresentation>(length_field,
3500 Representation::Smi()); 3500 Representation::Smi());
3501 3501
3502 // Generate size calculation code here in order to make it dominate 3502 // Generate size calculation code here in order to make it dominate
3503 // the JSArray allocation. 3503 // the JSArray allocation.
3504 HValue* elements_size = 3504 HValue* elements_size =
3505 builder()->BuildCalculateElementsSize(kind_, capacity); 3505 builder()->BuildCalculateElementsSize(kind_, capacity);
3506 3506
3507 // Bail out for large objects.
3508 HValue* max_regular_heap_object_size =
3509 builder()->Add<HConstant>(Page::kMaxRegularHeapObjectSize);
3510 builder()->Add<HBoundsCheck>(elements_size, max_regular_heap_object_size);
3511
3512 // Allocate (dealing with failure appropriately) 3507 // Allocate (dealing with failure appropriately)
3513 HAllocate* array_object = builder()->AllocateJSArrayObject(mode_); 3508 HAllocate* array_object = builder()->AllocateJSArrayObject(mode_);
3514 3509
3515 // Fill in the fields: map, properties, length 3510 // Fill in the fields: map, properties, length
3516 HValue* map; 3511 HValue* map;
3517 if (allocation_site_payload_ == NULL) { 3512 if (allocation_site_payload_ == NULL) {
3518 map = EmitInternalMapCode(); 3513 map = EmitInternalMapCode();
3519 } else { 3514 } else {
3520 map = EmitMapCode(); 3515 map = EmitMapCode();
3521 } 3516 }
(...skipping 10144 matching lines...) Expand 10 before | Expand all | Expand 10 after
13666 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13661 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13667 } 13662 }
13668 13663
13669 #ifdef DEBUG 13664 #ifdef DEBUG
13670 graph_->Verify(false); // No full verify. 13665 graph_->Verify(false); // No full verify.
13671 #endif 13666 #endif
13672 } 13667 }
13673 13668
13674 } // namespace internal 13669 } // namespace internal
13675 } // namespace v8 13670 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698