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 #ifndef RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
| 6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3548 } | 3548 } |
| 3549 void set_compile_time_constants(const Array& value) const; | 3549 void set_compile_time_constants(const Array& value) const; |
| 3550 | 3550 |
| 3551 RawTokenStream* tokens() const { | 3551 RawTokenStream* tokens() const { |
| 3552 ASSERT(kind() != RawScript::kKernelTag); | 3552 ASSERT(kind() != RawScript::kKernelTag); |
| 3553 return raw_ptr()->tokens_; | 3553 return raw_ptr()->tokens_; |
| 3554 } | 3554 } |
| 3555 | 3555 |
| 3556 void set_line_starts(const Array& value) const; | 3556 void set_line_starts(const Array& value) const; |
| 3557 | 3557 |
| 3558 void set_tokens_seen(const Array& value) const; | |
|
Kevin Millikin (Google)
2017/01/24 13:44:13
I don't really like the name. They're not tokens,
jensj
2017/01/25 12:52:22
Done.
| |
| 3559 | |
| 3560 void set_yields_seen(const Array& value) const; | |
| 3561 | |
| 3562 RawArray* yields_seen() const { return raw_ptr()->yields_seen_; } | |
| 3563 | |
| 3558 void Tokenize(const String& private_key, bool use_shared_tokens = true) const; | 3564 void Tokenize(const String& private_key, bool use_shared_tokens = true) const; |
| 3559 | 3565 |
| 3560 RawLibrary* FindLibrary() const; | 3566 RawLibrary* FindLibrary() const; |
| 3561 RawString* GetLine(intptr_t line_number, | 3567 RawString* GetLine(intptr_t line_number, |
| 3562 Heap::Space space = Heap::kNew) const; | 3568 Heap::Space space = Heap::kNew) const; |
| 3563 RawString* GetSnippet(TokenPosition from, TokenPosition to) const; | 3569 RawString* GetSnippet(TokenPosition from, TokenPosition to) const; |
| 3564 RawString* GetSnippet(intptr_t from_line, | 3570 RawString* GetSnippet(intptr_t from_line, |
| 3565 intptr_t from_column, | 3571 intptr_t from_column, |
| 3566 intptr_t to_line, | 3572 intptr_t to_line, |
| 3567 intptr_t to_column) const; | 3573 intptr_t to_column) const; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 3598 RawScript::Kind kind); | 3604 RawScript::Kind kind); |
| 3599 | 3605 |
| 3600 private: | 3606 private: |
| 3601 void set_url(const String& value) const; | 3607 void set_url(const String& value) const; |
| 3602 void set_resolved_url(const String& value) const; | 3608 void set_resolved_url(const String& value) const; |
| 3603 void set_source(const String& value) const; | 3609 void set_source(const String& value) const; |
| 3604 void set_kind(RawScript::Kind value) const; | 3610 void set_kind(RawScript::Kind value) const; |
| 3605 void set_load_timestamp(int64_t value) const; | 3611 void set_load_timestamp(int64_t value) const; |
| 3606 void set_tokens(const TokenStream& value) const; | 3612 void set_tokens(const TokenStream& value) const; |
| 3607 RawArray* line_starts() const { return raw_ptr()->line_starts_; } | 3613 RawArray* line_starts() const { return raw_ptr()->line_starts_; } |
| 3614 RawArray* tokens_seen() const { return raw_ptr()->tokens_seen_; } | |
| 3608 | 3615 |
| 3609 static RawScript* New(); | 3616 static RawScript* New(); |
| 3610 | 3617 |
| 3611 FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object); | 3618 FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object); |
| 3612 friend class Class; | 3619 friend class Class; |
| 3613 friend class Precompiler; | 3620 friend class Precompiler; |
| 3614 }; | 3621 }; |
| 3615 | 3622 |
| 3616 | 3623 |
| 3617 class DictionaryIterator : public ValueObject { | 3624 class DictionaryIterator : public ValueObject { |
| (...skipping 5320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8938 | 8945 |
| 8939 inline void TypeArguments::SetHash(intptr_t value) const { | 8946 inline void TypeArguments::SetHash(intptr_t value) const { |
| 8940 // This is only safe because we create a new Smi, which does not cause | 8947 // This is only safe because we create a new Smi, which does not cause |
| 8941 // heap allocation. | 8948 // heap allocation. |
| 8942 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8949 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
| 8943 } | 8950 } |
| 8944 | 8951 |
| 8945 } // namespace dart | 8952 } // namespace dart |
| 8946 | 8953 |
| 8947 #endif // RUNTIME_VM_OBJECT_H_ | 8954 #endif // RUNTIME_VM_OBJECT_H_ |
| OLD | NEW |