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/become.h" | 10 #include "vm/become.h" |
(...skipping 14793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14804 } | 14804 } |
14805 | 14805 |
14806 | 14806 |
14807 void ContextScope::SetTokenIndexAt(intptr_t scope_index, | 14807 void ContextScope::SetTokenIndexAt(intptr_t scope_index, |
14808 TokenPosition token_pos) const { | 14808 TokenPosition token_pos) const { |
14809 StoreSmi(&VariableDescAddr(scope_index)->token_pos, | 14809 StoreSmi(&VariableDescAddr(scope_index)->token_pos, |
14810 Smi::New(token_pos.value())); | 14810 Smi::New(token_pos.value())); |
14811 } | 14811 } |
14812 | 14812 |
14813 | 14813 |
| 14814 TokenPosition ContextScope::DeclarationTokenIndexAt( |
| 14815 intptr_t scope_index) const { |
| 14816 return TokenPosition( |
| 14817 Smi::Value(VariableDescAddr(scope_index)->declaration_token_pos)); |
| 14818 } |
| 14819 |
| 14820 |
| 14821 void ContextScope::SetDeclarationTokenIndexAt( |
| 14822 intptr_t scope_index, |
| 14823 TokenPosition declaration_token_pos) const { |
| 14824 StoreSmi(&VariableDescAddr(scope_index)->declaration_token_pos, |
| 14825 Smi::New(declaration_token_pos.value())); |
| 14826 } |
| 14827 |
| 14828 |
14814 RawString* ContextScope::NameAt(intptr_t scope_index) const { | 14829 RawString* ContextScope::NameAt(intptr_t scope_index) const { |
14815 return VariableDescAddr(scope_index)->name; | 14830 return VariableDescAddr(scope_index)->name; |
14816 } | 14831 } |
14817 | 14832 |
14818 | 14833 |
14819 void ContextScope::SetNameAt(intptr_t scope_index, const String& name) const { | 14834 void ContextScope::SetNameAt(intptr_t scope_index, const String& name) const { |
14820 StorePointer(&(VariableDescAddr(scope_index)->name), name.raw()); | 14835 StorePointer(&(VariableDescAddr(scope_index)->name), name.raw()); |
14821 } | 14836 } |
14822 | 14837 |
14823 | 14838 |
(...skipping 8191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23015 return UserTag::null(); | 23030 return UserTag::null(); |
23016 } | 23031 } |
23017 | 23032 |
23018 | 23033 |
23019 const char* UserTag::ToCString() const { | 23034 const char* UserTag::ToCString() const { |
23020 const String& tag_label = String::Handle(label()); | 23035 const String& tag_label = String::Handle(label()); |
23021 return tag_label.ToCString(); | 23036 return tag_label.ToCString(); |
23022 } | 23037 } |
23023 | 23038 |
23024 } // namespace dart | 23039 } // namespace dart |
OLD | NEW |