| 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 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 | 2008 |
| 2009 if (!name.is_null() && name->IsString()) { | 2009 if (!name.is_null() && name->IsString()) { |
| 2010 SmartArrayPointer<char> name_cstring = | 2010 SmartArrayPointer<char> name_cstring = |
| 2011 Handle<String>::cast(name)->ToCString(DISALLOW_NULLS); | 2011 Handle<String>::cast(name)->ToCString(DISALLOW_NULLS); |
| 2012 AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script, info); | 2012 AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script, info); |
| 2013 } else { | 2013 } else { |
| 2014 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info); | 2014 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info); |
| 2015 } | 2015 } |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 |
| 2018 static void AddUnwindInfo(CodeDescription* desc) { | 2019 static void AddUnwindInfo(CodeDescription* desc) { |
| 2019 #if V8_TARGET_ARCH_X64 | 2020 #if V8_TARGET_ARCH_X64 |
| 2020 if (desc->tag() == GDBJITInterface::FUNCTION) { | 2021 if (desc->tag() == GDBJITInterface::FUNCTION) { |
| 2021 // To avoid propagating unwinding information through | 2022 // To avoid propagating unwinding information through |
| 2022 // compilation pipeline we use an approximation. | 2023 // compilation pipeline we use an approximation. |
| 2023 // For most use cases this should not affect usability. | 2024 // For most use cases this should not affect usability. |
| 2024 static const int kFramePointerPushOffset = 1; | 2025 static const int kFramePointerPushOffset = 1; |
| 2025 static const int kFramePointerSetOffset = 4; | 2026 static const int kFramePointerSetOffset = 4; |
| 2026 static const int kFramePointerPopOffset = -3; | 2027 static const int kFramePointerPopOffset = -3; |
| 2027 | 2028 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2189 ScopedLock lock(mutex.Pointer()); | 2190 ScopedLock lock(mutex.Pointer()); |
| 2190 ASSERT(!IsLineInfoTagged(line_info)); | 2191 ASSERT(!IsLineInfoTagged(line_info)); |
| 2191 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); | 2192 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); |
| 2192 ASSERT(e->value == NULL); | 2193 ASSERT(e->value == NULL); |
| 2193 e->value = TagLineInfo(line_info); | 2194 e->value = TagLineInfo(line_info); |
| 2194 } | 2195 } |
| 2195 | 2196 |
| 2196 | 2197 |
| 2197 } } // namespace v8::internal | 2198 } } // namespace v8::internal |
| 2198 #endif | 2199 #endif |
| OLD | NEW |