| 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 6057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6068 } | 6068 } |
| 6069 } | 6069 } |
| 6070 it.next(); | 6070 it.next(); |
| 6071 } | 6071 } |
| 6072 return statement_position; | 6072 return statement_position; |
| 6073 } | 6073 } |
| 6074 | 6074 |
| 6075 | 6075 |
| 6076 uint8_t* Code::GetSafepointEntry(Address pc) { | 6076 uint8_t* Code::GetSafepointEntry(Address pc) { |
| 6077 SafepointTable table(this); | 6077 SafepointTable table(this); |
| 6078 unsigned pc_offset = pc - instruction_start(); | 6078 unsigned pc_offset = static_cast<unsigned>(pc - instruction_start()); |
| 6079 for (unsigned i = 0; i < table.length(); i++) { | 6079 for (unsigned i = 0; i < table.length(); i++) { |
| 6080 // TODO(kasperl): Replace the linear search with binary search. | 6080 // TODO(kasperl): Replace the linear search with binary search. |
| 6081 if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i); | 6081 if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i); |
| 6082 } | 6082 } |
| 6083 return NULL; | 6083 return NULL; |
| 6084 } | 6084 } |
| 6085 | 6085 |
| 6086 | 6086 |
| 6087 void Code::SetNoStackCheckTable() { | 6087 void Code::SetNoStackCheckTable() { |
| 6088 // Indicate the absence of a stack-check table by a table start after the | 6088 // Indicate the absence of a stack-check table by a table start after the |
| (...skipping 3755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9844 if (break_point_objects()->IsUndefined()) return 0; | 9844 if (break_point_objects()->IsUndefined()) return 0; |
| 9845 // Single beak point. | 9845 // Single beak point. |
| 9846 if (!break_point_objects()->IsFixedArray()) return 1; | 9846 if (!break_point_objects()->IsFixedArray()) return 1; |
| 9847 // Multiple break points. | 9847 // Multiple break points. |
| 9848 return FixedArray::cast(break_point_objects())->length(); | 9848 return FixedArray::cast(break_point_objects())->length(); |
| 9849 } | 9849 } |
| 9850 #endif | 9850 #endif |
| 9851 | 9851 |
| 9852 | 9852 |
| 9853 } } // namespace v8::internal | 9853 } } // namespace v8::internal |
| OLD | NEW |