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

Side by Side Diff: src/objects.cc

Issue 6125007: Allow arguments in safepoints with registers. (Closed)
Patch Set: Created 9 years, 11 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
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 5969 matching lines...) Expand 10 before | Expand all | Expand 10 after
5980 if (statement_position < p && p <= position) { 5980 if (statement_position < p && p <= position) {
5981 statement_position = p; 5981 statement_position = p;
5982 } 5982 }
5983 } 5983 }
5984 it.next(); 5984 it.next();
5985 } 5985 }
5986 return statement_position; 5986 return statement_position;
5987 } 5987 }
5988 5988
5989 5989
5990 uint8_t* Code::GetSafepointEntry(Address pc) { 5990 SafepointEntry Code::GetSafepointEntry(Address pc) {
5991 SafepointTable table(this); 5991 SafepointTable table(this);
5992 unsigned pc_offset = static_cast<unsigned>(pc - instruction_start()); 5992 return table.FindEntry(pc);
5993 for (unsigned i = 0; i < table.length(); i++) {
5994 // TODO(kasperl): Replace the linear search with binary search.
5995 if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i);
5996 }
5997 return NULL;
5998 } 5993 }
5999 5994
6000 5995
6001 void Code::SetNoStackCheckTable() { 5996 void Code::SetNoStackCheckTable() {
6002 // Indicate the absence of a stack-check table by a table start after the 5997 // Indicate the absence of a stack-check table by a table start after the
6003 // end of the instructions. Table start must be aligned, so round up. 5998 // end of the instructions. Table start must be aligned, so round up.
6004 set_stack_check_table_start(RoundUp(instruction_size(), kIntSize)); 5999 set_stack_check_table_start(RoundUp(instruction_size(), kIntSize));
6005 } 6000 }
6006 6001
6007 6002
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
6258 #endif 6253 #endif
6259 6254
6260 if (kind() == OPTIMIZED_FUNCTION) { 6255 if (kind() == OPTIMIZED_FUNCTION) {
6261 SafepointTable table(this); 6256 SafepointTable table(this);
6262 PrintF(out, "Safepoints (size = %u)\n", table.size()); 6257 PrintF(out, "Safepoints (size = %u)\n", table.size());
6263 for (unsigned i = 0; i < table.length(); i++) { 6258 for (unsigned i = 0; i < table.length(); i++) {
6264 unsigned pc_offset = table.GetPcOffset(i); 6259 unsigned pc_offset = table.GetPcOffset(i);
6265 PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset); 6260 PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset);
6266 table.PrintEntry(i); 6261 table.PrintEntry(i);
6267 PrintF(out, " (sp -> fp)"); 6262 PrintF(out, " (sp -> fp)");
6268 int deoptimization_index = table.GetDeoptimizationIndex(i); 6263 int deoptimization_index = table.GetEntry(i).deoptimization_index();
6269 if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) { 6264 if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
6270 PrintF(out, " %6d", deoptimization_index); 6265 PrintF(out, " %6d", deoptimization_index);
6271 } else { 6266 } else {
6272 PrintF(out, " <none>"); 6267 PrintF(out, " <none>");
6273 } 6268 }
6274 PrintF(out, "\n"); 6269 PrintF(out, "\n");
6275 } 6270 }
6276 PrintF(out, "\n"); 6271 PrintF(out, "\n");
6277 } else if (kind() == FUNCTION) { 6272 } else if (kind() == FUNCTION) {
6278 unsigned offset = stack_check_table_start(); 6273 unsigned offset = stack_check_table_start();
(...skipping 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after
9868 if (break_point_objects()->IsUndefined()) return 0; 9863 if (break_point_objects()->IsUndefined()) return 0;
9869 // Single beak point. 9864 // Single beak point.
9870 if (!break_point_objects()->IsFixedArray()) return 1; 9865 if (!break_point_objects()->IsFixedArray()) return 1;
9871 // Multiple break points. 9866 // Multiple break points.
9872 return FixedArray::cast(break_point_objects())->length(); 9867 return FixedArray::cast(break_point_objects())->length();
9873 } 9868 }
9874 #endif 9869 #endif
9875 9870
9876 9871
9877 } } // namespace v8::internal 9872 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698