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

ArkScript-lang / Ark / 14574542201

21 Apr 2025 01:44PM UTC coverage: 80.417% (-0.03%) from 80.451%
14574542201

push

github

SuperFola
fix(vm): self referencing values can be printed as such

0 of 3 new or added lines in 1 file covered. (0.0%)

1 existing line in 1 file now uncovered.

6168 of 7670 relevant lines covered (80.42%)

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

17
    Value* ClosureScope::operator[](const uint16_t id_to_look_for)
1,556✔
18
    {
1,556✔
19
        for (auto& [id, value] : m_data)
13,975✔
20
        {
21
            if (id == id_to_look_for)
12,419✔
22
                return &value;
1,554✔
23
        }
12,419✔
24
        return nullptr;
2✔
25
    }
1,556✔
26

27
    void ClosureScope::mergeRefInto(ScopeView& other)
1,983✔
28
    {
1,983✔
29
        for (auto& [id, value] : m_data)
36,351✔
30
        {
31
            if (value.valueType() == ValueType::Reference)
17,184✔
UNCOV
32
                other.push_back(id, value);
×
33
            else
34
                other.push_back(id, Value(&value));
17,184✔
35
        }
17,184✔
36
    }
1,983✔
37

38
    bool operator==(const ClosureScope& A, const ClosureScope& B) noexcept
9✔
39
    {
9✔
40
        return A.m_data == B.m_data;
9✔
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