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

Side by Side Diff: src/objects.cc

Issue 5699002: RFC: Switch to ast ids (instead of positions) for type feedback. (Closed)
Patch Set: Cleanup Created 10 years 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5682 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 // TODO(3025757): In case the recompiled isn't equivalent to the 5693 // TODO(3025757): In case the recompiled isn't equivalent to the
5694 // old code, we have to replace it. We should try to avoid this 5694 // old code, we have to replace it. We should try to avoid this
5695 // altogether because it flushes valuable type feedback by 5695 // altogether because it flushes valuable type feedback by
5696 // effectively resetting all IC state. 5696 // effectively resetting all IC state.
5697 set_code(recompiled); 5697 set_code(recompiled);
5698 } 5698 }
5699 ASSERT(has_deoptimization_support()); 5699 ASSERT(has_deoptimization_support());
5700 } 5700 }
5701 5701
5702 5702
5703 bool SharedFunctionInfo::VerifyBailoutId(int id) { 5703 bool SharedFunctionInfo::VerifyBailoutId(AstId id) {
5704 // TODO(srdjan): debugging ARM crashes in hydrogen. OK to disable while 5704 // TODO(srdjan): debugging ARM crashes in hydrogen. OK to disable while
5705 // we are always bailing out on ARM. 5705 // we are always bailing out on ARM.
5706 5706
5707 ASSERT(id != AstNode::kNoNumber); 5707 ASSERT(id != kNoAstId);
5708 Code* unoptimized = code(); 5708 Code* unoptimized = code();
5709 DeoptimizationOutputData* data = 5709 DeoptimizationOutputData* data =
5710 DeoptimizationOutputData::cast(unoptimized->deoptimization_data()); 5710 DeoptimizationOutputData::cast(unoptimized->deoptimization_data());
5711 unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this); 5711 unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this);
5712 USE(ignore); 5712 USE(ignore);
5713 return true; // Return true if there was no ASSERT. 5713 return true; // Return true if there was no ASSERT.
5714 } 5714 }
5715 5715
5716 5716
5717 void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) { 5717 void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) {
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
6235 #endif 6235 #endif
6236 6236
6237 if (kind() == OPTIMIZED_FUNCTION) { 6237 if (kind() == OPTIMIZED_FUNCTION) {
6238 SafepointTable table(this); 6238 SafepointTable table(this);
6239 PrintF("Safepoints (size = %u)\n", table.size()); 6239 PrintF("Safepoints (size = %u)\n", table.size());
6240 for (unsigned i = 0; i < table.length(); i++) { 6240 for (unsigned i = 0; i < table.length(); i++) {
6241 unsigned pc_offset = table.GetPcOffset(i); 6241 unsigned pc_offset = table.GetPcOffset(i);
6242 PrintF("%p %4d ", (instruction_start() + pc_offset), pc_offset); 6242 PrintF("%p %4d ", (instruction_start() + pc_offset), pc_offset);
6243 table.PrintEntry(i); 6243 table.PrintEntry(i);
6244 PrintF(" (sp -> fp)"); 6244 PrintF(" (sp -> fp)");
6245 int deoptimization_index = table.GetDeoptimizationIndex(i); 6245 AstId deoptimization_index = table.GetDeoptimizationIndex(i);
6246 if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) { 6246 if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
6247 PrintF(" %6d", deoptimization_index); 6247 PrintF(" %6d", deoptimization_index);
6248 } else { 6248 } else {
6249 PrintF(" <none>"); 6249 PrintF(" <none>");
6250 } 6250 }
6251 PrintF("\n"); 6251 PrintF("\n");
6252 } 6252 }
6253 PrintF("\n"); 6253 PrintF("\n");
6254 } else if (kind() == FUNCTION) { 6254 } else if (kind() == FUNCTION) {
6255 unsigned offset = stack_check_table_start(); 6255 unsigned offset = stack_check_table_start();
(...skipping 3489 matching lines...) Expand 10 before | Expand all | Expand 10 after
9745 if (break_point_objects()->IsUndefined()) return 0; 9745 if (break_point_objects()->IsUndefined()) return 0;
9746 // Single beak point. 9746 // Single beak point.
9747 if (!break_point_objects()->IsFixedArray()) return 1; 9747 if (!break_point_objects()->IsFixedArray()) return 1;
9748 // Multiple break points. 9748 // Multiple break points.
9749 return FixedArray::cast(break_point_objects())->length(); 9749 return FixedArray::cast(break_point_objects())->length();
9750 } 9750 }
9751 #endif 9751 #endif
9752 9752
9753 9753
9754 } } // namespace v8::internal 9754 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698