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

Unified Diff: src/compiler/arm/unwinding-info-writer-arm.h

Issue 2026313002: Emit unwinding information for TurboFan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@eh-frame
Patch Set: Clarify assumptions on frame ction/dtion routines in arm/arm64. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/arm/unwinding-info-writer-arm.h
diff --git a/src/compiler/arm/unwinding-info-writer-arm.h b/src/compiler/arm/unwinding-info-writer-arm.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb722a41df25d37865be3cfcc62b776f93af6992
--- /dev/null
+++ b/src/compiler/arm/unwinding-info-writer-arm.h
@@ -0,0 +1,54 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_ARM_UNWINDING_INFO_WRITER_H_
+#define V8_COMPILER_ARM_UNWINDING_INFO_WRITER_H_
+
+#include <unordered_map>
+#include "src/eh-frame.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class InstructionBlock;
+
+class UnwindingInfoWriter {
+ public:
+ UnwindingInfoWriter() : saved_lr_(false), block_will_exit_(false) {}
+
+ void BeginInstructionBlock(int pc_offset, const InstructionBlock* block);
+ void EndInstructionBlock(const InstructionBlock* block);
+
+ void MarkLinkRegisterOnTopOfStack(int pc_offset);
+ void MarkPopLinkRegisterFromTopOfStack(int pc_offset);
+
+ void MarkFrameConstructed(int at_pc);
+ void MarkFrameDeconstructed(int at_pc);
+
+ void MarkBlockWillExit() { block_will_exit_ = true; }
+
+ void Finish(int code_size) { eh_frame_writer_.Finish(code_size); }
+
+ EhFrameWriter* eh_frame_writer() { return &eh_frame_writer_; }
+
+ private:
+ EhFrameWriter eh_frame_writer_;
+
+ struct BlockInitialState {
+ bool saved_lr_;
+ };
+
+ bool saved_lr_;
+ bool block_will_exit_;
+
+ std::unordered_map<int, BlockInitialState> block_initial_states_;
Jarin 2016/07/06 07:09:42 Nit: Could not you use a zone vector here? It seem
+ static_assert(kIntSize >= kInt32Size, "int too small to encode a RpoNumber");
Jarin 2016/07/06 07:09:42 Normally, we use STATIC_ASSERT.
Stefano Sanfilippo 2016/07/06 13:25:10 I followed the comment at line 216 of src/base/mac
Jarin 2016/07/07 07:31:40 Ah, good to know. Thanks.
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698