変数(Variable)
名前付きのデータ格納場所。
Variants: 1. DDoS Reflection. 2. Blind Hijacking. 3. Trust-relationship exploitation. Defense: BCP 38, Cryptographic authentication (IPSec).
graph LR
Center["変数(Variable)"]:::main
Rel_data_type["data-type"]:::related -.-> Center
click Rel_data_type "/terms/data-type"
Rel_threat_intelligence["threat-intelligence"]:::related -.-> Center
click Rel_threat_intelligence "/terms/threat-intelligence"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 5歳でもわかるように説明
変数は、物を保管するラベル付きの箱のようなものです。今日数字(5など)を入れ、明日別の数字(10など)を入れることができます。箱のラベルはそのままですが、中身は変わります!
🤓 Expert Deep Dive
変数はレジスタ、スタック、ヒープにマッピングされます。SSA形式は最適化のために変数の名前を変更します。シャドーイングは同じ名前の新しい変数を作成します。ホイスティングは宣言を移動します(JS)。型推論は型を推測します。所有権システム(Rust)はライフサイクルを管理します。