OLD | NEW |
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 5949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5960 } | 5960 } |
5961 } | 5961 } |
5962 it.next(); | 5962 it.next(); |
5963 } | 5963 } |
5964 return statement_position; | 5964 return statement_position; |
5965 } | 5965 } |
5966 | 5966 |
5967 | 5967 |
5968 uint8_t* Code::GetSafepointEntry(Address pc) { | 5968 uint8_t* Code::GetSafepointEntry(Address pc) { |
5969 SafepointTable table(this); | 5969 SafepointTable table(this); |
5970 unsigned pc_offset = pc - instruction_start(); | 5970 unsigned pc_offset = static_cast<unsigned>(pc - instruction_start()); |
5971 for (unsigned i = 0; i < table.length(); i++) { | 5971 for (unsigned i = 0; i < table.length(); i++) { |
5972 // TODO(kasperl): Replace the linear search with binary search. | 5972 // TODO(kasperl): Replace the linear search with binary search. |
5973 if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i); | 5973 if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i); |
5974 } | 5974 } |
5975 return NULL; | 5975 return NULL; |
5976 } | 5976 } |
5977 | 5977 |
5978 | 5978 |
5979 void Code::SetNoStackCheckTable() { | 5979 void Code::SetNoStackCheckTable() { |
5980 // Indicate the absence of a stack-check table by a table start after the | 5980 // Indicate the absence of a stack-check table by a table start after the |
(...skipping 3764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |