Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Couple of bug fixes & tidy

  • Loading branch information...
commit 64e65f983a56e8e321da7f80bc517a45ae09da82 1 parent 02de32f
@agemogolk agemogolk authored
View
1  compiler/analyzer.cpp
@@ -1666,7 +1666,6 @@ struct IntrinsicAnalyzer {
if (expectArgType < 0) {
size_t matchIndex = size_t(~expectArgType);
- size_t matchFlags = matchIndex & (ExtendedElementVectorType | TruncatedElementVectorType);
matchIndex &= ~(ExtendedElementVectorType | TruncatedElementVectorType);
assert(matchIndex < ai + numReturnValues);
View
4 compiler/clay.hpp
@@ -2841,9 +2841,9 @@ struct RecordType : public Type {
const llvm::StructLayout *layout;
unsigned varFieldPosition;
- bool hasVarField:1;
bool fieldsInitialized:1;
-
+ bool hasVarField:1;
+
RecordType(RecordDeclPtr record)
: Type(RECORD_TYPE), record(record),
layout(NULL), fieldsInitialized(false), hasVarField(false) {}
View
5 compiler/codegen.cpp
@@ -3956,10 +3956,6 @@ bool codegenStatement(StatementPtr stmt,
int marker = cgMarkStack(ctx);
CValuePtr cv = codegenOneAsRef(x->condition, env2, ctx);
BoolKind condBoolKind = typeBoolKind(cv->type);
- llvm::Value *cond;
- if (condBoolKind == BOOL_EXPR) {
- cond = codegenToBoolFlag(cv, ctx);
- }
cgDestroyAndPopStack(marker, ctx, false);
clearTemps(tempMarker, ctx);
@@ -3974,6 +3970,7 @@ bool codegenStatement(StatementPtr stmt,
}
if (condBoolKind == BOOL_EXPR) {
+ llvm::Value *cond = codegenToBoolFlag(cv, ctx);
ctx->builder->CreateCondBr(cond, trueBlock, falseBlock);
} else {
ctx->builder->CreateBr(condBoolKind == BOOL_STATIC_TRUE ? trueBlock : falseBlock);
View
1  compiler/literals.cpp
@@ -45,7 +45,6 @@ static double floatFromParts(bool negp, int exponent, unsigned long long mantiss
template<typename F>
static F parseHexFloat(char *number, char **end) {
bool negp = false;
- bool negExponentp = false;
unsigned long long mantissa = 0;
int mantissaBits = 0;
int usedMantissaBits = 0;
View
2  compiler/loader.hpp
@@ -227,7 +227,7 @@ enum PrimOpCode {
PRIM_GetOverload,
- PRIM_usuallyEquals,
+ PRIM_usuallyEquals
};
struct PrimOp : public Object {
View
2  compiler/printer.cpp
@@ -587,7 +587,7 @@ static void print(llvm::raw_ostream &out, const Object *x) {
break;
}
case INTRINSIC : {
- const IntrinsicSymbol *intrin = (const IntrinsicSymbol *)intrin;
+ const IntrinsicSymbol *intrin = (const IntrinsicSymbol *)x;
out << "IntrinsicSymbol(" << intrin->name << ", " << intrin->id << ")";
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.