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

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

Issue 428993002: Revert async changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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') | runtime/vm/parser.h » ('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 5407 matching lines...) Expand 10 before | Expand all | Expand 10 after
5418 void Function::set_parameter_names(const Array& value) const { 5418 void Function::set_parameter_names(const Array& value) const {
5419 StorePointer(&raw_ptr()->parameter_names_, value.raw()); 5419 StorePointer(&raw_ptr()->parameter_names_, value.raw());
5420 } 5420 }
5421 5421
5422 5422
5423 void Function::set_kind(RawFunction::Kind value) const { 5423 void Function::set_kind(RawFunction::Kind value) const {
5424 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_)); 5424 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_));
5425 } 5425 }
5426 5426
5427 5427
5428 void Function::set_modifier(RawFunction::AsyncModifier value) const {
5429 set_kind_tag(ModifierBits::update(value, raw_ptr()->kind_tag_));
5430 }
5431
5432
5433 void Function::set_is_intrinsic(bool value) const { 5428 void Function::set_is_intrinsic(bool value) const {
5434 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_)); 5429 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_));
5435 } 5430 }
5436 5431
5437 5432
5438 void Function::set_is_recognized(bool value) const { 5433 void Function::set_is_recognized(bool value) const {
5439 set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_)); 5434 set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_));
5440 } 5435 }
5441 5436
5442 5437
(...skipping 10 matching lines...) Expand all
5453 void Function::set_is_const(bool value) const { 5448 void Function::set_is_const(bool value) const {
5454 set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_)); 5449 set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_));
5455 } 5450 }
5456 5451
5457 5452
5458 void Function::set_is_external(bool value) const { 5453 void Function::set_is_external(bool value) const {
5459 set_kind_tag(ExternalBit::update(value, raw_ptr()->kind_tag_)); 5454 set_kind_tag(ExternalBit::update(value, raw_ptr()->kind_tag_));
5460 } 5455 }
5461 5456
5462 5457
5463 void Function::set_is_async_closure(bool value) const {
5464 set_kind_tag(AsyncClosureBit::update(value, raw_ptr()->kind_tag_));
5465 }
5466
5467
5468 void Function::set_token_pos(intptr_t value) const { 5458 void Function::set_token_pos(intptr_t value) const {
5469 ASSERT(value >= 0); 5459 ASSERT(value >= 0);
5470 raw_ptr()->token_pos_ = value; 5460 raw_ptr()->token_pos_ = value;
5471 } 5461 }
5472 5462
5473 5463
5474 void Function::set_kind_tag(intptr_t value) const { 5464 void Function::set_kind_tag(intptr_t value) const {
5475 raw_ptr()->kind_tag_ = static_cast<uint32_t>(value); 5465 raw_ptr()->kind_tag_ = static_cast<uint16_t>(value);
5476 } 5466 }
5477 5467
5478 5468
5479 void Function::set_num_fixed_parameters(intptr_t value) const { 5469 void Function::set_num_fixed_parameters(intptr_t value) const {
5480 ASSERT(value >= 0); 5470 ASSERT(value >= 0);
5481 ASSERT(Utils::IsInt(16, value)); 5471 ASSERT(Utils::IsInt(16, value));
5482 raw_ptr()->num_fixed_parameters_ = static_cast<int16_t>(value); 5472 raw_ptr()->num_fixed_parameters_ = static_cast<int16_t>(value);
5483 } 5473 }
5484 5474
5485 5475
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
6055 bool is_external, 6045 bool is_external,
6056 bool is_native, 6046 bool is_native,
6057 const Object& owner, 6047 const Object& owner,
6058 intptr_t token_pos) { 6048 intptr_t token_pos) {
6059 ASSERT(!owner.IsNull()); 6049 ASSERT(!owner.IsNull());
6060 const Function& result = Function::Handle(Function::New()); 6050 const Function& result = Function::Handle(Function::New());
6061 result.set_parameter_types(Object::empty_array()); 6051 result.set_parameter_types(Object::empty_array());
6062 result.set_parameter_names(Object::empty_array()); 6052 result.set_parameter_names(Object::empty_array());
6063 result.set_name(name); 6053 result.set_name(name);
6064 result.set_kind(kind); 6054 result.set_kind(kind);
6065 result.set_modifier(RawFunction::kNoModifier);
6066 result.set_is_static(is_static); 6055 result.set_is_static(is_static);
6067 result.set_is_const(is_const); 6056 result.set_is_const(is_const);
6068 result.set_is_abstract(is_abstract); 6057 result.set_is_abstract(is_abstract);
6069 result.set_is_external(is_external); 6058 result.set_is_external(is_external);
6070 result.set_is_native(is_native); 6059 result.set_is_native(is_native);
6071 result.set_is_visible(true); // Will be computed later. 6060 result.set_is_visible(true); // Will be computed later.
6072 result.set_is_intrinsic(false); 6061 result.set_is_intrinsic(false);
6073 result.set_is_recognized(false); 6062 result.set_is_recognized(false);
6074 result.set_is_redirecting(false); 6063 result.set_is_redirecting(false);
6075 result.set_is_async_closure(false);
6076 result.set_owner(owner); 6064 result.set_owner(owner);
6077 result.set_token_pos(token_pos); 6065 result.set_token_pos(token_pos);
6078 result.set_end_token_pos(token_pos); 6066 result.set_end_token_pos(token_pos);
6079 result.set_num_fixed_parameters(0); 6067 result.set_num_fixed_parameters(0);
6080 result.set_num_optional_parameters(0); 6068 result.set_num_optional_parameters(0);
6081 result.set_usage_counter(0); 6069 result.set_usage_counter(0);
6082 result.set_deoptimization_counter(0); 6070 result.set_deoptimization_counter(0);
6083 result.set_optimized_instruction_count(0); 6071 result.set_optimized_instruction_count(0);
6084 result.set_optimized_call_site_count(0); 6072 result.set_optimized_call_site_count(0);
6085 result.set_is_optimizable(is_native ? false : true); 6073 result.set_is_optimizable(is_native ? false : true);
(...skipping 13278 matching lines...) Expand 10 before | Expand all | Expand 10 after
19364 return tag_label.ToCString(); 19352 return tag_label.ToCString();
19365 } 19353 }
19366 19354
19367 19355
19368 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 19356 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
19369 Instance::PrintJSONImpl(stream, ref); 19357 Instance::PrintJSONImpl(stream, ref);
19370 } 19358 }
19371 19359
19372 19360
19373 } // namespace dart 19361 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698