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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 4989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5000 set_is_inlinable(false); | 5000 set_is_inlinable(false); |
5001 } | 5001 } |
5002 } | 5002 } |
5003 | 5003 |
5004 | 5004 |
5005 void Function::SetIsNativeAutoSetupScope(bool value) const { | 5005 void Function::SetIsNativeAutoSetupScope(bool value) const { |
5006 ASSERT(is_native()); | 5006 ASSERT(is_native()); |
5007 set_is_optimizable(value); | 5007 set_is_optimizable(value); |
5008 } | 5008 } |
5009 | 5009 |
| 5010 |
5010 void Function::set_is_optimizable(bool value) const { | 5011 void Function::set_is_optimizable(bool value) const { |
5011 set_kind_tag(OptimizableBit::update(value, raw_ptr()->kind_tag_)); | 5012 set_kind_tag(OptimizableBit::update(value, raw_ptr()->kind_tag_)); |
5012 } | 5013 } |
5013 | 5014 |
5014 | 5015 |
| 5016 void Function::set_allows_hoisting_check_class(bool value) const { |
| 5017 set_kind_tag( |
| 5018 AllowsHoistingCheckClassBit::update(value, raw_ptr()->kind_tag_)); |
| 5019 } |
| 5020 |
| 5021 |
5015 void Function::set_is_native(bool value) const { | 5022 void Function::set_is_native(bool value) const { |
5016 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_)); | 5023 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_)); |
5017 } | 5024 } |
5018 | 5025 |
5019 | 5026 |
5020 void Function::set_is_abstract(bool value) const { | 5027 void Function::set_is_abstract(bool value) const { |
5021 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_)); | 5028 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_)); |
5022 } | 5029 } |
5023 | 5030 |
5024 | 5031 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5518 result.set_token_pos(token_pos); | 5525 result.set_token_pos(token_pos); |
5519 result.set_end_token_pos(token_pos); | 5526 result.set_end_token_pos(token_pos); |
5520 result.set_num_fixed_parameters(0); | 5527 result.set_num_fixed_parameters(0); |
5521 result.set_num_optional_parameters(0); | 5528 result.set_num_optional_parameters(0); |
5522 result.set_usage_counter(0); | 5529 result.set_usage_counter(0); |
5523 result.set_deoptimization_counter(0); | 5530 result.set_deoptimization_counter(0); |
5524 result.set_optimized_instruction_count(0); | 5531 result.set_optimized_instruction_count(0); |
5525 result.set_optimized_call_site_count(0); | 5532 result.set_optimized_call_site_count(0); |
5526 result.set_is_optimizable(is_native ? false : true); | 5533 result.set_is_optimizable(is_native ? false : true); |
5527 result.set_is_inlinable(true); | 5534 result.set_is_inlinable(true); |
| 5535 result.set_allows_hoisting_check_class(true); |
5528 if (kind == RawFunction::kClosureFunction) { | 5536 if (kind == RawFunction::kClosureFunction) { |
5529 const ClosureData& data = ClosureData::Handle(ClosureData::New()); | 5537 const ClosureData& data = ClosureData::Handle(ClosureData::New()); |
5530 result.set_data(data); | 5538 result.set_data(data); |
5531 } | 5539 } |
5532 return result.raw(); | 5540 return result.raw(); |
5533 } | 5541 } |
5534 | 5542 |
5535 | 5543 |
5536 RawFunction* Function::Clone(const Class& new_owner) const { | 5544 RawFunction* Function::Clone(const Class& new_owner) const { |
5537 ASSERT(!IsConstructor()); | 5545 ASSERT(!IsConstructor()); |
(...skipping 11778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17316 return "_MirrorReference"; | 17324 return "_MirrorReference"; |
17317 } | 17325 } |
17318 | 17326 |
17319 | 17327 |
17320 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17328 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
17321 Instance::PrintToJSONStream(stream, ref); | 17329 Instance::PrintToJSONStream(stream, ref); |
17322 } | 17330 } |
17323 | 17331 |
17324 | 17332 |
17325 } // namespace dart | 17333 } // namespace dart |
OLD | NEW |