Skip to content

Commit 72fabd3

Browse files
committed
wip
1 parent 0e6c84c commit 72fabd3

File tree

12 files changed

+1729
-668
lines changed

12 files changed

+1729
-668
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ CORE_SRCS := $(addprefix $(JULIAHOME)/, \
187187
base/array.jl \
188188
base/bool.jl \
189189
base/associative.jl \
190+
base/codevalidation.jl \
190191
base/error.jl \
191192
base/essentials.jl \
192193
base/generator.jl \

base/codevalidation.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ const VALID_EXPR_HEADS = ObjectIdDict(
2727
:simdloop => 0:0
2828
)
2929

30-
const ASSIGNED_FLAG = 0x02
31-
3230
# @enum isn't defined yet, otherwise I'd use it for this
3331
const INVALID_EXPR_HEAD = "invalid expression head"
3432
const INVALID_EXPR_NARGS = "invalid number of expression args"
@@ -41,7 +39,6 @@ const SLOTTYPES_MISMATCH = "length(slotnames) != length(slottypes)"
4139
const SLOTTYPES_MISMATCH_UNINFERRED = "uninferred CodeInfo slottypes field is not `nothing`"
4240
const SSAVALUETYPES_MISMATCH = "not all SSAValues in AST have a type in ssavaluetypes"
4341
const SSAVALUETYPES_MISMATCH_UNINFERRED = "uninferred CodeInfo ssavaluetypes field does not equal the number of present SSAValues"
44-
const INVALID_ASSIGNMENT_SLOTFLAG = "slot has wrong assignment slotflag setting (bit flag 2 not set)"
4542
const NON_TOP_LEVEL_METHOD = "encountered `Expr` head `:method` in non-top-level code (i.e. `nargs` > 0)"
4643
const SIGNATURE_NARGS_MISMATCH = "method signature does not match number of method arguments"
4744
const SLOTNAMES_NARGS_MISMATCH = "CodeInfo for method contains fewer slotnames than the number of method arguments"
@@ -76,9 +73,6 @@ function validate_code!(errors::Vector{>:InvalidCodeError}, c::CodeInfo, is_top_
7673
push!(errors, InvalidCodeError(INVALID_LVALUE, lhs))
7774
elseif isa(lhs, SlotNumber) && !in(lhs.id, lhs_slotnums)
7875
n = lhs.id
79-
if isassigned(c.slotflags, n) && !is_flag_set(c.slotflags[n], ASSIGNED_FLAG)
80-
push!(errors, InvalidCodeError(INVALID_ASSIGNMENT_SLOTFLAG, lhs))
81-
end
8276
push!(lhs_slotnums, n)
8377
end
8478
if !is_valid_rvalue(rhs)

0 commit comments

Comments
 (0)