| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 namespace v8 { | 37 namespace v8 { |
| 38 namespace internal { | 38 namespace internal { |
| 39 | 39 |
| 40 | 40 |
| 41 Address IC::address() const { | 41 Address IC::address() const { |
| 42 // Get the address of the call. | 42 // Get the address of the call. |
| 43 Address result = Assembler::target_address_from_return_address(pc()); | 43 Address result = Assembler::target_address_from_return_address(pc()); |
| 44 | 44 |
| 45 #ifdef ENABLE_DEBUGGER_SUPPORT | 45 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 46 Debug* debug = Isolate::Current()->debug(); | 46 ASSERT(Isolate::Current() == isolate()); |
| 47 Debug* debug = isolate()->debug(); |
| 47 // First check if any break points are active if not just return the address | 48 // First check if any break points are active if not just return the address |
| 48 // of the call. | 49 // of the call. |
| 49 if (!debug->has_break_points()) return result; | 50 if (!debug->has_break_points()) return result; |
| 50 | 51 |
| 51 // At least one break point is active perform additional test to ensure that | 52 // At least one break point is active perform additional test to ensure that |
| 52 // break point locations are updated correctly. | 53 // break point locations are updated correctly. |
| 53 if (debug->IsDebugBreak(Assembler::target_address_at(result))) { | 54 if (debug->IsDebugBreak(Assembler::target_address_at(result))) { |
| 54 // If the call site is a call to debug break then return the address in | 55 // If the call site is a call to debug break then return the address in |
| 55 // the original code instead of the address in the running code. This will | 56 // the original code instead of the address in the running code. This will |
| 56 // cause the original code to be updated and keeps the breakpoint active in | 57 // cause the original code to be updated and keeps the breakpoint active in |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 JSObject* IC::GetCodeCacheHolder(Object* object, InlineCacheHolderFlag holder) { | 132 JSObject* IC::GetCodeCacheHolder(Object* object, InlineCacheHolderFlag holder) { |
| 132 Object* map_owner = (holder == OWN_MAP ? object : object->GetPrototype()); | 133 Object* map_owner = (holder == OWN_MAP ? object : object->GetPrototype()); |
| 133 ASSERT(map_owner->IsJSObject()); | 134 ASSERT(map_owner->IsJSObject()); |
| 134 return JSObject::cast(map_owner); | 135 return JSObject::cast(map_owner); |
| 135 } | 136 } |
| 136 | 137 |
| 137 | 138 |
| 138 } } // namespace v8::internal | 139 } } // namespace v8::internal |
| 139 | 140 |
| 140 #endif // V8_IC_INL_H_ | 141 #endif // V8_IC_INL_H_ |
| OLD | NEW |