go - modrpc/info GitHub Wiki

Table of Contents

Overview

Conferences, Sites

People

Go and Distributed Computing

Go Memory Model

Go Compiler Implementation

Go front-end

Packages

  • go/token: defines lexical tokens of Go
  • go/scanner: tokenizes an input stream and records file position info
  • go/ast: defines AST datatypes
  • go/parser: recursive-descent parser which constructs AST
  • go/constant: representations and arithmetic operations for the values of compile-time constant expressions
  • go/types: type checking

Lexical Scanning

Type checking

  • Nice intro: https://github.com/golang/example/tree/master/gotypes gotypes-local
  • Go type checker does three things:
    • identifier resolution: for every name in the program, determines which declration the name refers to
      • i.e. ast.Ident -> var/type/func/const/etc. (compiler object)
    • type deduction: for every expression in the program, determines what type that expression has
    • constant evaluation: for every constant epxression in the program, determines the value of constant
  • go/types.Info
    • Info.Types map[ast.Expr]TypeAndValue:
      • expr -> types OR constexpr -> values
    • Info.Defs map[*ast.Ident]Object

Go compiler building

Go data structures & interfaces

Goroutines

Go channels/select

  • IPC mechanism based on CSP channels
  • Processes communicate/synchronize through channels (not directly writing to them)
    • this allows to encapsulate all sync/comm inside channel implementation?
  • Behavior is similar to SV mailbox only with blocking try/put
  • Channel impl: http://dmitryvorobev.blogspot.com/2016/08/golang-channels-implementation.html
  • See plan9 source for C implementation of channel.: /home/cjeong/work/tools/sys-plan9/sys/src/libthread

Go runtime

Go scheduler

Go netpoller

Go Library

Go RPC

Go CGO

Go Syscall

Go Concurrency Patterns

Timeout

Pipelines (Fanin/Fanout)

Starting/Killing/Stopping/Resuming Goroutines

Go Programming

Go Profiling and Optimization

Debugging

First-Class Functions

Iterators

Go generate

Go and JSON

Reference Systems

Go Programming Tips

⚠️ **GitHub.com Fallback** ⚠️