Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed May 20, 2012
1 parent eb1438c commit d6017b4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 56 deletions.
14 changes: 0 additions & 14 deletions spec/ruby/core/thread/element_set_spec.rb
Expand Up @@ -28,19 +28,5 @@
Thread.current[:value] = 2
end

it "stores a local in another thread when in a fiber" do
fib = Fiber.new do
t = Thread.new do
sleep
Thread.current[:value].should == 1
end

Thread.pass while t.status and t.status != "sleep"
t[:value] = 1
t.wakeup
t.join
end
fib.resume
end
end
end
14 changes: 0 additions & 14 deletions spec/ruby/core/thread/key_spec.rb
Expand Up @@ -46,19 +46,5 @@
Thread.current.key?(:val2).should be_true
end

it "stores a local in another thread when in a fiber" do
fib = Fiber.new do
t = Thread.new do
sleep
Thread.current.key?(:value).should be_true
end

Thread.pass while t.status and t.status != "sleep"
t[:value] = 1
t.wakeup
t.join
end
fib.resume
end
end
end
14 changes: 0 additions & 14 deletions spec/ruby/core/thread/keys_spec.rb
Expand Up @@ -28,20 +28,6 @@
Thread.current.keys.should_not include(:val1)
end

it "stores a local in another thread when in a fiber" do
fib = Fiber.new do
t = Thread.new do
sleep
Thread.current.keys.should include(:value)
end

Thread.pass while t.status and t.status != "sleep"
t[:value] = 1
t.wakeup
t.join
end
fib.resume
end
end

end
8 changes: 0 additions & 8 deletions vendor/libffi/src/x86/unix64.S
Expand Up @@ -347,11 +347,7 @@ ffi_closure_unix64:
.long .LEFDE1-.LASFDE1 /* FDE Length */
.LASFDE1:
.long .LASFDE1-.Lframe1 /* FDE CIE offset */
#if HAVE_AS_X86_PCREL
.long .LUW0-. /* FDE initial location */
#else
.long .LUW0@rel
#endif
.long .LUW4-.LUW0 /* FDE address range */
.uleb128 0x0 /* Augmentation size */

Expand Down Expand Up @@ -389,11 +385,7 @@ ffi_closure_unix64:
.long .LEFDE3-.LASFDE3 /* FDE Length */
.LASFDE3:
.long .LASFDE3-.Lframe1 /* FDE CIE offset */
#if HAVE_AS_X86_PCREL
.long .LUW5-. /* FDE initial location */
#else
.long .LUW5@rel
#endif
.long .LUW9-.LUW5 /* FDE address range */
.uleb128 0x0 /* Augmentation size */

Expand Down
4 changes: 2 additions & 2 deletions vm/bug.hpp
Expand Up @@ -3,8 +3,8 @@

namespace rubinius {
void abort();
void bug(const char* message);
void bug(const char* message, const char* arg);
noreturn(void bug(const char* message));
noreturn(void bug(const char* message, const char* arg));
void warn(const char* message);
void print_backtrace(size_t max=100);
}
Expand Down
6 changes: 3 additions & 3 deletions vm/builtin/exception.hpp
Expand Up @@ -72,9 +72,9 @@ namespace rubinius {
static void system_call_error(STATE, const char* reason);
static void system_call_error(STATE, const std::string& reason);

static void thread_error(STATE, const char* reason);
static void fiber_error(STATE, const char* reason);
static void memory_error(STATE);
noreturn(static void thread_error(STATE, const char* reason));
noreturn(static void fiber_error(STATE, const char* reason));
noreturn(static void memory_error(STATE));

static Exception* make_lje(STATE, CallFrame* frame);

Expand Down
2 changes: 1 addition & 1 deletion vm/exception.hpp
Expand Up @@ -104,7 +104,7 @@ namespace rubinius {

public: /* Interface */

static void raise(Exception* exception, bool make_backtrace = false);
noreturn(static void raise(Exception* exception, bool make_backtrace = false));

/**
* Prints out the exception message and the Ruby backtrace.
Expand Down
2 changes: 2 additions & 0 deletions vm/util/optimize.hpp
Expand Up @@ -6,11 +6,13 @@

#define likely(x) __builtin_expect((long int)(x),1)
#define unlikely(x) __builtin_expect((long int)(x),0)
#define noreturn(x) x __attribute__ ((noreturn))

#else

#define likely(x) x
#define unlikely(x) x
#define noreturn(x) x

#endif

0 comments on commit d6017b4

Please sign in to comment.