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 8528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8539 CHECK_ALIVE(VisitExpressions(expr->arguments())); | 8539 CHECK_ALIVE(VisitExpressions(expr->arguments())); |
8540 | 8540 |
8541 if (FLAG_inline_construct && | 8541 if (FLAG_inline_construct && |
8542 expr->IsMonomorphic() && | 8542 expr->IsMonomorphic() && |
8543 IsAllocationInlineable(expr->target())) { | 8543 IsAllocationInlineable(expr->target())) { |
8544 Handle<JSFunction> constructor = expr->target(); | 8544 Handle<JSFunction> constructor = expr->target(); |
8545 HValue* check = Add<HCheckValue>(function, constructor); | 8545 HValue* check = Add<HCheckValue>(function, constructor); |
8546 | 8546 |
8547 // Force completion of inobject slack tracking before generating | 8547 // Force completion of inobject slack tracking before generating |
8548 // allocation code to finalize instance size. | 8548 // allocation code to finalize instance size. |
8549 if (constructor->shared()->IsInobjectSlackTrackingInProgress()) { | 8549 if (constructor->IsInobjectSlackTrackingInProgress()) { |
8550 constructor->shared()->CompleteInobjectSlackTracking(); | 8550 constructor->CompleteInobjectSlackTracking(); |
8551 } | 8551 } |
8552 | 8552 |
8553 // Calculate instance size from initial map of constructor. | 8553 // Calculate instance size from initial map of constructor. |
8554 ASSERT(constructor->has_initial_map()); | 8554 ASSERT(constructor->has_initial_map()); |
8555 Handle<Map> initial_map(constructor->initial_map()); | 8555 Handle<Map> initial_map(constructor->initial_map()); |
8556 int instance_size = initial_map->instance_size(); | 8556 int instance_size = initial_map->instance_size(); |
8557 ASSERT(initial_map->InitialPropertiesLength() == 0); | 8557 ASSERT(initial_map->InitialPropertiesLength() == 0); |
8558 | 8558 |
8559 // Allocate an instance of the implicit receiver object. | 8559 // Allocate an instance of the implicit receiver object. |
8560 HValue* size_in_bytes = Add<HConstant>(instance_size); | 8560 HValue* size_in_bytes = Add<HConstant>(instance_size); |
(...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11801 if (ShouldProduceTraceOutput()) { | 11801 if (ShouldProduceTraceOutput()) { |
11802 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11802 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11803 } | 11803 } |
11804 | 11804 |
11805 #ifdef DEBUG | 11805 #ifdef DEBUG |
11806 graph_->Verify(false); // No full verify. | 11806 graph_->Verify(false); // No full verify. |
11807 #endif | 11807 #endif |
11808 } | 11808 } |
11809 | 11809 |
11810 } } // namespace v8::internal | 11810 } } // namespace v8::internal |
OLD | NEW |