Mark throwing functions as no-return.

Now the compiler cannot only optimise for this, but also stop complaining
about callers not returning any value.

Change-Id: I71d98721f70849178613096408e959d7e24dca8a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
Erik Verbruggen 2013-02-27 12:18:51 +01:00 committed by Simon Hausmann
parent 3ad3a6e838
commit 048f896a98
2 changed files with 11 additions and 11 deletions

View File

@ -121,14 +121,14 @@ struct ExecutionContext
void wireUpPrototype();
void throwError(const Value &value);
void throwError(const QString &message);
void throwSyntaxError(DiagnosticMessage *message);
void throwTypeError();
void throwReferenceError(Value value);
void throwRangeError(Value value);
void throwURIError(Value msg);
void throwUnimplemented(const QString &message);
void Q_NORETURN throwError(const Value &value);
void Q_NORETURN throwError(const QString &message);
void Q_NORETURN throwSyntaxError(DiagnosticMessage *message);
void Q_NORETURN throwTypeError();
void Q_NORETURN throwReferenceError(Value value);
void Q_NORETURN throwRangeError(Value value);
void Q_NORETURN throwURIError(Value msg);
void Q_NORETURN throwUnimplemented(const QString &message);
void setProperty(String *name, const Value &value);
Value getProperty(String *name);

View File

@ -117,8 +117,8 @@ void __qmljs_builtin_post_decrement_name(ExecutionContext *context, Value *resul
void __qmljs_builtin_post_decrement_member(ExecutionContext *context, Value *result, const Value &base, String *name);
void __qmljs_builtin_post_decrement_element(ExecutionContext *context, Value *result, const Value &base, const Value &index);
void __qmljs_builtin_throw(ExecutionContext *context, const Value &val);
void __qmljs_builtin_rethrow(ExecutionContext *context);
void Q_NORETURN __qmljs_builtin_throw(ExecutionContext *context, const Value &val);
void Q_NORETURN __qmljs_builtin_rethrow(ExecutionContext *context);
ExecutionContext *__qmljs_builtin_push_with_scope(const Value &o, ExecutionContext *ctx);
ExecutionContext *__qmljs_builtin_push_catch_scope(String *exceptionVarName, ExecutionContext *ctx);
ExecutionContext *__qmljs_builtin_pop_scope(ExecutionContext *ctx);
@ -191,7 +191,7 @@ void __qmljs_delete_subscript(ExecutionContext *ctx, Value *result, const Value
void __qmljs_delete_member(ExecutionContext *ctx, Value *result, const Value &base, String *name);
void __qmljs_delete_name(ExecutionContext *ctx, Value *result, String *name);
void __qmljs_throw(ExecutionContext*, const Value &value);
void Q_NORETURN __qmljs_throw(ExecutionContext*, const Value &value);
// actually returns a jmp_buf *
Q_V4_EXPORT void *__qmljs_create_exception_handler(ExecutionContext *context);
void __qmljs_delete_exception_handler(ExecutionContext *context);