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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1488023002: Fix inobject slack tracking for both subclassing and non-subclassing cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved and updated comments about slack tracking Created 5 years 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/compiler/js-typed-lowering.cc ('k') | src/factory.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/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 9905 matching lines...) Expand 10 before | Expand all | Expand 10 after
9916 Handle<JSFunction> constructor = expr->target(); 9916 Handle<JSFunction> constructor = expr->target();
9917 DCHECK( 9917 DCHECK(
9918 constructor->shared()->construct_stub() == 9918 constructor->shared()->construct_stub() ==
9919 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric) || 9919 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric) ||
9920 constructor->shared()->construct_stub() == 9920 constructor->shared()->construct_stub() ==
9921 isolate()->builtins()->builtin(Builtins::kJSConstructStubApi)); 9921 isolate()->builtins()->builtin(Builtins::kJSConstructStubApi));
9922 HValue* check = Add<HCheckValue>(function, constructor); 9922 HValue* check = Add<HCheckValue>(function, constructor);
9923 9923
9924 // Force completion of inobject slack tracking before generating 9924 // Force completion of inobject slack tracking before generating
9925 // allocation code to finalize instance size. 9925 // allocation code to finalize instance size.
9926 if (constructor->IsInobjectSlackTrackingInProgress()) { 9926 constructor->CompleteInobjectSlackTrackingIfActive();
9927 constructor->CompleteInobjectSlackTracking();
9928 }
9929 9927
9930 // Calculate instance size from initial map of constructor. 9928 // Calculate instance size from initial map of constructor.
9931 DCHECK(constructor->has_initial_map()); 9929 DCHECK(constructor->has_initial_map());
9932 Handle<Map> initial_map(constructor->initial_map()); 9930 Handle<Map> initial_map(constructor->initial_map());
9933 int instance_size = initial_map->instance_size(); 9931 int instance_size = initial_map->instance_size();
9934 9932
9935 // Allocate an instance of the implicit receiver object. 9933 // Allocate an instance of the implicit receiver object.
9936 HValue* size_in_bytes = Add<HConstant>(instance_size); 9934 HValue* size_in_bytes = Add<HConstant>(instance_size);
9937 HAllocationMode allocation_mode; 9935 HAllocationMode allocation_mode;
9938 HAllocate* receiver = BuildAllocate( 9936 HAllocate* receiver = BuildAllocate(
(...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after
13627 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13625 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13628 } 13626 }
13629 13627
13630 #ifdef DEBUG 13628 #ifdef DEBUG
13631 graph_->Verify(false); // No full verify. 13629 graph_->Verify(false); // No full verify.
13632 #endif 13630 #endif
13633 } 13631 }
13634 13632
13635 } // namespace internal 13633 } // namespace internal
13636 } // namespace v8 13634 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698