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/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 function_fullname); | 732 function_fullname); |
733 const LocalVarDescriptors& var_descriptors = | 733 const LocalVarDescriptors& var_descriptors = |
734 LocalVarDescriptors::Handle(code.var_descriptors()); | 734 LocalVarDescriptors::Handle(code.var_descriptors()); |
735 intptr_t var_desc_length = | 735 intptr_t var_desc_length = |
736 var_descriptors.IsNull() ? 0 : var_descriptors.Length(); | 736 var_descriptors.IsNull() ? 0 : var_descriptors.Length(); |
737 String& var_name = String::Handle(); | 737 String& var_name = String::Handle(); |
738 for (intptr_t i = 0; i < var_desc_length; i++) { | 738 for (intptr_t i = 0; i < var_desc_length; i++) { |
739 var_name = var_descriptors.GetName(i); | 739 var_name = var_descriptors.GetName(i); |
740 RawLocalVarDescriptors::VarInfo var_info; | 740 RawLocalVarDescriptors::VarInfo var_info; |
741 var_descriptors.GetInfo(i, &var_info); | 741 var_descriptors.GetInfo(i, &var_info); |
742 if (var_info.kind == RawLocalVarDescriptors::kSavedEntryContext) { | 742 const int8_t kind = var_info.kind(); |
743 OS::Print(" saved caller's CTX reg offset %" Pd "\n", var_info.index); | 743 if (kind == RawLocalVarDescriptors::kSavedEntryContext) { |
744 } else if (var_info.kind == RawLocalVarDescriptors::kSavedCurrentContext) { | 744 OS::Print(" saved caller's CTX reg offset %d\n", var_info.index()); |
745 OS::Print(" saved current CTX reg offset %" Pd "\n", var_info.index); | 745 } else if (kind == RawLocalVarDescriptors::kSavedCurrentContext) { |
| 746 OS::Print(" saved current CTX reg offset %d\n", var_info.index()); |
746 } else { | 747 } else { |
747 if (var_info.kind == RawLocalVarDescriptors::kContextLevel) { | 748 if (kind == RawLocalVarDescriptors::kContextLevel) { |
748 OS::Print(" context level %" Pd " scope %d", | 749 OS::Print(" context level %d scope %d", var_info.index(), |
749 var_info.index, var_info.scope_id); | 750 var_info.scope_id); |
750 } else if (var_info.kind == RawLocalVarDescriptors::kStackVar) { | 751 } else if (kind == RawLocalVarDescriptors::kStackVar) { |
751 OS::Print(" stack var '%s' offset %" Pd "", | 752 OS::Print(" stack var '%s' offset %d", |
752 var_name.ToCString(), var_info.index); | 753 var_name.ToCString(), var_info.index()); |
753 } else { | 754 } else { |
754 ASSERT(var_info.kind == RawLocalVarDescriptors::kContextVar); | 755 ASSERT(kind == RawLocalVarDescriptors::kContextVar); |
755 OS::Print(" context var '%s' level %d offset %" Pd "", | 756 OS::Print(" context var '%s' level %d offset %d", |
756 var_name.ToCString(), var_info.scope_id, var_info.index); | 757 var_name.ToCString(), var_info.scope_id, var_info.index()); |
757 } | 758 } |
758 OS::Print(" (valid %" Pd "-%" Pd ")\n", | 759 OS::Print(" (valid %d-%d)\n", var_info.begin_pos, var_info.end_pos); |
759 var_info.begin_pos, var_info.end_pos); | |
760 } | 760 } |
761 } | 761 } |
762 OS::Print("}\n"); | 762 OS::Print("}\n"); |
763 | 763 |
764 OS::Print("Exception Handlers for function '%s' {\n", function_fullname); | 764 OS::Print("Exception Handlers for function '%s' {\n", function_fullname); |
765 const ExceptionHandlers& handlers = | 765 const ExceptionHandlers& handlers = |
766 ExceptionHandlers::Handle(code.exception_handlers()); | 766 ExceptionHandlers::Handle(code.exception_handlers()); |
767 OS::Print("%s}\n", handlers.ToCString()); | 767 OS::Print("%s}\n", handlers.ToCString()); |
768 | 768 |
769 { | 769 { |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 const Object& result = | 1033 const Object& result = |
1034 PassiveObject::Handle(isolate->object_store()->sticky_error()); | 1034 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
1035 isolate->object_store()->clear_sticky_error(); | 1035 isolate->object_store()->clear_sticky_error(); |
1036 return result.raw(); | 1036 return result.raw(); |
1037 } | 1037 } |
1038 UNREACHABLE(); | 1038 UNREACHABLE(); |
1039 return Object::null(); | 1039 return Object::null(); |
1040 } | 1040 } |
1041 | 1041 |
1042 } // namespace dart | 1042 } // namespace dart |
OLD | NEW |