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

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

Issue 11358047: Add is_intrinsic and is_not_intrinsic bits to prevent repeated tests on the same function (inlining… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« runtime/vm/object.h ('K') | « 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 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 void Function::set_parameter_names(const Array& value) const { 3273 void Function::set_parameter_names(const Array& value) const {
3274 StorePointer(&raw_ptr()->parameter_names_, value.raw()); 3274 StorePointer(&raw_ptr()->parameter_names_, value.raw());
3275 } 3275 }
3276 3276
3277 3277
3278 void Function::set_kind(RawFunction::Kind value) const { 3278 void Function::set_kind(RawFunction::Kind value) const {
3279 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_)); 3279 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_));
3280 } 3280 }
3281 3281
3282 3282
3283 void Function::set_intrinsic_kind(IntrinsicKind value) const {
3284 set_kind_tag(IntrinsicKindBits::update(value, raw_ptr()->kind_tag_));
3285 }
3286
3287
3283 void Function::set_is_static(bool value) const { 3288 void Function::set_is_static(bool value) const {
3284 set_kind_tag(StaticBit::update(value, raw_ptr()->kind_tag_)); 3289 set_kind_tag(StaticBit::update(value, raw_ptr()->kind_tag_));
3285 } 3290 }
3286 3291
3287 3292
3288 void Function::set_is_const(bool value) const { 3293 void Function::set_is_const(bool value) const {
3289 set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_)); 3294 set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_));
3290 } 3295 }
3291 3296
3292 3297
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
3769 const Function& result = Function::Handle(Function::New()); 3774 const Function& result = Function::Handle(Function::New());
3770 const Array& empty_array = Array::Handle(Object::empty_array()); 3775 const Array& empty_array = Array::Handle(Object::empty_array());
3771 result.set_parameter_types(empty_array); 3776 result.set_parameter_types(empty_array);
3772 result.set_parameter_names(empty_array); 3777 result.set_parameter_names(empty_array);
3773 result.set_name(name); 3778 result.set_name(name);
3774 result.set_kind(kind); 3779 result.set_kind(kind);
3775 result.set_is_static(is_static); 3780 result.set_is_static(is_static);
3776 result.set_is_const(is_const); 3781 result.set_is_const(is_const);
3777 result.set_is_abstract(is_abstract); 3782 result.set_is_abstract(is_abstract);
3778 result.set_is_external(is_external); 3783 result.set_is_external(is_external);
3784 result.set_intrinsic_kind(kUnknownIntrinsic);
3779 result.set_owner(owner); 3785 result.set_owner(owner);
3780 result.set_token_pos(token_pos); 3786 result.set_token_pos(token_pos);
3781 result.set_end_token_pos(token_pos); 3787 result.set_end_token_pos(token_pos);
3782 result.set_num_fixed_parameters(0); 3788 result.set_num_fixed_parameters(0);
3783 result.set_num_optional_parameters(0); 3789 result.set_num_optional_parameters(0);
3784 result.set_usage_counter(0); 3790 result.set_usage_counter(0);
3785 result.set_deoptimization_counter(0); 3791 result.set_deoptimization_counter(0);
3786 result.set_is_optimizable(true); 3792 result.set_is_optimizable(true);
3787 result.set_has_finally(false); 3793 result.set_has_finally(false);
3788 result.set_is_native(false); 3794 result.set_is_native(false);
(...skipping 8094 matching lines...) Expand 10 before | Expand all | Expand 10 after
11883 } 11889 }
11884 return result.raw(); 11890 return result.raw();
11885 } 11891 }
11886 11892
11887 11893
11888 const char* WeakProperty::ToCString() const { 11894 const char* WeakProperty::ToCString() const {
11889 return "_WeakProperty"; 11895 return "_WeakProperty";
11890 } 11896 }
11891 11897
11892 } // namespace dart 11898 } // namespace dart
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698