OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/become.h" | 10 #include "vm/become.h" |
(...skipping 6576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6587 result.set_is_external(is_external); | 6587 result.set_is_external(is_external); |
6588 result.set_is_native(is_native); | 6588 result.set_is_native(is_native); |
6589 result.set_is_reflectable(true); // Will be computed later. | 6589 result.set_is_reflectable(true); // Will be computed later. |
6590 result.set_is_visible(true); // Will be computed later. | 6590 result.set_is_visible(true); // Will be computed later. |
6591 result.set_is_debuggable(true); // Will be computed later. | 6591 result.set_is_debuggable(true); // Will be computed later. |
6592 result.set_is_intrinsic(false); | 6592 result.set_is_intrinsic(false); |
6593 result.set_is_redirecting(false); | 6593 result.set_is_redirecting(false); |
6594 result.set_is_generated_body(false); | 6594 result.set_is_generated_body(false); |
6595 result.set_always_inline(false); | 6595 result.set_always_inline(false); |
6596 result.set_is_polymorphic_target(false); | 6596 result.set_is_polymorphic_target(false); |
6597 NOT_IN_PRECOMPILED(result.set_was_compiled(false)); | 6597 NOT_IN_PRECOMPILED(result.SetWasCompiled(false)); |
6598 result.set_owner(owner); | 6598 result.set_owner(owner); |
6599 NOT_IN_PRECOMPILED(result.set_token_pos(token_pos)); | 6599 NOT_IN_PRECOMPILED(result.set_token_pos(token_pos)); |
6600 NOT_IN_PRECOMPILED(result.set_end_token_pos(token_pos)); | 6600 NOT_IN_PRECOMPILED(result.set_end_token_pos(token_pos)); |
6601 result.set_num_fixed_parameters(0); | 6601 result.set_num_fixed_parameters(0); |
6602 result.set_num_optional_parameters(0); | 6602 result.set_num_optional_parameters(0); |
6603 NOT_IN_PRECOMPILED(result.set_usage_counter(0)); | 6603 NOT_IN_PRECOMPILED(result.set_usage_counter(0)); |
6604 NOT_IN_PRECOMPILED(result.set_deoptimization_counter(0)); | 6604 NOT_IN_PRECOMPILED(result.set_deoptimization_counter(0)); |
6605 NOT_IN_PRECOMPILED(result.set_optimized_instruction_count(0)); | 6605 NOT_IN_PRECOMPILED(result.set_optimized_instruction_count(0)); |
6606 NOT_IN_PRECOMPILED(result.set_optimized_call_site_count(0)); | 6606 NOT_IN_PRECOMPILED(result.set_optimized_call_site_count(0)); |
| 6607 NOT_IN_PRECOMPILED(result.set_inlining_depth(0)); |
6607 result.set_kernel_offset(0); | 6608 result.set_kernel_offset(0); |
6608 result.set_is_optimizable(is_native ? false : true); | 6609 result.set_is_optimizable(is_native ? false : true); |
6609 result.set_is_inlinable(true); | 6610 result.set_is_inlinable(true); |
6610 result.set_allows_hoisting_check_class(true); | 6611 result.set_allows_hoisting_check_class(true); |
6611 result.set_allows_bounds_check_generalization(true); | 6612 result.set_allows_bounds_check_generalization(true); |
6612 result.SetInstructionsSafe( | 6613 result.SetInstructionsSafe( |
6613 Code::Handle(StubCode::LazyCompile_entry()->code())); | 6614 Code::Handle(StubCode::LazyCompile_entry()->code())); |
6614 if (kind == RawFunction::kClosureFunction || | 6615 if (kind == RawFunction::kClosureFunction || |
6615 kind == RawFunction::kImplicitClosureFunction || | 6616 kind == RawFunction::kImplicitClosureFunction || |
6616 kind == RawFunction::kConvertedClosureFunction) { | 6617 kind == RawFunction::kConvertedClosureFunction) { |
(...skipping 20 matching lines...) Expand all Loading... |
6637 clone ^= Object::Clone(*this, Heap::kOld); | 6638 clone ^= Object::Clone(*this, Heap::kOld); |
6638 const Class& origin = Class::Handle(zone, this->origin()); | 6639 const Class& origin = Class::Handle(zone, this->origin()); |
6639 const PatchClass& clone_owner = | 6640 const PatchClass& clone_owner = |
6640 PatchClass::Handle(zone, PatchClass::New(new_owner, origin)); | 6641 PatchClass::Handle(zone, PatchClass::New(new_owner, origin)); |
6641 clone.set_owner(clone_owner); | 6642 clone.set_owner(clone_owner); |
6642 clone.ClearICDataArray(); | 6643 clone.ClearICDataArray(); |
6643 clone.ClearCode(); | 6644 clone.ClearCode(); |
6644 clone.set_usage_counter(0); | 6645 clone.set_usage_counter(0); |
6645 clone.set_deoptimization_counter(0); | 6646 clone.set_deoptimization_counter(0); |
6646 clone.set_optimized_instruction_count(0); | 6647 clone.set_optimized_instruction_count(0); |
| 6648 clone.set_inlining_depth(0); |
6647 clone.set_optimized_call_site_count(0); | 6649 clone.set_optimized_call_site_count(0); |
6648 clone.set_kernel_offset(kernel_offset()); | 6650 clone.set_kernel_offset(kernel_offset()); |
6649 clone.set_kernel_data(TypedData::Handle(zone, kernel_data())); | 6651 clone.set_kernel_data(TypedData::Handle(zone, kernel_data())); |
6650 | 6652 |
6651 if (new_owner.NumTypeParameters() > 0) { | 6653 if (new_owner.NumTypeParameters() > 0) { |
6652 // Adjust uninstantiated types to refer to type parameters of the new owner. | 6654 // Adjust uninstantiated types to refer to type parameters of the new owner. |
6653 const TypeArguments& type_params = | 6655 const TypeArguments& type_params = |
6654 TypeArguments::Handle(zone, type_parameters()); | 6656 TypeArguments::Handle(zone, type_parameters()); |
6655 if (!type_params.IsNull()) { | 6657 if (!type_params.IsNull()) { |
6656 const intptr_t num_type_params = type_params.Length(); | 6658 const intptr_t num_type_params = type_params.Length(); |
(...skipping 15882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22539 } | 22541 } |
22540 return UserTag::null(); | 22542 return UserTag::null(); |
22541 } | 22543 } |
22542 | 22544 |
22543 const char* UserTag::ToCString() const { | 22545 const char* UserTag::ToCString() const { |
22544 const String& tag_label = String::Handle(label()); | 22546 const String& tag_label = String::Handle(label()); |
22545 return tag_label.ToCString(); | 22547 return tag_label.ToCString(); |
22546 } | 22548 } |
22547 | 22549 |
22548 } // namespace dart | 22550 } // namespace dart |
OLD | NEW |