@cella-lang/cpp 0.1.202611060800 → 0.1.202611061934
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +21 -0
- package/cpp.arrays.cell +0 -0
- package/cpp.cell +0 -0
- package/cpp.classes.cell +0 -0
- package/cpp.classrules.cell +0 -0
- package/cpp.construction.cell +0 -0
- package/cpp.constructs.cell +0 -0
- package/cpp.copies.cell +0 -0
- package/cpp.exceptions.cell +0 -0
- package/cpp.inheritance.cell +0 -0
- package/cpp.lambdas.cell +0 -0
- package/cpp.layouts.cell +0 -0
- package/cpp.library.algorithms.cell +0 -0
- package/cpp.library.bitsets.cell +0 -0
- package/cpp.library.cell +0 -0
- package/cpp.library.comparisons.cell +0 -0
- package/cpp.library.deques.cell +0 -0
- package/cpp.library.iterators.cell +0 -0
- package/cpp.library.lists.cell +0 -0
- package/cpp.library.maps.cell +0 -0
- package/cpp.library.numerics.cell +0 -0
- package/cpp.library.pairs.cell +0 -0
- package/cpp.library.queues.cell +0 -0
- package/cpp.library.sets.cell +0 -0
- package/cpp.library.stacks.cell +0 -0
- package/cpp.library.strings.cell +0 -0
- package/cpp.library.trees.cell +0 -0
- package/cpp.library.tuples.cell +0 -0
- package/cpp.library.unorderedmaps.cell +0 -0
- package/cpp.library.vectors.cell +0 -0
- package/cpp.memberpointers.cell +0 -0
- package/cpp.names.cell +0 -0
- package/cpp.objects.cell +0 -0
- package/cpp.operators.cell +0 -0
- package/cpp.overloading.cell +0 -0
- package/cpp.polymorphism.cell +0 -0
- package/cpp.primitives.cell +0 -0
- package/cpp.ranges.cell +0 -0
- package/cpp.references.cell +0 -0
- package/cpp.runtimetypes.cell +0 -0
- package/cpp.standardexceptions.cell +0 -0
- package/cpp.standardfunctions.cell +0 -0
- package/cpp.staticmembers.cell +0 -0
- package/cpp.streams.cell +0 -0
- package/cpp.templates.cell +0 -0
- package/cpp.userconversions.cell +0 -0
- package/index.json +1080 -1080
- package/package.json +5 -5
package/CHANGES.md
CHANGED
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
## 未發佈
|
|
7
7
|
|
|
8
|
+
- **long double**(見 `@cella-lang/cfamily`):`{"k": "tLongDouble"}`、`1.0L`;`sizeof(long double)` 是 16,`cout` 照 x87 的精度輸出,
|
|
9
|
+
`f(double)` 與 `f(long double)` 是不同的多載,`typeid` 的名字是 `e`,模板推導出 long double。判決的 `assumes` 多
|
|
10
|
+
`x86-64-sysv:longDouble.x87Extended`。`<cmath>` 的函式收到 long double(`std::sqrt(2.0L)`、`std::abs(-2.5L)`)判 unknown:模型
|
|
11
|
+
沒有 long double 的版本。`std::isnan`/`std::isinf` 改成取 long double(一個函式涵蓋全部多載,值不變)。
|
|
12
|
+
`Rules` 多一欄 `mathOverloadedByType := true`。
|
|
13
|
+
- **之前判 reject、現在判 accept**:丟棄的 `*p` 指向完整型別(`int x; int *p = &x; *p;`、`(void)*p;`、`*p, 1`)不再當讀值
|
|
14
|
+
(C++17 [expr]p12;之前 `indeterminate value`)。空指標、懸置、尾端之後的 `*p;` 照舊 reject([expr.unary.op]p1)。
|
|
15
|
+
- **之前判 accept、現在判 reject**:`class Helper; Helper *p = nullptr; *p;`(`null pointer dereference`,之前只求值指標);
|
|
16
|
+
類別在函式定義之後才定義(`class H; void f(H h) {} class H {…};`,`variable has incomplete type`,clang++ 同一句;回傳、本體的
|
|
17
|
+
`p->v`、`H h;` 也是)。成員函式照舊看整個程式。見 `@cella-lang/cfamily`。
|
|
18
|
+
|
|
8
19
|
- **型別文字改了**(型別查詢 `types().nodes` 的型別、錯誤訊息 reason 裡的型別、除錯器的標籤;判決的 kind、at 與輸出不變):
|
|
9
20
|
類別樣板的實例不再寫出和預設樣板引數相同的尾端引數,和 clang 印的標準型一樣——`std::tuple<int, int, int>`(之前
|
|
10
21
|
`std::tuple<int, int, int, std::__tuple_nil>`)、`std::tuple<int>`、`std::set<int>`(之前 `std::set<int, std::less<int>>`)、
|
|
@@ -166,6 +177,16 @@
|
|
|
166
177
|
刪除);C++17 的有號左移(`1 << 31`)、初始值省略大括號、`const std::string` 的物件照 clang 執行;函式庫的 class 沒有的成員
|
|
167
178
|
(`v.reserve(4)`)判 unknown;class 型別的成員沒給初始值時照預設成員初始值。
|
|
168
179
|
|
|
180
|
+
- **常數運算式裡的浮點數**(之前 unknown,reason `a constant whose value the model does not decide`):`const int N = 1e2 + 5;
|
|
181
|
+
int a[N];` 現在 accept,長度 105(C++17 [expr.const]、[conv.fpint]:截斷)。`const int N = 2.9;` 是 2;`(int)1e2`、`(int)(1e2 + 5)`、
|
|
182
|
+
`1.5 < 2 ? 3 : 4` 是常數;`const int N = -1.5; int a[N];` reject(負的長度);`const int N = 1e10;`(超出 int)的 N 不是常數:
|
|
183
|
+
檔案範圍的 `int a[N]` reject、區塊裡是 VLA(`gcc:vla`);`int a[1e2 + 5]`(長度是浮點數)reject;`(int)(1.0 / 0)` 不是常數。
|
|
184
|
+
`const double D` 照舊不是常數。
|
|
185
|
+
- **case 標籤、列舉常數的值**改用同一份常數求值:之前判 reject 的 `case 10 / 2:`、`case (int)1e2:`、`case N:`(N 是 `const int N = 1e2 + 5`)、
|
|
186
|
+
`enum { K = 1 << 3 }`、`enum { K = (int)2.5 }` 現在 accept;`case 1e2:` 照舊 reject;判斷不了的(例如呼叫)從 reject 改成 unknown。
|
|
187
|
+
- 判斷不了的常數的 reason 字樣從 `... in an array's length` 改成 `... in a constant expression`(kind 照舊 `unsupported`)。
|
|
188
|
+
`Rules` 多一欄 `floatingInIntegerConstants`,C++ 是 true。見 `@cella-lang/cfamily`。
|
|
189
|
+
|
|
169
190
|
## 0.1.202610291317 與之前
|
|
170
191
|
|
|
171
192
|
這一段寫成時沒有照版本切開,跟著 0.1.202610291317 與之前的版本陸續發出。裡面多半是淺嵌入的 API(`cpp.IntN`、`c.Mem`、`cpp.Debugger`…),淺嵌入已整個拿掉,這些名字都不存在了,只留作紀錄。
|
package/cpp.arrays.cell
CHANGED
|
Binary file
|
package/cpp.cell
CHANGED
|
Binary file
|
package/cpp.classes.cell
CHANGED
|
Binary file
|
package/cpp.classrules.cell
CHANGED
|
Binary file
|
package/cpp.construction.cell
CHANGED
|
Binary file
|
package/cpp.constructs.cell
CHANGED
|
Binary file
|
package/cpp.copies.cell
CHANGED
|
Binary file
|
package/cpp.exceptions.cell
CHANGED
|
Binary file
|
package/cpp.inheritance.cell
CHANGED
|
Binary file
|
package/cpp.lambdas.cell
CHANGED
|
Binary file
|
package/cpp.layouts.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.bitsets.cell
CHANGED
|
Binary file
|
package/cpp.library.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.deques.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.lists.cell
CHANGED
|
Binary file
|
package/cpp.library.maps.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.pairs.cell
CHANGED
|
Binary file
|
package/cpp.library.queues.cell
CHANGED
|
Binary file
|
package/cpp.library.sets.cell
CHANGED
|
Binary file
|
package/cpp.library.stacks.cell
CHANGED
|
Binary file
|
package/cpp.library.strings.cell
CHANGED
|
Binary file
|
package/cpp.library.trees.cell
CHANGED
|
Binary file
|
package/cpp.library.tuples.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.vectors.cell
CHANGED
|
Binary file
|
package/cpp.memberpointers.cell
CHANGED
|
Binary file
|
package/cpp.names.cell
CHANGED
|
Binary file
|
package/cpp.objects.cell
CHANGED
|
Binary file
|
package/cpp.operators.cell
CHANGED
|
Binary file
|
package/cpp.overloading.cell
CHANGED
|
Binary file
|
package/cpp.polymorphism.cell
CHANGED
|
Binary file
|
package/cpp.primitives.cell
CHANGED
|
Binary file
|
package/cpp.ranges.cell
CHANGED
|
Binary file
|
package/cpp.references.cell
CHANGED
|
Binary file
|
package/cpp.runtimetypes.cell
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp.staticmembers.cell
CHANGED
|
Binary file
|
package/cpp.streams.cell
CHANGED
|
Binary file
|
package/cpp.templates.cell
CHANGED
|
Binary file
|
package/cpp.userconversions.cell
CHANGED
|
Binary file
|