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

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

Issue 13093012: More cleanup in preparation for removing support for dart:scalarlist in the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 FINAL_HEAP_OBJECT_IMPLEMENTATION(LiteralToken, Object); 1891 FINAL_HEAP_OBJECT_IMPLEMENTATION(LiteralToken, Object);
1892 friend class Class; 1892 friend class Class;
1893 }; 1893 };
1894 1894
1895 1895
1896 class TokenStream : public Object { 1896 class TokenStream : public Object {
1897 public: 1897 public:
1898 RawArray* TokenObjects() const; 1898 RawArray* TokenObjects() const;
1899 void SetTokenObjects(const Array& value) const; 1899 void SetTokenObjects(const Array& value) const;
1900 1900
1901 RawExternalUint8Array* GetStream() const; 1901 RawExternalTypedData* GetStream() const;
1902 void SetStream(const ExternalUint8Array& stream) const; 1902 void SetStream(const ExternalTypedData& stream) const;
1903 1903
1904 RawString* GenerateSource() const; 1904 RawString* GenerateSource() const;
1905 intptr_t ComputeSourcePosition(intptr_t tok_pos) const; 1905 intptr_t ComputeSourcePosition(intptr_t tok_pos) const;
1906 intptr_t ComputeTokenPosition(intptr_t src_pos) const; 1906 intptr_t ComputeTokenPosition(intptr_t src_pos) const;
1907 1907
1908 RawString* PrivateKey() const; 1908 RawString* PrivateKey() const;
1909 1909
1910 static const intptr_t kBytesPerElement = 1; 1910 static const intptr_t kBytesPerElement = 1;
1911 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; 1911 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
1912 1912
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 private: 1945 private:
1946 // Read token from the token stream (could be a simple token or an index 1946 // Read token from the token stream (could be a simple token or an index
1947 // into the token objects array for IDENT or literal tokens). 1947 // into the token objects array for IDENT or literal tokens).
1948 intptr_t ReadToken() { 1948 intptr_t ReadToken() {
1949 int64_t value = stream_.ReadUnsigned(); 1949 int64_t value = stream_.ReadUnsigned();
1950 ASSERT((value >= 0) && (value <= kIntptrMax)); 1950 ASSERT((value >= 0) && (value <= kIntptrMax));
1951 return static_cast<intptr_t>(value); 1951 return static_cast<intptr_t>(value);
1952 } 1952 }
1953 1953
1954 TokenStream& tokens_; 1954 TokenStream& tokens_;
1955 ExternalUint8Array& data_; 1955 ExternalTypedData& data_;
1956 ReadStream stream_; 1956 ReadStream stream_;
1957 Array& token_objects_; 1957 Array& token_objects_;
1958 Object& obj_; 1958 Object& obj_;
1959 intptr_t cur_token_pos_; 1959 intptr_t cur_token_pos_;
1960 Token::Kind cur_token_kind_; 1960 Token::Kind cur_token_kind_;
1961 intptr_t cur_token_obj_index_; 1961 intptr_t cur_token_obj_index_;
1962 }; 1962 };
1963 1963
1964 private: 1964 private:
1965 void SetPrivateKey(const String& value) const; 1965 void SetPrivateKey(const String& value) const;
(...skipping 4967 matching lines...) Expand 10 before | Expand all | Expand 10 after
6933 6933
6934 6934
6935 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6935 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6936 intptr_t index) { 6936 intptr_t index) {
6937 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6937 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6938 } 6938 }
6939 6939
6940 } // namespace dart 6940 } // namespace dart
6941 6941
6942 #endif // VM_OBJECT_H_ 6942 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698