aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/reader.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2022-08-10 20:01:48 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2022-09-02 18:24:59 +0000
commit8bbb362f4c954da7c521bf2dd34b22fa3e5ab3c5 (patch)
tree2f1fe6f6e21cf16067f81887e591ae15a0445091 /src/cmd/compile/internal/noder/reader.go
parent0ee0bb1003aa96a8ed94728784bb7faa301702d9 (diff)
downloadgo-8bbb362f4c954da7c521bf2dd34b22fa3e5ab3c5.tar.xz
cmd/compile: remove go:notinheap pragma
Updates #46731 Change-Id: I247fa9c7ca97feb9053665da7ff56e7f5b571f74 Reviewed-on: https://go-review.googlesource.com/c/go/+/422815 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Joedian Reid <joedian@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/noder/reader.go')
-rw-r--r--src/cmd/compile/internal/noder/reader.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go
index 8270c403fe..e69d8edc0b 100644
--- a/src/cmd/compile/internal/noder/reader.go
+++ b/src/cmd/compile/internal/noder/reader.go
@@ -1096,9 +1096,6 @@ func (r *reader) typeExt(name *ir.Name) {
}
name.SetPragma(r.pragmaFlag())
- if name.Pragma()&ir.NotInHeap != 0 {
- typ.SetNotInHeap(true)
- }
typecheck.SetBaseTypeIndex(typ, r.Int64(), r.Int64())
}
@@ -2440,16 +2437,6 @@ func (r *reader) expr() (res ir.Node) {
// TODO(mdempsky): Stop constructing expressions of untyped type.
x = typecheck.DefaultLit(x, typ)
- if op, why := typecheck.Convertop(x.Op() == ir.OLITERAL, x.Type(), typ); op == ir.OXXX {
- // types2 ensured that x is convertable to typ under standard Go
- // semantics, but cmd/compile also disallows some conversions
- // involving //go:notinheap.
- //
- // TODO(mdempsky): This can be removed after #46731 is implemented.
- base.ErrorfAt(pos, "cannot convert %L to type %v%v", x, typ, why)
- base.ErrorExit() // harsh, but prevents constructing invalid IR
- }
-
ce := ir.NewConvExpr(pos, ir.OCONV, typ, x)
ce.TypeWord, ce.SrcRType = typeWord, srcRType
if implicit {