summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/core/slang-io.cpp4
-rw-r--r--source/slang/slang-ast-dump.cpp4
-rw-r--r--source/slang/slang-parameter-binding.cpp2
-rw-r--r--source/slang/slang-workspace-version.cpp10
-rw-r--r--source/slang/slang-workspace-version.h4
5 files changed, 13 insertions, 11 deletions
diff --git a/source/core/slang-io.cpp b/source/core/slang-io.cpp
index dd390fc28..928026267 100644
--- a/source/core/slang-io.cpp
+++ b/source/core/slang-io.cpp
@@ -20,7 +20,8 @@
# include <shellapi.h>
#endif
-#if defined(__linux__) || defined(__CYGWIN__) || SLANG_APPLE_FAMILY
+#if defined(__linux__) || defined(__CYGWIN__) || SLANG_APPLE_FAMILY || SLANG_WASM
+# include <fcntl.h>
# include <unistd.h>
// For Path::find
# include <fnmatch.h>
@@ -1012,6 +1013,7 @@ namespace Slang
}
return SLANG_FAIL;
#else
+ SLANG_UNUSED(outPath);
return SLANG_E_NOT_IMPLEMENTED;
#endif
}
diff --git a/source/slang/slang-ast-dump.cpp b/source/slang/slang-ast-dump.cpp
index a1ab7a5c8..b3a554e6d 100644
--- a/source/slang/slang-ast-dump.cpp
+++ b/source/slang/slang-ast-dump.cpp
@@ -304,9 +304,9 @@ struct ASTDumpContext
void dump(uint32_t v)
{
- m_writer->emit(UInt(v));
+ m_writer->emit((uint64_t)v);
}
- void dump(UInt v)
+ void dump(uint64_t v)
{
m_writer->emit(v);
}
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp
index 115ccc55e..ea22cbcba 100644
--- a/source/slang/slang-parameter-binding.cpp
+++ b/source/slang/slang-parameter-binding.cpp
@@ -3748,7 +3748,7 @@ static void _appendRange(Index start, LayoutSize size, StringBuilder& ioBuf)
ioBuf << "[ " << start << " ... ";
if (size.isFinite())
{
- ioBuf << start + size.getFiniteValue() << ")";
+ ioBuf << start + (Index)size.getFiniteValue() << ")";
}
else
{
diff --git a/source/slang/slang-workspace-version.cpp b/source/slang/slang-workspace-version.cpp
index d85724328..f3ae6271a 100644
--- a/source/slang/slang-workspace-version.cpp
+++ b/source/slang/slang-workspace-version.cpp
@@ -457,7 +457,7 @@ ArrayView<Index> DocumentVersion::getUTF8Boundaries(Index line)
}
void DocumentVersion::oneBasedUTF8LocToZeroBasedUTF16Loc(
- Index inLine, Index inCol, Index& outLine, Index& outCol)
+ Index inLine, Index inCol, int64_t& outLine, int64_t& outCol)
{
if (inLine <= 0)
{
@@ -472,12 +472,12 @@ void DocumentVersion::oneBasedUTF8LocToZeroBasedUTF16Loc(
}
void DocumentVersion::oneBasedUTF8LocToZeroBasedUTF16Loc(
- Index inLine, Index inCol, int& outLine, int& outCol)
+ Index inLine, Index inCol, int32_t& outLine, int32_t& outCol)
{
- Index ioutLine, ioutCol;
+ int64_t ioutLine, ioutCol;
oneBasedUTF8LocToZeroBasedUTF16Loc(inLine, inCol, ioutLine, ioutCol);
- outLine = (int)ioutLine;
- outCol = (int)ioutCol;
+ outLine = (int32_t)ioutLine;
+ outCol = (int32_t)ioutCol;
}
void DocumentVersion::zeroBasedUTF16LocToOneBasedUTF8Loc(
diff --git a/source/slang/slang-workspace-version.h b/source/slang/slang-workspace-version.h
index d6cbfe6c5..46d11b493 100644
--- a/source/slang/slang-workspace-version.h
+++ b/source/slang/slang-workspace-version.h
@@ -38,9 +38,9 @@ namespace Slang
ArrayView<Index> getUTF8Boundaries(Index line);
void oneBasedUTF8LocToZeroBasedUTF16Loc(
- Index inLine, Index inCol, Index& outLine, Index& outCol);
+ Index inLine, Index inCol, int64_t& outLine, int64_t& outCol);
void oneBasedUTF8LocToZeroBasedUTF16Loc(
- Index inLine, Index inCol, int& outLine, int& outCol);
+ Index inLine, Index inCol, int32_t& outLine, int32_t& outCol);
void zeroBasedUTF16LocToOneBasedUTF8Loc(
Index inLine, Index inCol, Index& outLine, Index& outCol);