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

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

Issue 362153002: Transform functions marked as async (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: getters and setters Created 6 years, 5 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
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 5367 matching lines...) Expand 10 before | Expand all | Expand 10 after
5378 void Function::set_parameter_names(const Array& value) const { 5378 void Function::set_parameter_names(const Array& value) const {
5379 StorePointer(&raw_ptr()->parameter_names_, value.raw()); 5379 StorePointer(&raw_ptr()->parameter_names_, value.raw());
5380 } 5380 }
5381 5381
5382 5382
5383 void Function::set_kind(RawFunction::Kind value) const { 5383 void Function::set_kind(RawFunction::Kind value) const {
5384 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_)); 5384 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_));
5385 } 5385 }
5386 5386
5387 5387
5388 void Function::set_modifier(RawFunction::Modifier value) const {
5389 set_kind_tag(ModifierBits::update(value, raw_ptr()->kind_tag_));
5390 }
5391
5392
5388 void Function::set_is_intrinsic(bool value) const { 5393 void Function::set_is_intrinsic(bool value) const {
5389 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_)); 5394 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_));
5390 } 5395 }
5391 5396
5392 5397
5393 void Function::set_is_recognized(bool value) const { 5398 void Function::set_is_recognized(bool value) const {
5394 set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_)); 5399 set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_));
5395 } 5400 }
5396 5401
5397 5402
(...skipping 17 matching lines...) Expand all
5415 } 5420 }
5416 5421
5417 5422
5418 void Function::set_token_pos(intptr_t value) const { 5423 void Function::set_token_pos(intptr_t value) const {
5419 ASSERT(value >= 0); 5424 ASSERT(value >= 0);
5420 raw_ptr()->token_pos_ = value; 5425 raw_ptr()->token_pos_ = value;
5421 } 5426 }
5422 5427
5423 5428
5424 void Function::set_kind_tag(intptr_t value) const { 5429 void Function::set_kind_tag(intptr_t value) const {
5425 raw_ptr()->kind_tag_ = static_cast<uint16_t>(value); 5430 raw_ptr()->kind_tag_ = static_cast<uint32_t>(value);
5426 } 5431 }
5427 5432
5428 5433
5429 void Function::set_num_fixed_parameters(intptr_t value) const { 5434 void Function::set_num_fixed_parameters(intptr_t value) const {
5430 ASSERT(value >= 0); 5435 ASSERT(value >= 0);
5431 ASSERT(Utils::IsInt(16, value)); 5436 ASSERT(Utils::IsInt(16, value));
5432 raw_ptr()->num_fixed_parameters_ = static_cast<int16_t>(value); 5437 raw_ptr()->num_fixed_parameters_ = static_cast<int16_t>(value);
5433 } 5438 }
5434 5439
5435 5440
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
6005 bool is_external, 6010 bool is_external,
6006 bool is_native, 6011 bool is_native,
6007 const Object& owner, 6012 const Object& owner,
6008 intptr_t token_pos) { 6013 intptr_t token_pos) {
6009 ASSERT(!owner.IsNull()); 6014 ASSERT(!owner.IsNull());
6010 const Function& result = Function::Handle(Function::New()); 6015 const Function& result = Function::Handle(Function::New());
6011 result.set_parameter_types(Object::empty_array()); 6016 result.set_parameter_types(Object::empty_array());
6012 result.set_parameter_names(Object::empty_array()); 6017 result.set_parameter_names(Object::empty_array());
6013 result.set_name(name); 6018 result.set_name(name);
6014 result.set_kind(kind); 6019 result.set_kind(kind);
6020 result.set_modifier(RawFunction::kNoModifier);
6015 result.set_is_static(is_static); 6021 result.set_is_static(is_static);
6016 result.set_is_const(is_const); 6022 result.set_is_const(is_const);
6017 result.set_is_abstract(is_abstract); 6023 result.set_is_abstract(is_abstract);
6018 result.set_is_external(is_external); 6024 result.set_is_external(is_external);
6019 result.set_is_native(is_native); 6025 result.set_is_native(is_native);
6020 result.set_is_visible(true); // Will be computed later. 6026 result.set_is_visible(true); // Will be computed later.
6021 result.set_is_intrinsic(false); 6027 result.set_is_intrinsic(false);
6022 result.set_is_recognized(false); 6028 result.set_is_recognized(false);
6023 result.set_is_redirecting(false); 6029 result.set_is_redirecting(false);
6024 result.set_owner(owner); 6030 result.set_owner(owner);
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
6511 return raw_ptr()->ic_data_array_; 6517 return raw_ptr()->ic_data_array_;
6512 } 6518 }
6513 6519
6514 void Function::ClearICData() const { 6520 void Function::ClearICData() const {
6515 set_ic_data_array(Array::Handle()); 6521 set_ic_data_array(Array::Handle());
6516 } 6522 }
6517 6523
6518 6524
6519 bool Function::CheckSourceFingerprint(int32_t fp) const { 6525 bool Function::CheckSourceFingerprint(int32_t fp) const {
6520 if (SourceFingerprint() != fp) { 6526 if (SourceFingerprint() != fp) {
6521 const bool recalculatingFingerprints = false; 6527 const bool recalculatingFingerprints = true;
6522 if (recalculatingFingerprints) { 6528 if (recalculatingFingerprints) {
6523 // This output can be copied into a file, then used with sed 6529 // This output can be copied into a file, then used with sed
6524 // to replace the old values. 6530 // to replace the old values.
6525 // sed -i .bak -f /tmp/newkeys runtime/vm/intrinsifier.h 6531 // sed -i .bak -f /tmp/newkeys runtime/vm/intrinsifier.h
6526 // sed -i .bak -f /tmp/newkeys runtime/vm/intermediate_language.h 6532 // sed -i .bak -f /tmp/newkeys runtime/vm/intermediate_language.h
6527 // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h 6533 // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h
6528 OS::Print("s/%d/%d/\n", fp, SourceFingerprint()); 6534 OS::Print("s/%d/%d/\n", fp, SourceFingerprint());
6529 } else { 6535 } else {
6530 OS::Print("FP mismatch while recognizing method %s:" 6536 OS::Print("FP mismatch while recognizing method %s:"
6531 " expecting %d found %d\n", 6537 " expecting %d found %d\n",
(...skipping 12519 matching lines...) Expand 10 before | Expand all | Expand 10 after
19051 return tag_label.ToCString(); 19057 return tag_label.ToCString();
19052 } 19058 }
19053 19059
19054 19060
19055 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 19061 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
19056 Instance::PrintJSONImpl(stream, ref); 19062 Instance::PrintJSONImpl(stream, ref);
19057 } 19063 }
19058 19064
19059 19065
19060 } // namespace dart 19066 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698