| 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/become.h" | 9 #include "vm/become.h" |
| 10 #include "vm/bit_vector.h" | 10 #include "vm/bit_vector.h" |
| (...skipping 6613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6624 result.set_is_external(is_external); | 6624 result.set_is_external(is_external); |
| 6625 result.set_is_native(is_native); | 6625 result.set_is_native(is_native); |
| 6626 result.set_is_reflectable(true); // Will be computed later. | 6626 result.set_is_reflectable(true); // Will be computed later. |
| 6627 result.set_is_visible(true); // Will be computed later. | 6627 result.set_is_visible(true); // Will be computed later. |
| 6628 result.set_is_debuggable(true); // Will be computed later. | 6628 result.set_is_debuggable(true); // Will be computed later. |
| 6629 result.set_is_intrinsic(false); | 6629 result.set_is_intrinsic(false); |
| 6630 result.set_is_redirecting(false); | 6630 result.set_is_redirecting(false); |
| 6631 result.set_is_generated_body(false); | 6631 result.set_is_generated_body(false); |
| 6632 result.set_always_inline(false); | 6632 result.set_always_inline(false); |
| 6633 result.set_is_polymorphic_target(false); | 6633 result.set_is_polymorphic_target(false); |
| 6634 NOT_IN_PRECOMPILED(result.set_was_compiled(false)); | 6634 NOT_IN_PRECOMPILED(result.SetWasCompiled(false)); |
| 6635 result.set_owner(owner); | 6635 result.set_owner(owner); |
| 6636 NOT_IN_PRECOMPILED(result.set_token_pos(token_pos)); | 6636 NOT_IN_PRECOMPILED(result.set_token_pos(token_pos)); |
| 6637 NOT_IN_PRECOMPILED(result.set_end_token_pos(token_pos)); | 6637 NOT_IN_PRECOMPILED(result.set_end_token_pos(token_pos)); |
| 6638 result.set_num_fixed_parameters(0); | 6638 result.set_num_fixed_parameters(0); |
| 6639 result.set_num_optional_parameters(0); | 6639 result.set_num_optional_parameters(0); |
| 6640 NOT_IN_PRECOMPILED(result.set_usage_counter(0)); | 6640 NOT_IN_PRECOMPILED(result.set_usage_counter(0)); |
| 6641 NOT_IN_PRECOMPILED(result.set_deoptimization_counter(0)); | 6641 NOT_IN_PRECOMPILED(result.set_deoptimization_counter(0)); |
| 6642 NOT_IN_PRECOMPILED(result.set_optimized_instruction_count(0)); | 6642 NOT_IN_PRECOMPILED(result.set_optimized_instruction_count(0)); |
| 6643 NOT_IN_PRECOMPILED(result.set_optimized_call_site_count(0)); | 6643 NOT_IN_PRECOMPILED(result.set_optimized_call_site_count(0)); |
| 6644 NOT_IN_PRECOMPILED(result.set_inlining_depth(0)); |
| 6644 result.set_kernel_offset(0); | 6645 result.set_kernel_offset(0); |
| 6645 result.set_is_optimizable(is_native ? false : true); | 6646 result.set_is_optimizable(is_native ? false : true); |
| 6646 result.set_is_inlinable(true); | 6647 result.set_is_inlinable(true); |
| 6647 result.set_allows_hoisting_check_class(true); | 6648 result.set_allows_hoisting_check_class(true); |
| 6648 result.set_allows_bounds_check_generalization(true); | 6649 result.set_allows_bounds_check_generalization(true); |
| 6649 result.SetInstructionsSafe( | 6650 result.SetInstructionsSafe( |
| 6650 Code::Handle(StubCode::LazyCompile_entry()->code())); | 6651 Code::Handle(StubCode::LazyCompile_entry()->code())); |
| 6651 if (kind == RawFunction::kClosureFunction || | 6652 if (kind == RawFunction::kClosureFunction || |
| 6652 kind == RawFunction::kImplicitClosureFunction || | 6653 kind == RawFunction::kImplicitClosureFunction || |
| 6653 kind == RawFunction::kConvertedClosureFunction) { | 6654 kind == RawFunction::kConvertedClosureFunction) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 6674 clone ^= Object::Clone(*this, Heap::kOld); | 6675 clone ^= Object::Clone(*this, Heap::kOld); |
| 6675 const Class& origin = Class::Handle(zone, this->origin()); | 6676 const Class& origin = Class::Handle(zone, this->origin()); |
| 6676 const PatchClass& clone_owner = | 6677 const PatchClass& clone_owner = |
| 6677 PatchClass::Handle(zone, PatchClass::New(new_owner, origin)); | 6678 PatchClass::Handle(zone, PatchClass::New(new_owner, origin)); |
| 6678 clone.set_owner(clone_owner); | 6679 clone.set_owner(clone_owner); |
| 6679 clone.ClearICDataArray(); | 6680 clone.ClearICDataArray(); |
| 6680 clone.ClearCode(); | 6681 clone.ClearCode(); |
| 6681 clone.set_usage_counter(0); | 6682 clone.set_usage_counter(0); |
| 6682 clone.set_deoptimization_counter(0); | 6683 clone.set_deoptimization_counter(0); |
| 6683 clone.set_optimized_instruction_count(0); | 6684 clone.set_optimized_instruction_count(0); |
| 6685 clone.set_inlining_depth(0); |
| 6684 clone.set_optimized_call_site_count(0); | 6686 clone.set_optimized_call_site_count(0); |
| 6685 clone.set_kernel_offset(kernel_offset()); | 6687 clone.set_kernel_offset(kernel_offset()); |
| 6686 clone.set_kernel_data(TypedData::Handle(zone, kernel_data())); | 6688 clone.set_kernel_data(TypedData::Handle(zone, kernel_data())); |
| 6687 | 6689 |
| 6688 if (new_owner.NumTypeParameters() > 0) { | 6690 if (new_owner.NumTypeParameters() > 0) { |
| 6689 // Adjust uninstantiated types to refer to type parameters of the new owner. | 6691 // Adjust uninstantiated types to refer to type parameters of the new owner. |
| 6690 const TypeArguments& type_params = | 6692 const TypeArguments& type_params = |
| 6691 TypeArguments::Handle(zone, type_parameters()); | 6693 TypeArguments::Handle(zone, type_parameters()); |
| 6692 if (!type_params.IsNull()) { | 6694 if (!type_params.IsNull()) { |
| 6693 const intptr_t num_type_params = type_params.Length(); | 6695 const intptr_t num_type_params = type_params.Length(); |
| (...skipping 15832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22526 } | 22528 } |
| 22527 return UserTag::null(); | 22529 return UserTag::null(); |
| 22528 } | 22530 } |
| 22529 | 22531 |
| 22530 const char* UserTag::ToCString() const { | 22532 const char* UserTag::ToCString() const { |
| 22531 const String& tag_label = String::Handle(label()); | 22533 const String& tag_label = String::Handle(label()); |
| 22532 return tag_label.ToCString(); | 22534 return tag_label.ToCString(); |
| 22533 } | 22535 } |
| 22534 | 22536 |
| 22535 } // namespace dart | 22537 } // namespace dart |
| OLD | NEW |