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

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

Issue 1054393003: Compress deopt instructions in memory using variable length encoding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix other architectures Created 5 years, 8 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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 const PcDescriptors& descriptors = 838 const PcDescriptors& descriptors =
839 PcDescriptors::Handle(code.pc_descriptors()); 839 PcDescriptors::Handle(code.pc_descriptors());
840 ISL_Print("%s}\n", descriptors.ToCString()); 840 ISL_Print("%s}\n", descriptors.ToCString());
841 841
842 uword start = Instructions::Handle(code.instructions()).EntryPoint(); 842 uword start = Instructions::Handle(code.instructions()).EntryPoint();
843 const Array& deopt_table = Array::Handle(code.deopt_info_array()); 843 const Array& deopt_table = Array::Handle(code.deopt_info_array());
844 intptr_t deopt_table_length = DeoptTable::GetLength(deopt_table); 844 intptr_t deopt_table_length = DeoptTable::GetLength(deopt_table);
845 if (deopt_table_length > 0) { 845 if (deopt_table_length > 0) {
846 ISL_Print("DeoptInfo: {\n"); 846 ISL_Print("DeoptInfo: {\n");
847 Smi& offset = Smi::Handle(); 847 Smi& offset = Smi::Handle();
848 DeoptInfo& info = DeoptInfo::Handle(); 848 TypedData& info = TypedData::Handle();
849 Smi& reason_and_flags = Smi::Handle(); 849 Smi& reason_and_flags = Smi::Handle();
850 for (intptr_t i = 0; i < deopt_table_length; ++i) { 850 for (intptr_t i = 0; i < deopt_table_length; ++i) {
851 DeoptTable::GetEntry(deopt_table, i, &offset, &info, &reason_and_flags); 851 DeoptTable::GetEntry(deopt_table, i, &offset, &info, &reason_and_flags);
852 const intptr_t reason = 852 const intptr_t reason =
853 DeoptTable::ReasonField::decode(reason_and_flags.Value()); 853 DeoptTable::ReasonField::decode(reason_and_flags.Value());
854 ASSERT((0 <= reason) && (reason < ICData::kDeoptNumReasons)); 854 ASSERT((0 <= reason) && (reason < ICData::kDeoptNumReasons));
855 ISL_Print("%4" Pd ": 0x%" Px " %s (%s)\n", 855 ISL_Print("%4" Pd ": 0x%" Px " %s (%s)\n",
856 i, 856 i,
857 start + offset.Value(), 857 start + offset.Value(),
858 info.ToCString(), 858 DeoptInfo::ToCString(deopt_table, info),
859 DeoptReasonToCString( 859 DeoptReasonToCString(
860 static_cast<ICData::DeoptReasonId>(reason))); 860 static_cast<ICData::DeoptReasonId>(reason)));
861 } 861 }
862 ISL_Print("}\n"); 862 ISL_Print("}\n");
863 } 863 }
864 864
865 const Array& object_table = Array::Handle(code.object_table()); 865 const Array& object_table = Array::Handle(code.object_table());
866 if (object_table.Length() > 0) { 866 if (object_table.Length() > 0) {
867 ISL_Print("Object Table: {\n"); 867 ISL_Print("Object Table: {\n");
868 for (intptr_t i = 0; i < object_table.Length(); i++) { 868 for (intptr_t i = 0; i < object_table.Length(); i++) {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 const Object& result = 1269 const Object& result =
1270 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1270 PassiveObject::Handle(isolate->object_store()->sticky_error());
1271 isolate->object_store()->clear_sticky_error(); 1271 isolate->object_store()->clear_sticky_error();
1272 return result.raw(); 1272 return result.raw();
1273 } 1273 }
1274 UNREACHABLE(); 1274 UNREACHABLE();
1275 return Object::null(); 1275 return Object::null();
1276 } 1276 }
1277 1277
1278 } // namespace dart 1278 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698