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

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

Issue 10832397: Test functions do not have scripts associated with them. Prevent their optimization by marking any … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 3855 matching lines...) Expand 10 before | Expand all | Expand 10 after
3866 raw_ptr()->num_fixed_parameters_ = n; 3866 raw_ptr()->num_fixed_parameters_ = n;
3867 } 3867 }
3868 3868
3869 3869
3870 void Function::set_num_optional_parameters(intptr_t n) const { 3870 void Function::set_num_optional_parameters(intptr_t n) const {
3871 ASSERT(n >= 0); 3871 ASSERT(n >= 0);
3872 raw_ptr()->num_optional_parameters_ = n; 3872 raw_ptr()->num_optional_parameters_ = n;
3873 } 3873 }
3874 3874
3875 3875
3876 bool Function::is_optimizable() const {
3877 return OptimizableBit::decode(raw_ptr()->kind_tag_) &&
3878 (script() != Script::null());
3879 }
3880
3881
3876 void Function::set_is_optimizable(bool value) const { 3882 void Function::set_is_optimizable(bool value) const {
3877 uword bits = raw_ptr()->kind_tag_; 3883 uword bits = raw_ptr()->kind_tag_;
3878 raw_ptr()->kind_tag_ = OptimizableBit::update(value, bits); 3884 raw_ptr()->kind_tag_ = OptimizableBit::update(value, bits);
3879 } 3885 }
3880 3886
3881 3887
3882 void Function::set_has_finally(bool value) const { 3888 void Function::set_has_finally(bool value) const {
3883 uword bits = raw_ptr()->kind_tag_; 3889 uword bits = raw_ptr()->kind_tag_;
3884 raw_ptr()->kind_tag_ = HasFinallyBit::update(value, bits); 3890 raw_ptr()->kind_tag_ = HasFinallyBit::update(value, bits);
3885 } 3891 }
(...skipping 7445 matching lines...) Expand 10 before | Expand all | Expand 10 after
11331 } 11337 }
11332 return result.raw(); 11338 return result.raw();
11333 } 11339 }
11334 11340
11335 11341
11336 const char* WeakProperty::ToCString() const { 11342 const char* WeakProperty::ToCString() const {
11337 return "WeakProperty"; 11343 return "WeakProperty";
11338 } 11344 }
11339 11345
11340 } // namespace dart 11346 } // 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