Skip to content

Commit 8e74531

Browse files
committed
remove redundant function name from some error messages
avoids some bloat in the string table
1 parent f3f6fa2 commit 8e74531

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

base/sysimg.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ precompile(eval_user_input, (Expr, Bool))
276276
precompile(print, (Float64,))
277277
precompile(a2t, (Array{Any,1},))
278278
precompile(flush, (IOStream,))
279-
precompile(getindex, (Type{ByteString}, ASCIIString, ASCIIString, ASCIIString, ASCIIString, ASCIIString))
279+
precompile(getindex, (Type{ByteString}, ASCIIString, ASCIIString, ASCIIString))
280+
precompile(bytestring, (ASCIIString,))
280281
precompile(int, (Int,))
281282
precompile(uint, (Uint,))
282283
precompile(_atexit, ())
@@ -318,6 +319,7 @@ precompile(abstract_eval_arg, (Uint8, ObjectIdDict, StaticVarInfo))
318319
precompile(occurs_outside_tupleref, (Function, Symbol, StaticVarInfo, Int))
319320
precompile(search, (ASCIIString, Regex, Int))
320321
precompile(setindex!, (Vector{Any}, Uint8, Int))
322+
precompile(setindex!, (Vector{Any}, Vector{Any}, Int))
321323
precompile(first, (Range1{Int},))
322324
precompile(last, (Range1{Int},))
323325
precompile(isempty, (ASCIIString,))

src/cgutils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,10 @@ static Value *emit_typeof(Value *p)
276276

277277
static void emit_error(const std::string &txt, jl_codectx_t *ctx)
278278
{
279-
std::string txt2 = "in " + ctx->funcName + ": " + txt;
280279
Value *zeros[2] = { ConstantInt::get(T_int32, 0),
281280
ConstantInt::get(T_int32, 0) };
282281
builder.CreateCall(jlerror_func,
283-
builder.CreateGEP(stringConst(txt2),
282+
builder.CreateGEP(stringConst(txt),
284283
ArrayRef<Value*>(zeros)));
285284
}
286285

test/core.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ function i2619()
764764
end
765765
i2619()
766766
@test !bad2619
767-
@test isa(e2619,ErrorException) && e2619.msg == "in i2619: f not defined"
767+
@test isa(e2619,ErrorException) && e2619.msg == "f not defined"
768768

769769
# issue #2919
770770
typealias Foo2919 Int

0 commit comments

Comments
 (0)