Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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(); |
|
bakster
2013/03/14 08:42:16
Why do you have an else part after return?
if (so
siva
2013/03/14 09:38:46
Done.
| |
| 5334 return token_stream.GenerateSource(); | |
| 5335 } else { | 5334 } else { |
| 5336 return raw_ptr()->source_; | 5335 return raw_ptr()->source_; |
| 5337 } | 5336 } |
| 5338 } | 5337 } |
| 5339 | 5338 |
| 5340 | 5339 |
| 5340 RawString* Script::GenerateSource() const { | |
| 5341 const TokenStream& token_stream = TokenStream::Handle(tokens()); | |
| 5342 return token_stream.GenerateSource(); | |
| 5343 } | |
| 5344 | |
| 5345 | |
| 5341 void Script::set_url(const String& value) const { | 5346 void Script::set_url(const String& value) const { |
| 5342 StorePointer(&raw_ptr()->url_, value.raw()); | 5347 StorePointer(&raw_ptr()->url_, value.raw()); |
| 5343 } | 5348 } |
| 5344 | 5349 |
| 5345 | 5350 |
| 5346 void Script::set_source(const String& value) const { | 5351 void Script::set_source(const String& value) const { |
| 5347 StorePointer(&raw_ptr()->source_, value.raw()); | 5352 StorePointer(&raw_ptr()->source_, value.raw()); |
| 5348 } | 5353 } |
| 5349 | 5354 |
| 5350 | 5355 |
| (...skipping 8046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 13397 } | 13402 } |
| 13398 return result.raw(); | 13403 return result.raw(); |
| 13399 } | 13404 } |
| 13400 | 13405 |
| 13401 | 13406 |
| 13402 const char* WeakProperty::ToCString() const { | 13407 const char* WeakProperty::ToCString() const { |
| 13403 return "_WeakProperty"; | 13408 return "_WeakProperty"; |
| 13404 } | 13409 } |
| 13405 | 13410 |
| 13406 } // namespace dart | 13411 } // namespace dart |
| OLD | NEW |