| 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 <memory> | 7 #include <memory> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
| (...skipping 9762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9773 } | 9773 } |
| 9774 | 9774 |
| 9775 if (FLAG_inline_construct && | 9775 if (FLAG_inline_construct && |
| 9776 expr->IsMonomorphic() && | 9776 expr->IsMonomorphic() && |
| 9777 IsAllocationInlineable(expr->target())) { | 9777 IsAllocationInlineable(expr->target())) { |
| 9778 Handle<JSFunction> constructor = expr->target(); | 9778 Handle<JSFunction> constructor = expr->target(); |
| 9779 DCHECK( | 9779 DCHECK( |
| 9780 constructor->shared()->construct_stub() == | 9780 constructor->shared()->construct_stub() == |
| 9781 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric) || | 9781 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric) || |
| 9782 constructor->shared()->construct_stub() == | 9782 constructor->shared()->construct_stub() == |
| 9783 isolate()->builtins()->builtin(Builtins::kJSConstructStubApi)); | 9783 isolate()->builtins()->builtin(Builtins::kJSConstructStubApi) || |
| 9784 constructor->shared()->construct_stub() == |
| 9785 isolate()->builtins()->builtin( |
| 9786 Builtins::kObjectConstructor_ConstructStub)); |
| 9784 HValue* check = Add<HCheckValue>(function, constructor); | 9787 HValue* check = Add<HCheckValue>(function, constructor); |
| 9785 | 9788 |
| 9786 // Force completion of inobject slack tracking before generating | 9789 // Force completion of inobject slack tracking before generating |
| 9787 // allocation code to finalize instance size. | 9790 // allocation code to finalize instance size. |
| 9788 constructor->CompleteInobjectSlackTrackingIfActive(); | 9791 constructor->CompleteInobjectSlackTrackingIfActive(); |
| 9789 | 9792 |
| 9790 // Calculate instance size from initial map of constructor. | 9793 // Calculate instance size from initial map of constructor. |
| 9791 DCHECK(constructor->has_initial_map()); | 9794 DCHECK(constructor->has_initial_map()); |
| 9792 Handle<Map> initial_map(constructor->initial_map()); | 9795 Handle<Map> initial_map(constructor->initial_map()); |
| 9793 int instance_size = initial_map->instance_size(); | 9796 int instance_size = initial_map->instance_size(); |
| (...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12735 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12738 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12736 } | 12739 } |
| 12737 | 12740 |
| 12738 #ifdef DEBUG | 12741 #ifdef DEBUG |
| 12739 graph_->Verify(false); // No full verify. | 12742 graph_->Verify(false); // No full verify. |
| 12740 #endif | 12743 #endif |
| 12741 } | 12744 } |
| 12742 | 12745 |
| 12743 } // namespace internal | 12746 } // namespace internal |
| 12744 } // namespace v8 | 12747 } // namespace v8 |
| OLD | NEW |