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

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

Issue 11824067: Support for embedded Dart scripts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 666
667 private: 667 private:
668 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); 668 RAW_HEAP_OBJECT_IMPLEMENTATION(Script);
669 669
670 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } 670 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); }
671 RawString* url_; 671 RawString* url_;
672 RawString* source_; 672 RawString* source_;
673 RawTokenStream* tokens_; 673 RawTokenStream* tokens_;
674 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); } 674 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); }
675 675
676 Kind kind_; 676 int32_t line_offset_;
677 int32_t col_offset_;
678 int8_t kind_; // Of type Kind.
Ivan Posva 2013/01/10 20:16:33 I understand the reason for the static_cast now!
hausner 2013/01/10 20:22:32 Ok :)
677 }; 679 };
678 680
679 681
680 class RawLibrary : public RawObject { 682 class RawLibrary : public RawObject {
681 enum LibraryState { 683 enum LibraryState {
682 kAllocated, // Initial state. 684 kAllocated, // Initial state.
683 kLoadInProgress, // Library is in the process of being loaded. 685 kLoadInProgress, // Library is in the process of being loaded.
684 kLoaded, // Library is loaded. 686 kLoaded, // Library is loaded.
685 kLoadError, // Error occurred during load of the Library. 687 kLoadError, // Error occurred during load of the Library.
686 }; 688 };
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && 1688 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
1687 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && 1689 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
1688 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && 1690 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
1689 kStacktraceCid == kExternalInt8ArrayCid + 11); 1691 kStacktraceCid == kExternalInt8ArrayCid + 11);
1690 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1692 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1691 } 1693 }
1692 1694
1693 } // namespace dart 1695 } // namespace dart
1694 1696
1695 #endif // VM_RAW_OBJECT_H_ 1697 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698