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

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

Issue 695483003: Remove saving/restoring of the context at function entry. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 const LocalVarDescriptors& var_descriptors = 754 const LocalVarDescriptors& var_descriptors =
755 LocalVarDescriptors::Handle(code.var_descriptors()); 755 LocalVarDescriptors::Handle(code.var_descriptors());
756 intptr_t var_desc_length = 756 intptr_t var_desc_length =
757 var_descriptors.IsNull() ? 0 : var_descriptors.Length(); 757 var_descriptors.IsNull() ? 0 : var_descriptors.Length();
758 String& var_name = String::Handle(); 758 String& var_name = String::Handle();
759 for (intptr_t i = 0; i < var_desc_length; i++) { 759 for (intptr_t i = 0; i < var_desc_length; i++) {
760 var_name = var_descriptors.GetName(i); 760 var_name = var_descriptors.GetName(i);
761 RawLocalVarDescriptors::VarInfo var_info; 761 RawLocalVarDescriptors::VarInfo var_info;
762 var_descriptors.GetInfo(i, &var_info); 762 var_descriptors.GetInfo(i, &var_info);
763 const int8_t kind = var_info.kind(); 763 const int8_t kind = var_info.kind();
764 if (kind == RawLocalVarDescriptors::kSavedEntryContext) { 764 if (kind == RawLocalVarDescriptors::kSavedCurrentContext) {
765 OS::Print(" saved caller's CTX reg offset %d\n", var_info.index());
766 } else if (kind == RawLocalVarDescriptors::kSavedCurrentContext) {
767 OS::Print(" saved current CTX reg offset %d\n", var_info.index()); 765 OS::Print(" saved current CTX reg offset %d\n", var_info.index());
768 } else { 766 } else {
769 if (kind == RawLocalVarDescriptors::kContextLevel) { 767 if (kind == RawLocalVarDescriptors::kContextLevel) {
770 OS::Print(" context level %d scope %d", var_info.index(), 768 OS::Print(" context level %d scope %d", var_info.index(),
771 var_info.scope_id); 769 var_info.scope_id);
772 } else if (kind == RawLocalVarDescriptors::kStackVar) { 770 } else if (kind == RawLocalVarDescriptors::kStackVar) {
773 OS::Print(" stack var '%s' offset %d", 771 OS::Print(" stack var '%s' offset %d",
774 var_name.ToCString(), var_info.index()); 772 var_name.ToCString(), var_info.index());
775 } else { 773 } else {
776 ASSERT(kind == RawLocalVarDescriptors::kContextVar); 774 ASSERT(kind == RawLocalVarDescriptors::kContextVar);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 const Object& result = 1062 const Object& result =
1065 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1063 PassiveObject::Handle(isolate->object_store()->sticky_error());
1066 isolate->object_store()->clear_sticky_error(); 1064 isolate->object_store()->clear_sticky_error();
1067 return result.raw(); 1065 return result.raw();
1068 } 1066 }
1069 UNREACHABLE(); 1067 UNREACHABLE();
1070 return Object::null(); 1068 return Object::null();
1071 } 1069 }
1072 1070
1073 } // namespace dart 1071 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698