Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
e8ccd254
Commit
e8ccd254
authored
Jan 30, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved runtime performace
parent
88e72355
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
309 deletions
+142
-309
src/shared/vm/context.hpp
src/shared/vm/context.hpp
+2
-5
src/shared/vm/variant.hpp
src/shared/vm/variant.hpp
+19
-2
src/shared/vm/vm.hpp
src/shared/vm/vm.hpp
+121
-302
No files found.
src/shared/vm/context.hpp
View file @
e8ccd254
...
@@ -29,14 +29,11 @@ typedef std::map<uint32_t, ExternReference> ExternsMap;
...
@@ -29,14 +29,11 @@ typedef std::map<uint32_t, ExternReference> ExternsMap;
// module_id|alg_id -> instructions
// module_id|alg_id -> instructions
typedef
std
::
map
<
uint32_t
,
Bytecode
::
TableElem
>
FunctionMap
;
typedef
std
::
map
<
uint32_t
,
Bytecode
::
TableElem
>
FunctionMap
;
// module_id|global_id
typedef
std
::
pair
<
uint8_t
,
uint16_t
>
GlobalsIndex
;
// module_id|global_id -> global variable
// module_id|global_id -> global variable
typedef
std
::
map
<
GlobalsIndex
,
Variable
>
GlobalsMap
;
typedef
std
::
vector
<
std
::
vector
<
Variable
>
>
GlobalsMap
;
// constant_id -> constant value
// constant_id -> constant value
typedef
std
::
map
<
uint16_t
,
Variable
>
ConstantsMap
;
typedef
std
::
vector
<
Variable
>
ConstantsMap
;
typedef
std
::
vector
<
Variable
>
VariantArray
;
typedef
std
::
vector
<
Variable
>
VariantArray
;
...
...
src/shared/vm/variant.hpp
View file @
e8ccd254
...
@@ -382,8 +382,25 @@ public:
...
@@ -382,8 +382,25 @@ public:
inline
Char
toChar
()
const
{
return
value
().
toChar
();
}
inline
Char
toChar
()
const
{
return
value
().
toChar
();
}
inline
String
toString
()
const
;
inline
String
toString
()
const
;
inline
String
toString
(
int
indeces
[
4
])
const
;
inline
String
toString
(
int
indeces
[
4
])
const
;
inline
const
Record
toRecord
()
const
{
return
value
().
toRecord
();
}
inline
const
Record
toRecord
()
const
{
inline
Record
&
toRecord
()
{
return
value
().
toRecord
();
}
if
(
m_reference
)
{
const
Record
result
=
m_reference
->
toRecord
();
return
result
;
}
else
{
return
m_value
.
toRecord
();
}
}
inline
Record
&
toRecord
()
{
if
(
m_reference
)
{
Record
&
result
=
m_reference
->
toRecord
();
return
result
;
}
else
{
Record
&
result
=
m_value
.
toRecord
();
return
result
;
}
}
inline
Variable
toReference
();
inline
Variable
toReference
();
inline
static
Variable
toConstReference
(
const
AnyValue
&
value
);
inline
static
Variable
toConstReference
(
const
AnyValue
&
value
);
...
...
src/shared/vm/vm.hpp
View file @
e8ccd254
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment