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

Side by Side Diff: runtime/vm/raw_object.h

Issue 362153002: Transform functions marked as async (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
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 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 kImplicitGetter, // represents an implicit getter for fields. 608 kImplicitGetter, // represents an implicit getter for fields.
609 kImplicitSetter, // represents an implicit setter for fields. 609 kImplicitSetter, // represents an implicit setter for fields.
610 kImplicitStaticFinalGetter, // represents an implicit getter for static 610 kImplicitStaticFinalGetter, // represents an implicit getter for static
611 // final fields (incl. static const fields). 611 // final fields (incl. static const fields).
612 kStaticInitializer, // used in implicit static getters. 612 kStaticInitializer, // used in implicit static getters.
613 kMethodExtractor, // converts method into implicit closure on the receiver. 613 kMethodExtractor, // converts method into implicit closure on the receiver.
614 kNoSuchMethodDispatcher, // invokes noSuchMethod. 614 kNoSuchMethodDispatcher, // invokes noSuchMethod.
615 kInvokeFieldDispatcher, // invokes a field as a closure. 615 kInvokeFieldDispatcher, // invokes a field as a closure.
616 }; 616 };
617 617
618 enum AsyncModifier {
619 kNoModifier,
620 kAsync,
621 };
622
618 private: 623 private:
619 // So that the MarkingVisitor::DetachCode can null out the code fields. 624 // So that the MarkingVisitor::DetachCode can null out the code fields.
620 friend class MarkingVisitor; 625 friend class MarkingVisitor;
621 friend class Class; 626 friend class Class;
622 RAW_HEAP_OBJECT_IMPLEMENTATION(Function); 627 RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
623 static bool SkipCode(RawFunction* raw_fun); 628 static bool SkipCode(RawFunction* raw_fun);
624 629
625 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 630 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
626 RawString* name_; 631 RawString* name_;
627 RawObject* owner_; // Class or patch class or mixin class 632 RawObject* owner_; // Class or patch class or mixin class
(...skipping 15 matching lines...) Expand all
643 RawObject** to() { 648 RawObject** to() {
644 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); 649 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
645 } 650 }
646 651
647 int32_t token_pos_; 652 int32_t token_pos_;
648 int32_t end_token_pos_; 653 int32_t end_token_pos_;
649 int32_t usage_counter_; // Incremented while function is running. 654 int32_t usage_counter_; // Incremented while function is running.
650 int16_t num_fixed_parameters_; 655 int16_t num_fixed_parameters_;
651 int16_t num_optional_parameters_; // > 0: positional; < 0: named. 656 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
652 int16_t deoptimization_counter_; 657 int16_t deoptimization_counter_;
653 uint16_t kind_tag_; // See Function::KindTagBits. 658 uint32_t kind_tag_; // See Function::KindTagBits.
654 uint16_t optimized_instruction_count_; 659 uint16_t optimized_instruction_count_;
655 uint16_t optimized_call_site_count_; 660 uint16_t optimized_call_site_count_;
656 }; 661 };
657 662
658 663
659 class RawClosureData : public RawObject { 664 class RawClosureData : public RawObject {
660 private: 665 private:
661 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); 666 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData);
662 667
663 RawObject** from() { 668 RawObject** from() {
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 1975 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
1971 kTypedDataInt8ArrayViewCid + 15); 1976 kTypedDataInt8ArrayViewCid + 15);
1972 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 1977 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
1973 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 1978 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
1974 return (kNullCid - kTypedDataInt8ArrayCid); 1979 return (kNullCid - kTypedDataInt8ArrayCid);
1975 } 1980 }
1976 1981
1977 } // namespace dart 1982 } // namespace dart
1978 1983
1979 #endif // VM_RAW_OBJECT_H_ 1984 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698