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

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: first round of comments 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 5371 matching lines...) Expand 10 before | Expand all | Expand 10 after
5382 void Function::set_parameter_names(const Array& value) const { 5382 void Function::set_parameter_names(const Array& value) const {
5383 StorePointer(&raw_ptr()->parameter_names_, value.raw()); 5383 StorePointer(&raw_ptr()->parameter_names_, value.raw());
5384 } 5384 }
5385 5385
5386 5386
5387 void Function::set_kind(RawFunction::Kind value) const { 5387 void Function::set_kind(RawFunction::Kind value) const {
5388 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_)); 5388 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_));
5389 } 5389 }
5390 5390
5391 5391
5392 void Function::set_modifier(RawFunction::Modifier value) const {
5393 set_kind_tag(ModifierBits::update(value, raw_ptr()->kind_tag_));
5394 }
5395
5396
5392 void Function::set_is_intrinsic(bool value) const { 5397 void Function::set_is_intrinsic(bool value) const {
5393 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_)); 5398 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_));
5394 } 5399 }
5395 5400
5396 5401
5397 void Function::set_is_recognized(bool value) const { 5402 void Function::set_is_recognized(bool value) const {
5398 set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_)); 5403 set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_));
5399 } 5404 }
5400 5405
5401 5406
(...skipping 17 matching lines...) Expand all
5419 } 5424 }
5420 5425
5421 5426
5422 void Function::set_token_pos(intptr_t value) const { 5427 void Function::set_token_pos(intptr_t value) const {
5423 ASSERT(value >= 0); 5428 ASSERT(value >= 0);
5424 raw_ptr()->token_pos_ = value; 5429 raw_ptr()->token_pos_ = value;
5425 } 5430 }
5426 5431
5427 5432
5428 void Function::set_kind_tag(intptr_t value) const { 5433 void Function::set_kind_tag(intptr_t value) const {
5429 raw_ptr()->kind_tag_ = static_cast<uint16_t>(value); 5434 raw_ptr()->kind_tag_ = static_cast<uint32_t>(value);
5430 } 5435 }
5431 5436
5432 5437
5433 void Function::set_num_fixed_parameters(intptr_t value) const { 5438 void Function::set_num_fixed_parameters(intptr_t value) const {
5434 ASSERT(value >= 0); 5439 ASSERT(value >= 0);
5435 ASSERT(Utils::IsInt(16, value)); 5440 ASSERT(Utils::IsInt(16, value));
5436 raw_ptr()->num_fixed_parameters_ = static_cast<int16_t>(value); 5441 raw_ptr()->num_fixed_parameters_ = static_cast<int16_t>(value);
5437 } 5442 }
5438 5443
5439 5444
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
6009 bool is_external, 6014 bool is_external,
6010 bool is_native, 6015 bool is_native,
6011 const Object& owner, 6016 const Object& owner,
6012 intptr_t token_pos) { 6017 intptr_t token_pos) {
6013 ASSERT(!owner.IsNull()); 6018 ASSERT(!owner.IsNull());
6014 const Function& result = Function::Handle(Function::New()); 6019 const Function& result = Function::Handle(Function::New());
6015 result.set_parameter_types(Object::empty_array()); 6020 result.set_parameter_types(Object::empty_array());
6016 result.set_parameter_names(Object::empty_array()); 6021 result.set_parameter_names(Object::empty_array());
6017 result.set_name(name); 6022 result.set_name(name);
6018 result.set_kind(kind); 6023 result.set_kind(kind);
6024 result.set_modifier(RawFunction::kNoModifier);
6019 result.set_is_static(is_static); 6025 result.set_is_static(is_static);
6020 result.set_is_const(is_const); 6026 result.set_is_const(is_const);
6021 result.set_is_abstract(is_abstract); 6027 result.set_is_abstract(is_abstract);
6022 result.set_is_external(is_external); 6028 result.set_is_external(is_external);
6023 result.set_is_native(is_native); 6029 result.set_is_native(is_native);
6024 result.set_is_visible(true); // Will be computed later. 6030 result.set_is_visible(true); // Will be computed later.
6025 result.set_is_intrinsic(false); 6031 result.set_is_intrinsic(false);
6026 result.set_is_recognized(false); 6032 result.set_is_recognized(false);
6027 result.set_is_redirecting(false); 6033 result.set_is_redirecting(false);
6028 result.set_owner(owner); 6034 result.set_owner(owner);
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
6543 return raw_ptr()->ic_data_array_; 6549 return raw_ptr()->ic_data_array_;
6544 } 6550 }
6545 6551
6546 void Function::ClearICData() const { 6552 void Function::ClearICData() const {
6547 set_ic_data_array(Array::Handle()); 6553 set_ic_data_array(Array::Handle());
6548 } 6554 }
6549 6555
6550 6556
6551 bool Function::CheckSourceFingerprint(int32_t fp) const { 6557 bool Function::CheckSourceFingerprint(int32_t fp) const {
6552 if (SourceFingerprint() != fp) { 6558 if (SourceFingerprint() != fp) {
6553 const bool recalculatingFingerprints = false; 6559 const bool recalculatingFingerprints = true;
6554 if (recalculatingFingerprints) { 6560 if (recalculatingFingerprints) {
6555 // This output can be copied into a file, then used with sed 6561 // This output can be copied into a file, then used with sed
6556 // to replace the old values. 6562 // to replace the old values.
6557 // sed -i .bak -f /tmp/newkeys runtime/vm/intrinsifier.h 6563 // sed -i .bak -f /tmp/newkeys runtime/vm/intrinsifier.h
6558 // sed -i .bak -f /tmp/newkeys runtime/vm/intermediate_language.h 6564 // sed -i .bak -f /tmp/newkeys runtime/vm/intermediate_language.h
6559 // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h 6565 // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h
6560 OS::Print("s/%d/%d/\n", fp, SourceFingerprint()); 6566 OS::Print("s/%d/%d/\n", fp, SourceFingerprint());
6561 } else { 6567 } else {
6562 OS::Print("FP mismatch while recognizing method %s:" 6568 OS::Print("FP mismatch while recognizing method %s:"
6563 " expecting %d found %d\n", 6569 " expecting %d found %d\n",
(...skipping 12516 matching lines...) Expand 10 before | Expand all | Expand 10 after
19080 return tag_label.ToCString(); 19086 return tag_label.ToCString();
19081 } 19087 }
19082 19088
19083 19089
19084 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 19090 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
19085 Instance::PrintJSONImpl(stream, ref); 19091 Instance::PrintJSONImpl(stream, ref);
19086 } 19092 }
19087 19093
19088 19094
19089 } // namespace dart 19095 } // 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