runtime: mark some functions as not throwing (nounwind)

This commit is contained in:
Svyatoslav Scherbina
2016-12-29 17:58:03 +07:00
committed by SvyatoslavScherbina
parent 7374ea642f
commit 57ae3a1cc7
2 changed files with 13 additions and 15 deletions
+6
View File
@@ -0,0 +1,6 @@
#ifndef RUNTIME_COMMON_H
#define RUNTIME_COMMON_H
#define RUNTIME_NOTHROW __attribute__((nothrow))
#endif // RUNTIME_COMMON_H
+7 -15
View File
@@ -2,6 +2,7 @@
#define RUNTIME_MEMORY_H
#include "Assert.h"
#include "Common.h"
#include "TypeInfo.h"
typedef enum {
@@ -312,15 +313,6 @@ OBJ_GETTER(InitInstance,
ObjHeader** location, const TypeInfo* type_info, PlacementHint hint,
void (*ctor)(ObjHeader*));
// Sets locally visible location.
void SetLocalRef(ObjHeader** location, const ObjHeader* object);
// Sets potentially globally visible location.
void SetGlobalRef(ObjHeader** location, const ObjHeader* object);
// Update locally visible location.
void UpdateLocalRef(ObjHeader** location, const ObjHeader* object);
// Update potentially globally visible location.
void UpdateGlobalRef(ObjHeader** location, const ObjHeader* object);
//
// Object reference management.
//
@@ -344,16 +336,16 @@ void UpdateGlobalRef(ObjHeader** location, const ObjHeader* object);
//
// Sets locally visible location.
void SetLocalRef(ObjHeader** location, const ObjHeader* object);
void SetLocalRef(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Sets potentially globally visible location.
void SetGlobalRef(ObjHeader** location, const ObjHeader* object);
void SetGlobalRef(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Update locally visible location.
void UpdateLocalRef(ObjHeader** location, const ObjHeader* object);
void UpdateLocalRef(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Update potentially globally visible location.
void UpdateGlobalRef(ObjHeader** location, const ObjHeader* object);
void UpdateGlobalRef(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Optimization: release all references in range.
void ReleaseLocalRefs(ObjHeader** start, int count);
void ReleaseGlobalRefs(ObjHeader** start, int count);
void ReleaseLocalRefs(ObjHeader** start, int count) RUNTIME_NOTHROW;
void ReleaseGlobalRefs(ObjHeader** start, int count) RUNTIME_NOTHROW;
#ifdef __cplusplus
}