Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: runtime/vm/compiler.cc

Issue 343803002: Finishes removing intptr_t from raw object fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 function_fullname); 711 function_fullname);
712 const LocalVarDescriptors& var_descriptors = 712 const LocalVarDescriptors& var_descriptors =
713 LocalVarDescriptors::Handle(code.var_descriptors()); 713 LocalVarDescriptors::Handle(code.var_descriptors());
714 intptr_t var_desc_length = 714 intptr_t var_desc_length =
715 var_descriptors.IsNull() ? 0 : var_descriptors.Length(); 715 var_descriptors.IsNull() ? 0 : var_descriptors.Length();
716 String& var_name = String::Handle(); 716 String& var_name = String::Handle();
717 for (intptr_t i = 0; i < var_desc_length; i++) { 717 for (intptr_t i = 0; i < var_desc_length; i++) {
718 var_name = var_descriptors.GetName(i); 718 var_name = var_descriptors.GetName(i);
719 RawLocalVarDescriptors::VarInfo var_info; 719 RawLocalVarDescriptors::VarInfo var_info;
720 var_descriptors.GetInfo(i, &var_info); 720 var_descriptors.GetInfo(i, &var_info);
721 if (var_info.kind == RawLocalVarDescriptors::kSavedEntryContext) { 721 const int8_t kind = var_info.kind();
722 OS::Print(" saved caller's CTX reg offset %" Pd "\n", var_info.index); 722 if (kind == RawLocalVarDescriptors::kSavedEntryContext) {
723 } else if (var_info.kind == RawLocalVarDescriptors::kSavedCurrentContext) { 723 OS::Print(" saved caller's CTX reg offset %d\n", var_info.index());
724 OS::Print(" saved current CTX reg offset %" Pd "\n", var_info.index); 724 } else if (kind == RawLocalVarDescriptors::kSavedCurrentContext) {
725 OS::Print(" saved current CTX reg offset %d\n", var_info.index());
725 } else { 726 } else {
726 if (var_info.kind == RawLocalVarDescriptors::kContextLevel) { 727 if (kind == RawLocalVarDescriptors::kContextLevel) {
727 OS::Print(" context level %" Pd " scope %d", 728 OS::Print(" context level %d scope %d", var_info.index(),
728 var_info.index, var_info.scope_id); 729 var_info.scope_id);
729 } else if (var_info.kind == RawLocalVarDescriptors::kStackVar) { 730 } else if (kind == RawLocalVarDescriptors::kStackVar) {
730 OS::Print(" stack var '%s' offset %" Pd "", 731 OS::Print(" stack var '%s' offset %d",
731 var_name.ToCString(), var_info.index); 732 var_name.ToCString(), var_info.index());
732 } else { 733 } else {
733 ASSERT(var_info.kind == RawLocalVarDescriptors::kContextVar); 734 ASSERT(kind == RawLocalVarDescriptors::kContextVar);
734 OS::Print(" context var '%s' level %d offset %" Pd "", 735 OS::Print(" context var '%s' level %d offset %d",
735 var_name.ToCString(), var_info.scope_id, var_info.index); 736 var_name.ToCString(), var_info.scope_id, var_info.index());
736 } 737 }
737 OS::Print(" (valid %" Pd "-%" Pd ")\n", 738 OS::Print(" (valid %d-%d)\n", var_info.begin_pos, var_info.end_pos);
738 var_info.begin_pos, var_info.end_pos);
739 } 739 }
740 } 740 }
741 OS::Print("}\n"); 741 OS::Print("}\n");
742 742
743 OS::Print("Exception Handlers for function '%s' {\n", function_fullname); 743 OS::Print("Exception Handlers for function '%s' {\n", function_fullname);
744 const ExceptionHandlers& handlers = 744 const ExceptionHandlers& handlers =
745 ExceptionHandlers::Handle(code.exception_handlers()); 745 ExceptionHandlers::Handle(code.exception_handlers());
746 OS::Print("%s}\n", handlers.ToCString()); 746 OS::Print("%s}\n", handlers.ToCString());
747 747
748 { 748 {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 const Object& result = 1012 const Object& result =
1013 Object::Handle(isolate->object_store()->sticky_error()); 1013 Object::Handle(isolate->object_store()->sticky_error());
1014 isolate->object_store()->clear_sticky_error(); 1014 isolate->object_store()->clear_sticky_error();
1015 return result.raw(); 1015 return result.raw();
1016 } 1016 }
1017 UNREACHABLE(); 1017 UNREACHABLE();
1018 return Object::null(); 1018 return Object::null();
1019 } 1019 }
1020 1020
1021 } // namespace dart 1021 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698