Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: runtime/vm/object.cc

Issue 10989016: Add is_inlinable field to functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use bit field Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 4144 matching lines...) Expand 10 before | Expand all | Expand 10 after
4155 4155
4156 void Function::set_is_native(bool value) const { 4156 void Function::set_is_native(bool value) const {
4157 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_)); 4157 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_));
4158 } 4158 }
4159 4159
4160 4160
4161 void Function::set_is_abstract(bool value) const { 4161 void Function::set_is_abstract(bool value) const {
4162 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_)); 4162 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_));
4163 } 4163 }
4164 4164
4165 void Function::set_is_inlinable(bool value) const {
4166 set_kind_tag(InlinableBit::update(value, raw_ptr()->kind_tag_));
4167 }
4165 4168
4166 intptr_t Function::NumParameters() const { 4169 intptr_t Function::NumParameters() const {
4167 return num_fixed_parameters() + NumOptionalParameters(); 4170 return num_fixed_parameters() + NumOptionalParameters();
4168 } 4171 }
4169 4172
4170 4173
4171 intptr_t Function::NumImplicitParameters() const { 4174 intptr_t Function::NumImplicitParameters() const {
4172 if (kind() == RawFunction::kConstructor) { 4175 if (kind() == RawFunction::kConstructor) {
4173 if (is_static()) { 4176 if (is_static()) {
4174 ASSERT(IsFactory()); 4177 ASSERT(IsFactory());
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
4674 result.set_owner(owner); 4677 result.set_owner(owner);
4675 result.set_token_pos(token_pos); 4678 result.set_token_pos(token_pos);
4676 result.set_end_token_pos(token_pos); 4679 result.set_end_token_pos(token_pos);
4677 result.set_num_fixed_parameters(0); 4680 result.set_num_fixed_parameters(0);
4678 result.set_num_optional_parameters(0); 4681 result.set_num_optional_parameters(0);
4679 result.set_usage_counter(0); 4682 result.set_usage_counter(0);
4680 result.set_deoptimization_counter(0); 4683 result.set_deoptimization_counter(0);
4681 result.set_is_optimizable(true); 4684 result.set_is_optimizable(true);
4682 result.set_has_finally(false); 4685 result.set_has_finally(false);
4683 result.set_is_native(false); 4686 result.set_is_native(false);
4687 result.set_is_inlinable(true);
4684 if (kind == RawFunction::kClosureFunction) { 4688 if (kind == RawFunction::kClosureFunction) {
4685 const ClosureData& data = ClosureData::Handle(ClosureData::New()); 4689 const ClosureData& data = ClosureData::Handle(ClosureData::New());
4686 result.set_data(data); 4690 result.set_data(data);
4687 } 4691 }
4688 return result.raw(); 4692 return result.raw();
4689 } 4693 }
4690 4694
4691 4695
4692 RawFunction* Function::NewClosureFunction(const String& name, 4696 RawFunction* Function::NewClosureFunction(const String& name,
4693 const Function& parent, 4697 const Function& parent,
(...skipping 7418 matching lines...) Expand 10 before | Expand all | Expand 10 after
12112 } 12116 }
12113 return result.raw(); 12117 return result.raw();
12114 } 12118 }
12115 12119
12116 12120
12117 const char* WeakProperty::ToCString() const { 12121 const char* WeakProperty::ToCString() const {
12118 return "_WeakProperty"; 12122 return "_WeakProperty";
12119 } 12123 }
12120 12124
12121 } // namespace dart 12125 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698