about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-11-14 10:04:55 -0800
committerAlex Crichton <alex@alexcrichton.com>2013-11-18 21:45:58 -0800
commit508b7b996e5d557ec1c49e1d11563ecf4fc9d287 (patch)
tree56afc4b9b834d4496c175a3ab701823dbba72e15 /src/rt/rust_upcall.cpp
parente8bf0788027932a0b547819cc9edd13c40426e36 (diff)
downloadrust-508b7b996e5d557ec1c49e1d11563ecf4fc9d287.tar.gz
rust-508b7b996e5d557ec1c49e1d11563ecf4fc9d287.zip
Move runtime files to C instead of C++
Explicitly have the only C++ portion of the runtime be one file with exception
handling. All other runtime files must now live in C and be fully defined in C.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
deleted file mode 100644
index 95f4bec02e9..00000000000
--- a/src/rt/rust_upcall.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/*
-  Upcalls
-
-  These are runtime functions that the compiler knows about and generates
-  calls to. They are called on the Rust stack and, in most cases, immediately
-  switch to the C stack.
- */
-
-#include "rust_globals.h"
-
-//Unwinding ABI declarations.
-typedef int _Unwind_Reason_Code;
-typedef int _Unwind_Action;
-
-struct _Unwind_Context;
-struct _Unwind_Exception;
-
-#ifdef __SEH__
-#  define PERSONALITY_FUNC __gxx_personality_seh0
-#else
-#  ifdef __USING_SJLJ_EXCEPTIONS__
-#    define PERSONALITY_FUNC __gxx_personality_sjlj
-#  else
-#    define PERSONALITY_FUNC __gxx_personality_v0
-#  endif
-#endif
-
-extern "C" _Unwind_Reason_Code
-PERSONALITY_FUNC(int version,
-                     _Unwind_Action actions,
-                     uint64_t exception_class,
-                     _Unwind_Exception *ue_header,
-                     _Unwind_Context *context);
-
-struct s_rust_personality_args {
-    _Unwind_Reason_Code retval;
-    int version;
-    _Unwind_Action actions;
-    uint64_t exception_class;
-    _Unwind_Exception *ue_header;
-    _Unwind_Context *context;
-};
-
-extern "C" void
-upcall_s_rust_personality(s_rust_personality_args *args) {
-    args->retval = PERSONALITY_FUNC(args->version,
-                                    args->actions,
-                                    args->exception_class,
-                                    args->ue_header,
-                                    args->context);
-}
-
-/**
-   The exception handling personality function. It figures
-   out what to do with each landing pad. Just a stack-switching
-   wrapper around the C++ personality function.
-*/
-extern "C" _Unwind_Reason_Code
-upcall_rust_personality(int version,
-                        _Unwind_Action actions,
-                        uint64_t exception_class,
-                        _Unwind_Exception *ue_header,
-                        _Unwind_Context *context) {
-    s_rust_personality_args args = {(_Unwind_Reason_Code)0,
-                                    version, actions, exception_class,
-                                    ue_header, context};
-    upcall_s_rust_personality(&args);
-    return args.retval;
-}
-
-// Landing pads need to call this to insert the
-// correct limit into TLS.
-// NB: This must run on the Rust stack because it
-// needs to acquire the value of the stack pointer
-extern "C" CDECL void
-upcall_reset_stack_limit() {
-}
-
-//
-// Local Variables:
-// mode: C++
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//