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 "hydrogen.h" | 5 #include "hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "v8.h" | 9 #include "v8.h" |
10 #include "allocation-site-scopes.h" | 10 #include "allocation-site-scopes.h" |
(...skipping 8564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8575 CHECK_ALIVE(VisitExpressions(expr->arguments())); | 8575 CHECK_ALIVE(VisitExpressions(expr->arguments())); |
8576 | 8576 |
8577 if (FLAG_inline_construct && | 8577 if (FLAG_inline_construct && |
8578 expr->IsMonomorphic() && | 8578 expr->IsMonomorphic() && |
8579 IsAllocationInlineable(expr->target())) { | 8579 IsAllocationInlineable(expr->target())) { |
8580 Handle<JSFunction> constructor = expr->target(); | 8580 Handle<JSFunction> constructor = expr->target(); |
8581 HValue* check = Add<HCheckValue>(function, constructor); | 8581 HValue* check = Add<HCheckValue>(function, constructor); |
8582 | 8582 |
8583 // Force completion of inobject slack tracking before generating | 8583 // Force completion of inobject slack tracking before generating |
8584 // allocation code to finalize instance size. | 8584 // allocation code to finalize instance size. |
8585 if (constructor->IsInobjectSlackTrackingInProgress()) { | 8585 if (constructor->shared()->IsInobjectSlackTrackingInProgress()) { |
8586 constructor->CompleteInobjectSlackTracking(); | 8586 constructor->shared()->CompleteInobjectSlackTracking(); |
8587 } | 8587 } |
8588 | 8588 |
8589 // Calculate instance size from initial map of constructor. | 8589 // Calculate instance size from initial map of constructor. |
8590 ASSERT(constructor->has_initial_map()); | 8590 ASSERT(constructor->has_initial_map()); |
8591 Handle<Map> initial_map(constructor->initial_map()); | 8591 Handle<Map> initial_map(constructor->initial_map()); |
8592 int instance_size = initial_map->instance_size(); | 8592 int instance_size = initial_map->instance_size(); |
8593 ASSERT(initial_map->InitialPropertiesLength() == 0); | 8593 ASSERT(initial_map->InitialPropertiesLength() == 0); |
8594 | 8594 |
8595 // Allocate an instance of the implicit receiver object. | 8595 // Allocate an instance of the implicit receiver object. |
8596 HValue* size_in_bytes = Add<HConstant>(instance_size); | 8596 HValue* size_in_bytes = Add<HConstant>(instance_size); |
(...skipping 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11819 if (ShouldProduceTraceOutput()) { | 11819 if (ShouldProduceTraceOutput()) { |
11820 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11820 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11821 } | 11821 } |
11822 | 11822 |
11823 #ifdef DEBUG | 11823 #ifdef DEBUG |
11824 graph_->Verify(false); // No full verify. | 11824 graph_->Verify(false); // No full verify. |
11825 #endif | 11825 #endif |
11826 } | 11826 } |
11827 | 11827 |
11828 } } // namespace v8::internal | 11828 } } // namespace v8::internal |
OLD | NEW |