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

Side by Side Diff: src/hydrogen.cc

Issue 1202173002: Remove --pretenuring-call-new (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 64 bit release build break. Created 5 years, 3 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/full-codegen/x64/full-codegen-x64.cc ('k') | src/ia32/builtins-ia32.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/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 9890 matching lines...) Expand 10 before | Expand all | Expand 10 after
9901 } 9901 }
9902 9902
9903 // Calculate instance size from initial map of constructor. 9903 // Calculate instance size from initial map of constructor.
9904 DCHECK(constructor->has_initial_map()); 9904 DCHECK(constructor->has_initial_map());
9905 Handle<Map> initial_map(constructor->initial_map()); 9905 Handle<Map> initial_map(constructor->initial_map());
9906 int instance_size = initial_map->instance_size(); 9906 int instance_size = initial_map->instance_size();
9907 9907
9908 // Allocate an instance of the implicit receiver object. 9908 // Allocate an instance of the implicit receiver object.
9909 HValue* size_in_bytes = Add<HConstant>(instance_size); 9909 HValue* size_in_bytes = Add<HConstant>(instance_size);
9910 HAllocationMode allocation_mode; 9910 HAllocationMode allocation_mode;
9911 if (FLAG_pretenuring_call_new) {
9912 if (FLAG_allocation_site_pretenuring) {
9913 // Try to use pretenuring feedback.
9914 Handle<AllocationSite> allocation_site = expr->allocation_site();
9915 allocation_mode = HAllocationMode(allocation_site);
9916 // Take a dependency on allocation site.
9917 top_info()->dependencies()->AssumeTenuringDecision(allocation_site);
9918 }
9919 }
9920
9921 HAllocate* receiver = BuildAllocate( 9911 HAllocate* receiver = BuildAllocate(
9922 size_in_bytes, HType::JSObject(), JS_OBJECT_TYPE, allocation_mode); 9912 size_in_bytes, HType::JSObject(), JS_OBJECT_TYPE, allocation_mode);
9923 receiver->set_known_initial_map(initial_map); 9913 receiver->set_known_initial_map(initial_map);
9924 9914
9925 // Initialize map and fields of the newly allocated object. 9915 // Initialize map and fields of the newly allocated object.
9926 { NoObservableSideEffectsScope no_effects(this); 9916 { NoObservableSideEffectsScope no_effects(this);
9927 DCHECK(initial_map->instance_type() == JS_OBJECT_TYPE); 9917 DCHECK(initial_map->instance_type() == JS_OBJECT_TYPE);
9928 Add<HStoreNamedField>(receiver, 9918 Add<HStoreNamedField>(receiver,
9929 HObjectAccess::ForMapAndOffset(initial_map, JSObject::kMapOffset), 9919 HObjectAccess::ForMapAndOffset(initial_map, JSObject::kMapOffset),
9930 Add<HConstant>(initial_map)); 9920 Add<HConstant>(initial_map));
(...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after
13554 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13544 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13555 } 13545 }
13556 13546
13557 #ifdef DEBUG 13547 #ifdef DEBUG
13558 graph_->Verify(false); // No full verify. 13548 graph_->Verify(false); // No full verify.
13559 #endif 13549 #endif
13560 } 13550 }
13561 13551
13562 } // namespace internal 13552 } // namespace internal
13563 } // namespace v8 13553 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698