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

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

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/object.h ('k') | no next file » | 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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 5312 matching lines...) Expand 10 before | Expand all | Expand 10 after
5323 5323
5324 5324
5325 bool Script::HasSource() const { 5325 bool Script::HasSource() const {
5326 return raw_ptr()->source_ != String::null(); 5326 return raw_ptr()->source_ != String::null();
5327 } 5327 }
5328 5328
5329 5329
5330 RawString* Script::Source() const { 5330 RawString* Script::Source() const {
5331 String& source = String::Handle(raw_ptr()->source_); 5331 String& source = String::Handle(raw_ptr()->source_);
5332 if (source.IsNull()) { 5332 if (source.IsNull()) {
5333 const TokenStream& token_stream = TokenStream::Handle(tokens()); 5333 return GenerateSource();
5334 return token_stream.GenerateSource();
5335 } else {
5336 return raw_ptr()->source_;
5337 } 5334 }
5335 return raw_ptr()->source_;
5336 }
5337
5338
5339 RawString* Script::GenerateSource() const {
5340 const TokenStream& token_stream = TokenStream::Handle(tokens());
5341 return token_stream.GenerateSource();
5338 } 5342 }
5339 5343
5340 5344
5341 void Script::set_url(const String& value) const { 5345 void Script::set_url(const String& value) const {
5342 StorePointer(&raw_ptr()->url_, value.raw()); 5346 StorePointer(&raw_ptr()->url_, value.raw());
5343 } 5347 }
5344 5348
5345 5349
5346 void Script::set_source(const String& value) const { 5350 void Script::set_source(const String& value) const {
5347 StorePointer(&raw_ptr()->source_, value.raw()); 5351 StorePointer(&raw_ptr()->source_, value.raw());
(...skipping 8049 matching lines...) Expand 10 before | Expand all | Expand 10 after
13397 } 13401 }
13398 return result.raw(); 13402 return result.raw();
13399 } 13403 }
13400 13404
13401 13405
13402 const char* WeakProperty::ToCString() const { 13406 const char* WeakProperty::ToCString() const {
13403 return "_WeakProperty"; 13407 return "_WeakProperty";
13404 } 13408 }
13405 13409
13406 } // namespace dart 13410 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698