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

ArkScript-lang / Ark / 11087505602

28 Sep 2024 10:31PM UTC coverage: 75.218% (+1.6%) from 73.576%
11087505602

push

github

SuperFola
fix(json compiler): disable import solver in json compiler

1 of 1 new or added line in 1 file covered. (100.0%)

364 existing lines in 24 files now uncovered.

4841 of 6436 relevant lines covered (75.22%)

9644.12 hits per line

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

96.0
/src/arkreactor/VM/Value/Closure.cpp
1
#include <Ark/VM/Value/Closure.hpp>
2

3
#include <Ark/VM/Scope.hpp>
4
#include <Ark/VM/Value.hpp>
5
#include <Ark/VM/VM.hpp>
6

7
namespace Ark::internal
8
{
9
    Closure::Closure(const Scope& scope, const PageAddr_t pa) noexcept :
17✔
10
        m_scope(std::make_shared<Scope>(scope)),
17✔
11
        m_page_addr(pa)
17✔
12
    {}
34✔
13

14
    Closure::Closure(const std::shared_ptr<Scope>& scope_ptr, const PageAddr_t pa) noexcept :
386✔
15
        m_scope(scope_ptr),
386✔
16
        m_page_addr(pa)
386✔
17
    {}
386✔
18

19
    std::string Closure::toString(VM& vm) const noexcept
2✔
20
    {
2✔
21
        std::string out = "(";
2✔
22
        for (std::size_t i = 0, end = m_scope->m_data.size(); i < end; ++i)
4✔
23
        {
24
            if (i != 0)
2✔
UNCOV
25
                out += ' ';
×
26

27
            out += '.' + vm.m_state.m_symbols[m_scope->m_data[i].first] + '=';
2✔
28
            out += m_scope->m_data[i].second.toString(vm);
2✔
29
        }
2✔
30
        return out + ")";
2✔
31
    }
2✔
32

33
    bool operator==(const Closure& A, const Closure& B) noexcept
6✔
34
    {
6✔
35
        // they do not come from the same closure builder
36
        if (A.m_page_addr != B.m_page_addr)
6✔
37
            return false;
2✔
38

39
        return *A.m_scope == *B.m_scope;
4✔
40
    }
6✔
41
}
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