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

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: 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 #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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 kImplicitGetter, // represents an implicit getter for fields. 602 kImplicitGetter, // represents an implicit getter for fields.
603 kImplicitSetter, // represents an implicit setter for fields. 603 kImplicitSetter, // represents an implicit setter for fields.
604 kImplicitStaticFinalGetter, // represents an implicit getter for static 604 kImplicitStaticFinalGetter, // represents an implicit getter for static
605 // final fields (incl. static const fields). 605 // final fields (incl. static const fields).
606 kStaticInitializer, // used in implicit static getters. 606 kStaticInitializer, // used in implicit static getters.
607 kMethodExtractor, // converts method into implicit closure on the receiver. 607 kMethodExtractor, // converts method into implicit closure on the receiver.
608 kNoSuchMethodDispatcher, // invokes noSuchMethod. 608 kNoSuchMethodDispatcher, // invokes noSuchMethod.
609 kInvokeFieldDispatcher, // invokes a field as a closure. 609 kInvokeFieldDispatcher, // invokes a field as a closure.
610 }; 610 };
611 611
612 enum Modifier {
613 kNoModifier,
614 kAsync,
615 };
616
612 private: 617 private:
613 // So that the MarkingVisitor::DetachCode can null out the code fields. 618 // So that the MarkingVisitor::DetachCode can null out the code fields.
614 friend class MarkingVisitor; 619 friend class MarkingVisitor;
615 friend class Class; 620 friend class Class;
616 RAW_HEAP_OBJECT_IMPLEMENTATION(Function); 621 RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
617 static bool SkipCode(RawFunction* raw_fun); 622 static bool SkipCode(RawFunction* raw_fun);
618 623
619 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 624 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
620 RawString* name_; 625 RawString* name_;
621 RawObject* owner_; // Class or patch class or mixin class 626 RawObject* owner_; // Class or patch class or mixin class
(...skipping 15 matching lines...) Expand all
637 RawObject** to() { 642 RawObject** to() {
638 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); 643 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
639 } 644 }
640 645
641 int32_t token_pos_; 646 int32_t token_pos_;
642 int32_t end_token_pos_; 647 int32_t end_token_pos_;
643 int32_t usage_counter_; // Incremented while function is running. 648 int32_t usage_counter_; // Incremented while function is running.
644 int16_t num_fixed_parameters_; 649 int16_t num_fixed_parameters_;
645 int16_t num_optional_parameters_; // > 0: positional; < 0: named. 650 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
646 int16_t deoptimization_counter_; 651 int16_t deoptimization_counter_;
647 uint16_t kind_tag_; // See Function::KindTagBits. 652 uint32_t kind_tag_; // See Function::KindTagBits.
648 uint16_t optimized_instruction_count_; 653 uint16_t optimized_instruction_count_;
649 uint16_t optimized_call_site_count_; 654 uint16_t optimized_call_site_count_;
650 }; 655 };
651 656
652 657
653 class RawClosureData : public RawObject { 658 class RawClosureData : public RawObject {
654 private: 659 private:
655 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); 660 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData);
656 661
657 RawObject** from() { 662 RawObject** from() {
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); 1902 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14);
1898 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 1903 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
1899 kTypedDataInt8ArrayViewCid + 15); 1904 kTypedDataInt8ArrayViewCid + 15);
1900 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); 1905 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14);
1901 return (kNullCid - kTypedDataInt8ArrayCid); 1906 return (kNullCid - kTypedDataInt8ArrayCid);
1902 } 1907 }
1903 1908
1904 } // namespace dart 1909 } // namespace dart
1905 1910
1906 #endif // VM_RAW_OBJECT_H_ 1911 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698