• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ArkScript-lang / Ark / 16862444454

10 Aug 2025 02:08PM UTC coverage: 87.685% (+0.8%) from 86.869%
16862444454

Pull #568

github

web-flow
Merge d1e05ae6b into c65ea7e5b
Pull Request #568: feat(closures): captures are no longer fully qualified

106 of 118 new or added lines in 11 files covered. (89.83%)

6 existing lines in 1 file now uncovered.

7633 of 8705 relevant lines covered (87.69%)

125464.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.48
/src/arkreactor/VM/Value/ClosureScope.cpp
1
#include <Ark/VM/Value/ClosureScope.hpp>
2

3
#include <Ark/VM/ScopeView.hpp>
4

5
namespace Ark::internal
6
{
7
    void ClosureScope::push_back(const uint16_t id, Value&& val)
×
8
    {
×
9
        m_data.emplace_back(id, std::move(val));
×
10
    }
×
11

12
    void ClosureScope::push_back(const uint16_t id, const Value& val)
3,119✔
13
    {
3,119✔
14
        m_data.emplace_back(id, val);
3,119✔
15
    }
3,119✔
16

17
    Value* ClosureScope::operator[](const uint16_t id_to_look_for)
2,628✔
18
    {
2,628✔
19
        for (auto& [id, value] : m_data)
23,400✔
20
        {
21
            if (id == id_to_look_for)
20,772✔
22
                return &value;
2,627✔
23
        }
20,772✔
24
        return nullptr;
1✔
25
    }
2,628✔
26

27
    void ClosureScope::mergeRefInto(ScopeView& other)
3,825✔
28
    {
3,825✔
29
        for (auto& [id, value] : m_data)
67,311✔
30
        {
31
            if (value.valueType() == ValueType::Reference)
31,743✔
NEW
32
                other.pushBack(id, value);
×
33
            else
34
                other.pushBack(id, Value(&value));
31,743✔
35
        }
31,743✔
36
    }
3,825✔
37

38
    bool operator==(const ClosureScope& A, const ClosureScope& B) noexcept
17✔
39
    {
17✔
40
        return A.m_data == B.m_data;
17✔
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc