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 14783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14794 } | 14794 } |
14795 | 14795 |
14796 | 14796 |
14797 void ContextScope::SetTokenIndexAt(intptr_t scope_index, | 14797 void ContextScope::SetTokenIndexAt(intptr_t scope_index, |
14798 TokenPosition token_pos) const { | 14798 TokenPosition token_pos) const { |
14799 StoreSmi(&VariableDescAddr(scope_index)->token_pos, | 14799 StoreSmi(&VariableDescAddr(scope_index)->token_pos, |
14800 Smi::New(token_pos.value())); | 14800 Smi::New(token_pos.value())); |
14801 } | 14801 } |
14802 | 14802 |
14803 | 14803 |
| 14804 TokenPosition ContextScope::DeclarationTokenIndexAt( |
| 14805 intptr_t scope_index) const { |
| 14806 return TokenPosition( |
| 14807 Smi::Value(VariableDescAddr(scope_index)->declaration_token_pos)); |
| 14808 } |
| 14809 |
| 14810 |
| 14811 void ContextScope::SetDeclarationTokenIndexAt( |
| 14812 intptr_t scope_index, |
| 14813 TokenPosition declaration_token_pos) const { |
| 14814 StoreSmi(&VariableDescAddr(scope_index)->declaration_token_pos, |
| 14815 Smi::New(declaration_token_pos.value())); |
| 14816 } |
| 14817 |
| 14818 |
14804 RawString* ContextScope::NameAt(intptr_t scope_index) const { | 14819 RawString* ContextScope::NameAt(intptr_t scope_index) const { |
14805 return VariableDescAddr(scope_index)->name; | 14820 return VariableDescAddr(scope_index)->name; |
14806 } | 14821 } |
14807 | 14822 |
14808 | 14823 |
14809 void ContextScope::SetNameAt(intptr_t scope_index, const String& name) const { | 14824 void ContextScope::SetNameAt(intptr_t scope_index, const String& name) const { |
14810 StorePointer(&(VariableDescAddr(scope_index)->name), name.raw()); | 14825 StorePointer(&(VariableDescAddr(scope_index)->name), name.raw()); |
14811 } | 14826 } |
14812 | 14827 |
14813 | 14828 |
(...skipping 8190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23004 return UserTag::null(); | 23019 return UserTag::null(); |
23005 } | 23020 } |
23006 | 23021 |
23007 | 23022 |
23008 const char* UserTag::ToCString() const { | 23023 const char* UserTag::ToCString() const { |
23009 const String& tag_label = String::Handle(label()); | 23024 const String& tag_label = String::Handle(label()); |
23010 return tag_label.ToCString(); | 23025 return tag_label.ToCString(); |
23011 } | 23026 } |
23012 | 23027 |
23013 } // namespace dart | 23028 } // namespace dart |
OLD | NEW |