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

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

Issue 12517005: Add a command line option to generate source code for a script (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 | « runtime/vm/debugger_api_impl.cc ('k') | 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 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 FINAL_HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object); 1923 FINAL_HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object);
1924 friend class Class; 1924 friend class Class;
1925 }; 1925 };
1926 1926
1927 1927
1928 class Script : public Object { 1928 class Script : public Object {
1929 public: 1929 public:
1930 RawString* url() const { return raw_ptr()->url_; } 1930 RawString* url() const { return raw_ptr()->url_; }
1931 bool HasSource() const; 1931 bool HasSource() const;
1932 RawString* Source() const; 1932 RawString* Source() const;
1933 RawString* GenerateSource() const; // Generates source code from Tokenstream.
1933 RawScript::Kind kind() const { 1934 RawScript::Kind kind() const {
1934 return static_cast<RawScript::Kind>(raw_ptr()->kind_); 1935 return static_cast<RawScript::Kind>(raw_ptr()->kind_);
1935 } 1936 }
1936 intptr_t line_offset() const { return raw_ptr()->line_offset_; } 1937 intptr_t line_offset() const { return raw_ptr()->line_offset_; }
1937 intptr_t col_offset() const { return raw_ptr()->col_offset_; } 1938 intptr_t col_offset() const { return raw_ptr()->col_offset_; }
1938 1939
1939 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } 1940 RawTokenStream* tokens() const { return raw_ptr()->tokens_; }
1940 1941
1941 void Tokenize(const String& private_key) const; 1942 void Tokenize(const String& private_key) const;
1942 1943
(...skipping 4885 matching lines...) Expand 10 before | Expand all | Expand 10 after
6828 6829
6829 6830
6830 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6831 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6831 intptr_t index) { 6832 intptr_t index) {
6832 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6833 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6833 } 6834 }
6834 6835
6835 } // namespace dart 6836 } // namespace dart
6836 6837
6837 #endif // VM_OBJECT_H_ 6838 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698