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

ArkScript-lang / Ark / 16852602262

09 Aug 2025 06:49PM UTC coverage: 86.842% (-0.03%) from 86.869%
16852602262

Pull #568

github

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

92 of 113 new or added lines in 13 files covered. (81.42%)

6 existing lines in 2 files now uncovered.

7537 of 8679 relevant lines covered (86.84%)

125769.07 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,100✔
13
    {
3,100✔
14
        m_data.emplace_back(id, val);
3,100✔
15
    }
3,100✔
16

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

27
    void ClosureScope::mergeRefInto(ScopeView& other)
3,818✔
28
    {
3,818✔
29
        for (auto& [id, value] : m_data)
67,052✔
30
        {
31
            if (value.valueType() == ValueType::Reference)
31,617✔
NEW
32
                other.push_back(id, value);
×
33
            else
34
                other.push_back(id, Value(&value));
31,617✔
35
        }
31,617✔
36
    }
3,818✔
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