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

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

Issue 149603003: Fix stack height assertion code and free up a bit in the Function tag bits. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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') | runtime/vm/parser.cc » ('j') | 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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 4959 matching lines...) Expand 10 before | Expand all | Expand 10 after
4970 void Function::SetIsNativeAutoSetupScope(bool value) const { 4970 void Function::SetIsNativeAutoSetupScope(bool value) const {
4971 ASSERT(is_native()); 4971 ASSERT(is_native());
4972 set_is_optimizable(value); 4972 set_is_optimizable(value);
4973 } 4973 }
4974 4974
4975 void Function::set_is_optimizable(bool value) const { 4975 void Function::set_is_optimizable(bool value) const {
4976 set_kind_tag(OptimizableBit::update(value, raw_ptr()->kind_tag_)); 4976 set_kind_tag(OptimizableBit::update(value, raw_ptr()->kind_tag_));
4977 } 4977 }
4978 4978
4979 4979
4980 void Function::set_has_finally(bool value) const {
4981 set_kind_tag(HasFinallyBit::update(value, raw_ptr()->kind_tag_));
4982 }
4983
4984
4985 void Function::set_is_native(bool value) const { 4980 void Function::set_is_native(bool value) const {
4986 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_)); 4981 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_));
4987 } 4982 }
4988 4983
4989 4984
4990 void Function::set_is_abstract(bool value) const { 4985 void Function::set_is_abstract(bool value) const {
4991 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_)); 4986 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_));
4992 } 4987 }
4993 4988
4994 4989
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
5487 result.set_owner(owner); 5482 result.set_owner(owner);
5488 result.set_token_pos(token_pos); 5483 result.set_token_pos(token_pos);
5489 result.set_end_token_pos(token_pos); 5484 result.set_end_token_pos(token_pos);
5490 result.set_num_fixed_parameters(0); 5485 result.set_num_fixed_parameters(0);
5491 result.set_num_optional_parameters(0); 5486 result.set_num_optional_parameters(0);
5492 result.set_usage_counter(0); 5487 result.set_usage_counter(0);
5493 result.set_deoptimization_counter(0); 5488 result.set_deoptimization_counter(0);
5494 result.set_optimized_instruction_count(0); 5489 result.set_optimized_instruction_count(0);
5495 result.set_optimized_call_site_count(0); 5490 result.set_optimized_call_site_count(0);
5496 result.set_is_optimizable(is_native ? false : true); 5491 result.set_is_optimizable(is_native ? false : true);
5497 result.set_has_finally(false);
5498 result.set_is_inlinable(true); 5492 result.set_is_inlinable(true);
5499 if (kind == RawFunction::kClosureFunction) { 5493 if (kind == RawFunction::kClosureFunction) {
5500 const ClosureData& data = ClosureData::Handle(ClosureData::New()); 5494 const ClosureData& data = ClosureData::Handle(ClosureData::New());
5501 result.set_data(data); 5495 result.set_data(data);
5502 } 5496 }
5503 return result.raw(); 5497 return result.raw();
5504 } 5498 }
5505 5499
5506 5500
5507 RawFunction* Function::Clone(const Class& new_owner) const { 5501 RawFunction* Function::Clone(const Class& new_owner) const {
(...skipping 11590 matching lines...) Expand 10 before | Expand all | Expand 10 after
17098 return "_MirrorReference"; 17092 return "_MirrorReference";
17099 } 17093 }
17100 17094
17101 17095
17102 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 17096 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
17103 Instance::PrintToJSONStream(stream, ref); 17097 Instance::PrintToJSONStream(stream, ref);
17104 } 17098 }
17105 17099
17106 17100
17107 } // namespace dart 17101 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698