mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
common: fix 178+ spelling errors
This commit is contained in:
parent
98c6d92793
commit
e061fa6628
153 changed files with 496 additions and 495 deletions
4
.github/workflows/build_ios.yml
vendored
4
.github/workflows/build_ios.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Unbreak Python in Github Actions
|
||||
- name: Unbreak Python in GitHub Actions
|
||||
run: |
|
||||
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
|
||||
sudo rm -rf /Library/Frameworks/Python.framework/
|
||||
|
@ -45,7 +45,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Unbreak Python in Github Actions
|
||||
- name: Unbreak Python in GitHub Actions
|
||||
run: |
|
||||
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
|
||||
sudo rm -rf /Library/Frameworks/Python.framework/
|
||||
|
|
8
.github/workflows/build_macos.yml
vendored
8
.github/workflows/build_macos.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: MacOS
|
||||
name: macOS
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -16,7 +16,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Unbreak Python in Github Actions
|
||||
- name: Unbreak Python in GitHub Actions
|
||||
run: |
|
||||
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
|
||||
sudo rm -rf /Library/Frameworks/Python.framework/
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Unbreak Python in Github Actions
|
||||
- name: Unbreak Python in GitHub Actions
|
||||
run: |
|
||||
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
|
||||
sudo rm -rf /Library/Frameworks/Python.framework/
|
||||
|
@ -63,7 +63,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Unbreak Python in Github Actions
|
||||
- name: Unbreak Python in GitHub Actions
|
||||
run: |
|
||||
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
|
||||
sudo rm -rf /Library/Frameworks/Python.framework/
|
||||
|
|
2
.github/workflows/regression.yml
vendored
2
.github/workflows/regression.yml
vendored
|
@ -58,7 +58,7 @@ jobs:
|
|||
run: |
|
||||
mv test/regression/settings_comparison.toml settings.toml
|
||||
|
||||
- name: Store Crashing/Leaking/Timeouting Images
|
||||
- name: Store Crashing/Leaking/Timing out Images
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: crashing-leaking-timeouting-images
|
||||
|
|
1
AUTHORS
1
AUTHORS
|
@ -31,3 +31,4 @@ Lucas Niu <hoiyu3twon9@gmail.com>
|
|||
Francisco Ramírez <franchuti688@gmail.com>
|
||||
Abdelrahman Ashraf <a.theashraf@gmail.com>
|
||||
Neo Xu <neo.xu1990@gmail.com>
|
||||
Josh Soref <jsoref@gmail.com>
|
||||
|
|
|
@ -60,7 +60,7 @@ representative at an online or offline event.
|
|||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders, who are listed in CODEOWNERS, responsible for
|
||||
enforcement at coummunity leaders.
|
||||
enforcement at community leaders.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<br>
|
||||
[](https://github.com/thorvg/thorvg/actions/workflows/build_ubuntu.yml)
|
||||
[](https://github.com/thorvg/thorvg/actions/workflows/build_windows.yml)
|
||||
[](https://github.com/thorvg/thorvg/actions/workflows/build_macos.yml)
|
||||
[](https://github.com/thorvg/thorvg/actions/workflows/build_macos.yml)
|
||||
[](https://github.com/thorvg/thorvg/actions/workflows/build_ios.yml)
|
||||
[](https://github.com/thorvg/thorvg/actions/workflows/build_android.yml)
|
||||
|
||||
|
@ -32,7 +32,7 @@ The following list shows primitives that are supported by ThorVG: <br />
|
|||
<p align="center">
|
||||
<img width="700" height="auto" src="https://github.com/thorvg/thorvg/blob/main/res/example_primitives.png">
|
||||
</p>
|
||||
ThorVG is designed for a wide range of programs, offering adaptability for integration and use in various applications and systems. It achieves this through a single binary with selectively buildable, modular components in a building block style. This ensures both optimal size and easy maintanence. <br />
|
||||
ThorVG is designed for a wide range of programs, offering adaptability for integration and use in various applications and systems. It achieves this through a single binary with selectively buildable, modular components in a building block style. This ensures both optimal size and easy maintenance. <br />
|
||||
<br />
|
||||
<p align="center">
|
||||
<img width="700" height="auto" src="https://github.com/thorvg/thorvg/blob/main/res/example_structure.png">
|
||||
|
|
|
@ -466,7 +466,7 @@ LOOKUP_CACHE_SIZE = 0
|
|||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which efficively disables parallel processing. Please report any issues you
|
||||
# which effectively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
@ -582,14 +582,14 @@ INTERNAL_DOCS = NO
|
|||
|
||||
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
|
||||
# able to match the capabilities of the underlying filesystem. In case the
|
||||
# filesystem is case sensitive (i.e. it supports files in the same directory
|
||||
# filesystem is case-sensitive (i.e. it supports files in the same directory
|
||||
# whose names only differ in casing), the option must be set to YES to properly
|
||||
# deal with such files in case they appear in the input. For filesystems that
|
||||
# are not case sensitive the option should be be set to NO to properly deal with
|
||||
# are not case-sensitive the option should be be set to NO to properly deal with
|
||||
# output files written for symbols that only differ in casing, such as for two
|
||||
# classes, one named CLASS and the other named Class, and to also support
|
||||
# references to files without having to specify the exact matching casing. On
|
||||
# Windows (including Cygwin) and MacOS, users should typically set this option
|
||||
# Windows (including Cygwin) and macOS, users should typically set this option
|
||||
# to NO, whereas on Linux or other Unix flavors it should typically be set to
|
||||
# YES.
|
||||
# The default value is: system dependent.
|
||||
|
@ -755,7 +755,7 @@ SHOW_NAMESPACES = NO
|
|||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
# the version control system). Doxygen will invoke the program by executing (via
|
||||
# popen()) the command command input-file, where command is the value of the
|
||||
# popen()) the command input-file, where command is the value of the
|
||||
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
|
||||
# by doxygen. Whatever the program writes to standard output is used as the file
|
||||
# version. For an example see the documentation.
|
||||
|
|
|
@ -93,7 +93,7 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
|
|||
<tr id="row_0_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Point.html" target="_self">Point</a></td><td class="desc">A data structure representing a point in two-dimensional space </td></tr>
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Matrix.html" target="_self">Matrix</a></td><td class="desc">A data structure representing a three-dimensional matrix </td></tr>
|
||||
<tr id="row_0_2_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Vertex.html" target="_self">Vertex</a></td><td class="desc">A data structure representing a texture mesh vertex </td></tr>
|
||||
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Polygon.html" target="_self">Polygon</a></td><td class="desc">A data structure representing a triange in a texture mesh </td></tr>
|
||||
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Polygon.html" target="_self">Polygon</a></td><td class="desc">A data structure representing a triangle in a texture mesh </td></tr>
|
||||
<tr id="row_0_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtvg_1_1Paint.html" target="_self">Paint</a></td><td class="desc">An abstract class for managing graphical elements </td></tr>
|
||||
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_0_5_" class="arrow" onclick="toggleFolder('0_5_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtvg_1_1Fill.html" target="_self">Fill</a></td><td class="desc">An abstract class representing the gradient fill of the <a class="el" href="classtvg_1_1Shape.html" title="A class representing two-dimensional figures and their properties.">Shape</a> object </td></tr>
|
||||
<tr id="row_0_5_0_"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Fill_1_1ColorStop.html" target="_self">ColorStop</a></td><td class="desc">A data structure storing the information about the color and its relative position inside the gradient bounds </td></tr>
|
||||
|
|
|
@ -326,8 +326,8 @@ Public Member Functions</h2></td></tr>
|
|||
<p>In case <code>transform</code> is <code>true</code>, all object's transformations are applied first, and then the bounding box is established. Otherwise, the bounding box is determined before any transformations.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">x</td><td>The x coordinate of the upper left corner of the object. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">y</td><td>The y coordinate of the upper left corner of the object. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">x</td><td>The x-coordinate of the upper-left corner of the object. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">y</td><td>The y-coordinate of the upper-left corner of the object. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">w</td><td>The width of the object. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">h</td><td>The height of the object. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">transformed</td><td>If <code>true</code>, the paint's transformations are taken into account, otherwise they aren't.</td></tr>
|
||||
|
@ -711,7 +711,7 @@ ClipPath won't use the opacity value. (see: enum class <a class="el" href="group
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the values by which the object is moved in a two-dimensional space. </p>
|
||||
<p>The origin of the coordinate system is in the upper left corner of the canvas. The horizontal and vertical axes point to the right and down, respectively.</p>
|
||||
<p>The origin of the coordinate system is in the upper-left corner of the canvas. The horizontal and vertical axes point to the right and down, respectively.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>The value of the horizontal shift. </td></tr>
|
||||
|
|
|
@ -119,7 +119,7 @@ Static Public Member Functions</h2></td></tr>
|
|||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>A class for exporting a paint object into a specified file, from which to recover the paint data later. </p>
|
||||
<p>ThorVG provides a feature for exporting & importing paint data. The <a class="el" href="classtvg_1_1Saver.html" title="A class for exporting a paint object into a specified file, from which to recover the paint data late...">Saver</a> role is to export the paint data to a file. It's useful when you need to save the composed scene or image from a paint object and recreate it later.</p>
|
||||
<p>The file format is decided by the extension name(i.e. "*.tvg") while the supported formats depend on the TVG packaging environment. If it doesn't support the file format, the <a class="el" href="classtvg_1_1Saver.html#acda492a458f3ddc2da01df672ecd85bd" title="Exports the given paint data to the given path.">save()</a> method returns the <code>Result::NonSuppport</code> result.</p>
|
||||
<p>The file format is decided by the extension name(i.e. "*.tvg") while the supported formats depend on the TVG packaging environment. If it doesn't support the file format, the <a class="el" href="classtvg_1_1Saver.html#acda492a458f3ddc2da01df672ecd85bd" title="Exports the given paint data to the given path.">save()</a> method returns the <code>Result::NonSupport</code> result.</p>
|
||||
<p>Once you export a paint to the file successfully, you can recreate it using the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> class.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Picture.html#aaf06be7d0b572c5ce35315cbddd7d318" title="Loads a picture data directly from a file.">Picture::load()</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>0.5 </dd></dl>
|
||||
|
|
|
@ -535,13 +535,13 @@ Static Public Member Functions</h2></td></tr>
|
|||
|
||||
<p>Appends a rectangle to the path. </p>
|
||||
<p>The rectangle with rounded corners can be achieved by setting non-zero values to <code>rx</code> and <code>ry</code> arguments. The <code>rx</code> and <code>ry</code> values specify the radii of the ellipse defining the rounding of the corners.</p>
|
||||
<p>The position of the rectangle is specified by the coordinates of its upper left corner - <code>x</code> and <code>y</code> arguments.</p>
|
||||
<p>The position of the rectangle is specified by the coordinates of its upper-left corner - <code>x</code> and <code>y</code> arguments.</p>
|
||||
<p>The rectangle is treated as a new sub-path - it is not connected with the previous sub-path.</p>
|
||||
<p>The value of the current point is set to (<code>x</code> + <code>rx</code>, <code>y</code>) - in case <code>rx</code> is greater than <code>w/2</code> the current point is set to (<code>x</code> + <code>w/2</code>, <code>y</code>)</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>The horizontal coordinate of the upper left corner of the rectangle. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>The vertical coordinate of the upper left corner of the rectangle. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>The horizontal coordinate of the upper-left corner of the rectangle. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>The vertical coordinate of the upper-left corner of the rectangle. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>The width of the rectangle. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>The height of the rectangle. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">rx</td><td>The x-axis radius of the ellipse defining the rounded corners of the rectangle. </td></tr>
|
||||
|
|
|
@ -107,7 +107,7 @@ Classes</h2></td></tr>
|
|||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A data structure representing a texture mesh vertex. <a href="structtvg_1_1Vertex.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structtvg_1_1Polygon.html">Polygon</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A data structure representing a triange in a texture mesh. <a href="structtvg_1_1Polygon.html#details">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A data structure representing a triangle in a texture mesh. <a href="structtvg_1_1Polygon.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html">Paint</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">An abstract class for managing graphical elements. <a href="classtvg_1_1Paint.html#details">More...</a><br /></td></tr>
|
||||
|
|
|
@ -109,7 +109,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically:</di
|
|||
<tr id="row_7_2_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtvg_1_1Shape.html" target="_self">Shape</a></td><td class="desc">A class representing two-dimensional figures and their properties </td></tr>
|
||||
<tr id="row_7_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtvg_1_1Text.html" target="_self">Text</a></td><td class="desc">A class to represent text objects in a graphical context, allowing for rendering and manipulation of unicode text </td></tr>
|
||||
<tr id="row_8_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Point.html" target="_self">Point</a></td><td class="desc">A data structure representing a point in two-dimensional space </td></tr>
|
||||
<tr id="row_9_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Polygon.html" target="_self">Polygon</a></td><td class="desc">A data structure representing a triange in a texture mesh </td></tr>
|
||||
<tr id="row_9_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Polygon.html" target="_self">Polygon</a></td><td class="desc">A data structure representing a triangle in a texture mesh </td></tr>
|
||||
<tr id="row_10_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtvg_1_1Saver.html" target="_self">Saver</a></td><td class="desc">A class for exporting a paint object into a specified file, from which to recover the paint data later </td></tr>
|
||||
<tr id="row_11_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtvg_1_1Vertex.html" target="_self">Vertex</a></td><td class="desc">A data structure representing a texture mesh vertex </td></tr>
|
||||
</table>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<map id="Graphical Class Hierarchy" name="Graphical Class Hierarchy">
|
||||
<area shape="rect" id="node1" href="$structtvg_1_1Polygon.html" title="A data structure representing a triange in a texture mesh." alt="" coords="5,5,80,32"/>
|
||||
<area shape="rect" id="node1" href="$structtvg_1_1Polygon.html" title="A data structure representing a triangle in a texture mesh." alt="" coords="5,5,80,32"/>
|
||||
</map>
|
||||
|
|
|
@ -146,7 +146,7 @@ $(document).ready(function(){initNavTree('hierarchy.html',''); initResizable();
|
|||
</td></tr>
|
||||
<tr><td><img src="inherit_graph_9.png" border="0" usemap="#aPolygon" alt=""/>
|
||||
<map name="aPolygon" id="aPolygon">
|
||||
<area shape="rect" href="structtvg_1_1Polygon.html" title="A data structure representing a triange in a texture mesh." alt="" coords="5,5,80,32"/>
|
||||
<area shape="rect" href="structtvg_1_1Polygon.html" title="A data structure representing a triangle in a texture mesh." alt="" coords="5,5,80,32"/>
|
||||
</map>
|
||||
</td></tr>
|
||||
<tr><td><img src="inherit_graph_10.png" border="0" usemap="#aSaver" alt=""/>
|
||||
|
|
|
@ -90,20 +90,20 @@ $(document).ready(function(){initNavTree('structtvg_1_1Polygon.html',''); initRe
|
|||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>A data structure representing a triange in a texture mesh.
|
||||
<p>A data structure representing a triangle in a texture mesh.
|
||||
<a href="structtvg_1_1Polygon.html#details">More...</a></p>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for Polygon:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><img src="structtvg_1_1Polygon__coll__graph.png" border="0" usemap="#aPolygon_coll__map" alt="Collaboration graph"/></div>
|
||||
<map name="aPolygon_coll__map" id="aPolygon_coll__map">
|
||||
<area shape="rect" title="A data structure representing a triange in a texture mesh." alt="" coords="5,199,80,225"/>
|
||||
<area shape="rect" title="A data structure representing a triangle in a texture mesh." alt="" coords="5,199,80,225"/>
|
||||
<area shape="rect" href="structtvg_1_1Vertex.html" title="A data structure representing a texture mesh vertex." alt="" coords="11,109,75,136"/>
|
||||
<area shape="rect" href="structtvg_1_1Point.html" title="A data structure representing a point in two-dimensional space." alt="" coords="15,5,70,32"/>
|
||||
</map>
|
||||
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>A data structure representing a triange in a texture mesh. </p>
|
||||
<div class="textblock"><p>A data structure representing a triangle in a texture mesh. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">vertex</td><td>The three vertices that make up the polygon</td></tr>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<map id="Polygon" name="Polygon">
|
||||
<area shape="rect" id="node1" title="A data structure representing a triange in a texture mesh." alt="" coords="5,199,80,225"/>
|
||||
<area shape="rect" id="node1" title="A data structure representing a triangle in a texture mesh." alt="" coords="5,199,80,225"/>
|
||||
<area shape="rect" id="node2" href="$structtvg_1_1Vertex.html" title="A data structure representing a texture mesh vertex." alt="" coords="11,109,75,136"/>
|
||||
<area shape="rect" id="node3" href="$structtvg_1_1Point.html" title="A data structure representing a point in two-dimensional space." alt="" coords="15,5,70,32"/>
|
||||
</map>
|
||||
|
|
|
@ -833,7 +833,7 @@ $(document).ready(function(){initNavTree('thorvg_8h_source.html',''); initResiza
|
|||
<div class="ttc" id="astructtvg_1_1Fill_1_1ColorStop_html_af4007aacd75b22aee32dba9ea96082c0"><div class="ttname"><a href="structtvg_1_1Fill_1_1ColorStop.html#af4007aacd75b22aee32dba9ea96082c0">tvg::Fill::ColorStop::a</a></div><div class="ttdeci">uint8_t a</div><div class="ttdef"><b>Definition:</b> thorvg.h:449</div></div>
|
||||
<div class="ttc" id="astructtvg_1_1Matrix_html"><div class="ttname"><a href="structtvg_1_1Matrix.html">tvg::Matrix</a></div><div class="ttdoc">A data structure representing a three-dimensional matrix.</div><div class="ttdef"><b>Definition:</b> thorvg.h:228</div></div>
|
||||
<div class="ttc" id="astructtvg_1_1Point_html"><div class="ttname"><a href="structtvg_1_1Point.html">tvg::Point</a></div><div class="ttdoc">A data structure representing a point in two-dimensional space.</div><div class="ttdef"><b>Definition:</b> thorvg.h:215</div></div>
|
||||
<div class="ttc" id="astructtvg_1_1Polygon_html"><div class="ttname"><a href="structtvg_1_1Polygon.html">tvg::Polygon</a></div><div class="ttdoc">A data structure representing a triange in a texture mesh.</div><div class="ttdef"><b>Definition:</b> thorvg.h:258</div></div>
|
||||
<div class="ttc" id="astructtvg_1_1Polygon_html"><div class="ttname"><a href="structtvg_1_1Polygon.html">tvg::Polygon</a></div><div class="ttdoc">A data structure representing a triangle in a texture mesh.</div><div class="ttdef"><b>Definition:</b> thorvg.h:258</div></div>
|
||||
<div class="ttc" id="astructtvg_1_1Vertex_html"><div class="ttname"><a href="structtvg_1_1Vertex.html">tvg::Vertex</a></div><div class="ttdoc">A data structure representing a texture mesh vertex.</div><div class="ttdef"><b>Definition:</b> thorvg.h:244</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
|
|
@ -116,7 +116,7 @@ void contents()
|
|||
//Set a gradient fill
|
||||
tvg_shape_set_radial_gradient(shape3, grad2);
|
||||
|
||||
//Prepaer a radial gradient for the stroke
|
||||
//Prepare a radial gradient for the stroke
|
||||
uint32_t cnt;
|
||||
const Tvg_Color_Stop* color_stops2_get;
|
||||
tvg_gradient_get_color_stops(grad2, &color_stops2_get, &cnt);
|
||||
|
|
|
@ -40,7 +40,7 @@ struct UserExample : tvgexam::Example
|
|||
|
||||
//Load a necessary font data.
|
||||
//The loaded font will be released when the Initializer::term() is called.
|
||||
//Otherwise, you can immedately unload the font data.
|
||||
//Otherwise, you can immediately unload the font data.
|
||||
//Please check Text::unload() APIs.
|
||||
if (!tvgexam::verify(tvg::Text::load(EXAMPLE_DIR"/font/Arial.ttf"))) return false;
|
||||
if (!tvgexam::verify(tvg::Text::load(EXAMPLE_DIR"/font/NanumGothicCoding.ttf"))) return false;
|
||||
|
|
|
@ -28,10 +28,10 @@ using namespace std;
|
|||
/* ThorVG Saving Contents */
|
||||
/************************************************************************/
|
||||
|
||||
unique_ptr<tvg::Paint> tvgTexmap(uint32_t * data, int width, int heigth)
|
||||
unique_ptr<tvg::Paint> tvgTexmap(uint32_t * data, int width, int height)
|
||||
{
|
||||
auto texmap = tvg::Picture::gen();
|
||||
if (!tvgexam::verify(texmap->load(data, width, heigth, true, true))) return nullptr;
|
||||
if (!tvgexam::verify(texmap->load(data, width, height, true, true))) return nullptr;
|
||||
texmap->translate(100, 100);
|
||||
|
||||
//Composing Meshes
|
||||
|
@ -57,10 +57,10 @@ unique_ptr<tvg::Paint> tvgTexmap(uint32_t * data, int width, int heigth)
|
|||
return texmap;
|
||||
}
|
||||
|
||||
unique_ptr<tvg::Paint> tvgClippedImage(uint32_t * data, int width, int heigth)
|
||||
unique_ptr<tvg::Paint> tvgClippedImage(uint32_t * data, int width, int height)
|
||||
{
|
||||
auto image = tvg::Picture::gen();
|
||||
if (!tvgexam::verify(image->load(data, width, heigth, true, true))) return nullptr;
|
||||
if (!tvgexam::verify(image->load(data, width, height, true, true))) return nullptr;
|
||||
image->translate(400, 0);
|
||||
image->scale(2);
|
||||
|
||||
|
|
16
inc/thorvg.h
16
inc/thorvg.h
|
@ -249,7 +249,7 @@ struct Vertex
|
|||
|
||||
|
||||
/**
|
||||
* @brief A data structure representing a triange in a texture mesh
|
||||
* @brief A data structure representing a triangle in a texture mesh
|
||||
*
|
||||
* @param vertex The three vertices that make up the polygon
|
||||
*
|
||||
|
@ -295,7 +295,7 @@ public:
|
|||
/**
|
||||
* @brief Sets the values by which the object is moved in a two-dimensional space.
|
||||
*
|
||||
* The origin of the coordinate system is in the upper left corner of the canvas.
|
||||
* The origin of the coordinate system is in the upper-left corner of the canvas.
|
||||
* The horizontal and vertical axes point to the right and down, respectively.
|
||||
*
|
||||
* @param[in] x The value of the horizontal shift.
|
||||
|
@ -360,8 +360,8 @@ public:
|
|||
*
|
||||
* In case @p transform is @c true, all object's transformations are applied first, and then the bounding box is established. Otherwise, the bounding box is determined before any transformations.
|
||||
*
|
||||
* @param[out] x The x coordinate of the upper left corner of the object.
|
||||
* @param[out] y The y coordinate of the upper left corner of the object.
|
||||
* @param[out] x The x-coordinate of the upper-left corner of the object.
|
||||
* @param[out] y The y-coordinate of the upper-left corner of the object.
|
||||
* @param[out] w The width of the object.
|
||||
* @param[out] h The height of the object.
|
||||
* @param[in] transformed If @c true, the paint's transformations are taken into account, otherwise they aren't.
|
||||
|
@ -832,15 +832,15 @@ public:
|
|||
* The rectangle with rounded corners can be achieved by setting non-zero values to @p rx and @p ry arguments.
|
||||
* The @p rx and @p ry values specify the radii of the ellipse defining the rounding of the corners.
|
||||
*
|
||||
* The position of the rectangle is specified by the coordinates of its upper left corner - @p x and @p y arguments.
|
||||
* The position of the rectangle is specified by the coordinates of its upper-left corner - @p x and @p y arguments.
|
||||
*
|
||||
* The rectangle is treated as a new sub-path - it is not connected with the previous sub-path.
|
||||
*
|
||||
* The value of the current point is set to (@p x + @p rx, @p y) - in case @p rx is greater
|
||||
* than @p w/2 the current point is set to (@p x + @p w/2, @p y)
|
||||
*
|
||||
* @param[in] x The horizontal coordinate of the upper left corner of the rectangle.
|
||||
* @param[in] y The vertical coordinate of the upper left corner of the rectangle.
|
||||
* @param[in] x The horizontal coordinate of the upper-left corner of the rectangle.
|
||||
* @param[in] y The vertical coordinate of the upper-left corner of the rectangle.
|
||||
* @param[in] w The width of the rectangle.
|
||||
* @param[in] h The height of the rectangle.
|
||||
* @param[in] rx The x-axis radius of the ellipse defining the rounded corners of the rectangle.
|
||||
|
@ -1901,7 +1901,7 @@ public:
|
|||
* It's useful when you need to save the composed scene or image from a paint object and recreate it later.
|
||||
*
|
||||
* The file format is decided by the extension name(i.e. "*.tvg") while the supported formats depend on the TVG packaging environment.
|
||||
* If it doesn't support the file format, the save() method returns the @c Result::NonSuppport result.
|
||||
* If it doesn't support the file format, the save() method returns the @c Result::NonSupport result.
|
||||
*
|
||||
* Once you export a paint to the file successfully, you can recreate it using the Picture class.
|
||||
*
|
||||
|
|
|
@ -823,7 +823,7 @@ TVG_API Tvg_Result tvg_paint_rotate(Tvg_Paint* paint, float degree);
|
|||
/*!
|
||||
* \brief Moves the given Tvg_Paint in a two-dimensional space.
|
||||
*
|
||||
* The origin of the coordinate system is in the upper left corner of the canvas.
|
||||
* The origin of the coordinate system is in the upper-left corner of the canvas.
|
||||
* The horizontal and vertical axes point to the right and down, respectively.
|
||||
*
|
||||
* \param[in] paint The Tvg_Paint object to be shifted.
|
||||
|
@ -906,8 +906,8 @@ TVG_API Tvg_Paint* tvg_paint_duplicate(Tvg_Paint* paint);
|
|||
* \brief Gets the axis-aligned bounding box of the Tvg_Paint object.
|
||||
*
|
||||
* \param[in] paint The Tvg_Paint object of which to get the bounds.
|
||||
* \param[out] x The x coordinate of the upper left corner of the object.
|
||||
* \param[out] y The y coordinate of the upper left corner of the object.
|
||||
* \param[out] x The x-coordinate of the upper-left corner of the object.
|
||||
* \param[out] y The y-coordinate of the upper-left corner of the object.
|
||||
* \param[out] w The width of the object.
|
||||
* \param[out] h The height of the object.
|
||||
* \param[in] transformed If @c true, the transformation of the paint is taken into account, otherwise it isn't.
|
||||
|
@ -1114,7 +1114,7 @@ TVG_API Tvg_Result tvg_shape_close(Tvg_Paint* paint);
|
|||
* The rectangle with rounded corners can be achieved by setting non-zero values to @p rx and @p ry arguments.
|
||||
* The @p rx and @p ry values specify the radii of the ellipse defining the rounding of the corners.
|
||||
*
|
||||
* The position of the rectangle is specified by the coordinates of its upper left corner - @p x and @p y arguments.
|
||||
* The position of the rectangle is specified by the coordinates of its upper-left corner - @p x and @p y arguments.
|
||||
*
|
||||
* The rectangle is treated as a new sub-path - it is not connected with the previous sub-path.
|
||||
*
|
||||
|
@ -1122,8 +1122,8 @@ TVG_API Tvg_Result tvg_shape_close(Tvg_Paint* paint);
|
|||
* than @p w/2 the current point is set to (@p x + @p w/2, @p y)
|
||||
*
|
||||
* \param[in] paint A Tvg_Paint pointer to the shape object.
|
||||
* \param[in] x The horizontal coordinate of the upper left corner of the rectangle.
|
||||
* \param[in] y The vertical coordinate of the upper left corner of the rectangle.
|
||||
* \param[in] x The horizontal coordinate of the upper-left corner of the rectangle.
|
||||
* \param[in] y The vertical coordinate of the upper-left corner of the rectangle.
|
||||
* \param[in] w The width of the rectangle.
|
||||
* \param[in] h The height of the rectangle.
|
||||
* \param[in] rx The x-axis radius of the ellipse defining the rounded corners of the rectangle.
|
||||
|
@ -2379,7 +2379,7 @@ TVG_API Tvg_Animation* tvg_animation_new(void);
|
|||
* \brief Specifies the current frame in the animation.
|
||||
*
|
||||
* \param[in] animation A Tvg_Animation pointer to the animation object.
|
||||
* \param[in] no The index of the animation frame to be displayed. The index should be less than the tvg_animatio_total_frame().
|
||||
* \param[in] no The index of the animation frame to be displayed. The index should be less than the tvg_animation_get_total_frame().
|
||||
*
|
||||
* \return Tvg_Result enumeration.
|
||||
* \retval TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Animation pointer.
|
||||
|
@ -2572,7 +2572,7 @@ TVG_API Tvg_Result tvg_lottie_animation_set_marker(Tvg_Animation* animation, con
|
|||
* \brief Gets the marker count of the animation.
|
||||
*
|
||||
* \param[in] animation The Tvg_Animation pointer to the Lottie animation object.
|
||||
* \param[out] cnt The count value of the merkers.
|
||||
* \param[out] cnt The count value of the markers.
|
||||
*
|
||||
* \return Tvg_Result enumeration.
|
||||
* \retval TVG_RESULT_INVALID_ARGUMENT In case a @c nullptr is passed as the argument.
|
||||
|
|
|
@ -306,7 +306,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
// TODO: Advanced APIs wrt Interactivty & theme methods...
|
||||
// TODO: Advanced APIs wrt Interactivity & theme methods...
|
||||
|
||||
private:
|
||||
explicit TvgLottieAnimation()
|
||||
|
|
|
@ -70,7 +70,7 @@ enum jpgd_status
|
|||
JPGD_BAD_DHT_COUNTS = -256, JPGD_BAD_DHT_INDEX, JPGD_BAD_DHT_MARKER, JPGD_BAD_DQT_MARKER, JPGD_BAD_DQT_TABLE,
|
||||
JPGD_BAD_PRECISION, JPGD_BAD_HEIGHT, JPGD_BAD_WIDTH, JPGD_TOO_MANY_COMPONENTS,
|
||||
JPGD_BAD_SOF_LENGTH, JPGD_BAD_VARIABLE_MARKER, JPGD_BAD_DRI_LENGTH, JPGD_BAD_SOS_LENGTH,
|
||||
JPGD_BAD_SOS_COMP_ID, JPGD_W_EXTRA_BYTES_BEFORE_MARKER, JPGD_NO_ARITHMITIC_SUPPORT, JPGD_UNEXPECTED_MARKER,
|
||||
JPGD_BAD_SOS_COMP_ID, JPGD_W_EXTRA_BYTES_BEFORE_MARKER, JPGD_NO_ARITHMETIC_SUPPORT, JPGD_UNEXPECTED_MARKER,
|
||||
JPGD_NOT_JPEG, JPGD_UNSUPPORTED_MARKER, JPGD_BAD_DQT_LENGTH, JPGD_TOO_MANY_BLOCKS,
|
||||
JPGD_UNDEFINED_QUANT_TABLE, JPGD_UNDEFINED_HUFF_TABLE, JPGD_NOT_SINGLE_SCAN, JPGD_UNSUPPORTED_COLORSPACE,
|
||||
JPGD_UNSUPPORTED_SAMP_FACTORS, JPGD_DECODE_ERROR, JPGD_BAD_RESTART_MARKER, JPGD_ASSERTION_ERROR,
|
||||
|
@ -1382,9 +1382,9 @@ int jpeg_decoder::process_markers()
|
|||
read_dht_marker();
|
||||
break;
|
||||
}
|
||||
// No arithmitic support - dumb patents!
|
||||
// No arithmetic support - dumb patents!
|
||||
case M_DAC: {
|
||||
stop_decoding(JPGD_NO_ARITHMITIC_SUPPORT);
|
||||
stop_decoding(JPGD_NO_ARITHMETIC_SUPPORT);
|
||||
break;
|
||||
}
|
||||
case M_DQT: {
|
||||
|
@ -1466,8 +1466,8 @@ void jpeg_decoder::locate_sof_marker()
|
|||
read_sof_marker();
|
||||
break;
|
||||
}
|
||||
case M_SOF9: { /* Arithmitic coding */
|
||||
stop_decoding(JPGD_NO_ARITHMITIC_SUPPORT);
|
||||
case M_SOF9: { /* Arithmetic coding */
|
||||
stop_decoding(JPGD_NO_ARITHMETIC_SUPPORT);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
@ -1831,7 +1831,7 @@ void jpeg_decoder::process_restart()
|
|||
int i;
|
||||
int c = 0;
|
||||
|
||||
// Align to a byte boundry
|
||||
// Align to a byte boundary
|
||||
// FIXME: Is this really necessary? get_bits_no_markers() never reads in markers!
|
||||
//get_bits_no_markers(m_bits_left & 7);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ ECMA_ERROR_DEF (ECMA_ERR_STACK_LIMIT_EXCEEDED, "Stack limit exceeded")
|
|||
ECMA_ERROR_DEF (ECMA_ERR_TARGET_IS_NOT_OBJECT, "Target is not Object")
|
||||
#endif /* JERRY_BUILTIN_WEAKREF */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ECMA_ERROR_DEF (ECMA_ERR_BIGINT_VALUE_EXCPECTED, "BigInt value expected")
|
||||
ECMA_ERROR_DEF (ECMA_ERR_BIGINT_VALUE_EXPECTED, "BigInt value expected")
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
ECMA_ERROR_DEF (ECMA_ERR_BINDING_CANNOT_SET, "Binding cannot be set")
|
||||
#if JERRY_BUILTIN_STRING
|
||||
|
@ -416,7 +416,7 @@ ECMA_ERROR_DEF (ECMA_ERR_ARGUMENT_THIS_NOT_REG_EXP, "Argument 'this' is not a va
|
|||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
ECMA_ERROR_DEF (ECMA_ERR_ARRAY_BUFFER_DETACHED, "ArrayBuffer has already been detached")
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
ECMA_ERROR_DEF (ECMA_ERR_BULTIN_ROUTINES_HAVE_NO_CONSTRUCTOR, "Built-in routines have no constructor")
|
||||
ECMA_ERROR_DEF (ECMA_ERR_BUILTIN_ROUTINES_HAVE_NO_CONSTRUCTOR, "Built-in routines have no constructor")
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
ECMA_ERROR_DEF (ECMA_ERR_CONSTRUCTOR_INT16_ARRAY_REQUIRES_NEW, "Constructor Int16Array requires 'new'")
|
||||
ECMA_ERROR_DEF (ECMA_ERR_CONSTRUCTOR_INT32_ARRAY_REQUIRES_NEW, "Constructor Int32Array requires 'new'")
|
||||
|
@ -583,7 +583,7 @@ ECMA_ERROR_DEF (ECMA_ERR_ONLY_INTEGER_NUMBERS_CAN_BE_CONVERTED_TO_BIGINT,
|
|||
"Only integer numbers can be converted to BigInt")
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
ECMA_ERROR_DEF (ECMA_ERR_TYPEDARRAY_INTRINSTIC_DIRECTLY_CALLED, "TypedArray intrinstic cannot be directly called")
|
||||
ECMA_ERROR_DEF (ECMA_ERR_TYPEDARRAY_INTRINSIC_DIRECTLY_CALLED, "TypedArray intrinsic cannot be directly called")
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ECMA_ERROR_DEF (ECMA_ERR_UNSIGNED_RIGHT_SHIFT_IS_NOT_ALLOWED_FOR_BIGINTS,
|
||||
|
@ -687,8 +687,8 @@ ECMA_ERROR_DEF (ECMA_ERR_TRAP_RESULT_NOT_REFLECT_TARGET_INEXTENSIBILITY,
|
|||
"Trap result does not reflect inextensibility of Proxy target")
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
ECMA_ERROR_DEF (ECMA_ERR_TYPEDARRAY_INTRINSTIC_CALLED_BY_NEW_EXPRESSION,
|
||||
"TypedArray intrinstic cannot be called by a 'new' expression")
|
||||
ECMA_ERROR_DEF (ECMA_ERR_TYPEDARRAY_INTRINSIC_CALLED_BY_NEW_EXPRESSION,
|
||||
"TypedArray intrinsic cannot be called by a 'new' expression")
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_BUILTIN_BIGINT && JERRY_BUILTIN_TYPEDARRAY
|
||||
ECMA_ERROR_DEF (ECMA_ERR_CONTENTTYPE_RETURNED_TYPEDARRAY_NOT_MATCH_SOURCE,
|
||||
|
@ -733,11 +733,11 @@ ECMA_ERROR_DEF (ECMA_ERR_CALL_SUPER_CONSTRUCTOR_DERIVED_CLASS_BEFORE_THIS,
|
|||
"Must call super constructor in derived class before accessing 'this' or returning from it")
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
ECMA_ERROR_DEF (ECMA_ERR_TRAP_TRUISH_DEFINING_NON_EXISTENT_PROPERTY,
|
||||
"Trap returned truish for defining non-configurable property which is non-existent in the target")
|
||||
"Trap returned truish for defining non-configurable property which is nonexistent in the target")
|
||||
ECMA_ERROR_DEF (
|
||||
ECMA_ERR_TRAP_TRUISH_ADD_PROPERTY_INCOMPATIBLE_OTHER_PROP,
|
||||
"Trap returned truish for adding property that is incompatible with the existing property in the target")
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
ECMA_ERROR_DEF (ECMA_ERR_CANNOT_ACCESS_CALLER_CALLE_ARGUMENTS,
|
||||
ECMA_ERROR_DEF (ECMA_ERR_CANNOT_ACCESS_CALLER_CALLEE_ARGUMENTS,
|
||||
"'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the "
|
||||
"arguments objects for calls to them")
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
[ECMA_ERROR_MESSAGES]
|
||||
|
||||
ECMA_ERR_CANNOT_ACCESS_CALLER_CALLE_ARGUMENTS = "'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them"
|
||||
ECMA_ERR_CANNOT_ACCESS_CALLER_CALLEE_ARGUMENTS = "'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them"
|
||||
ECMA_ERR_PARAMETER_REJECT_MUST_BE_CALLABLE = "'reject' parameter must be callable"
|
||||
ECMA_ERR_PARAMETER_RESOLVE_MUST_BE_CALLABLE = "'resolve' parameter must be callable"
|
||||
ECMA_ERR_PROMISE_RESOLVE_ITSELF = "A promise cannot be resolved with itself"
|
||||
|
@ -48,10 +48,10 @@ ECMA_ERR_ARRAY_BUFFER_RETURNED_THIS_FROM_CONSTRUCTOR = "ArrayBuffer subclass ret
|
|||
ECMA_ERR_BIGINT_SERIALIZED = "BigInt cannot be serialized"
|
||||
ECMA_ERR_BIGINT_ZERO_DIVISION = "BigInt division by zero"
|
||||
ECMA_ERR_BIGINT_FUNCTION_NOT_CONSTRUCTOR = "BigInt function is not a constructor"
|
||||
ECMA_ERR_BIGINT_VALUE_EXCPECTED = "BigInt value expected"
|
||||
ECMA_ERR_BIGINT_VALUE_EXPECTED = "BigInt value expected"
|
||||
ECMA_ERR_BINDING_CANNOT_SET = "Binding cannot be set"
|
||||
ECMA_ERR_BINDING_NOT_EXIST_OR_UNINITIALIZED = "Binding does not exist or is uninitialised"
|
||||
ECMA_ERR_BULTIN_ROUTINES_HAVE_NO_CONSTRUCTOR = "Built-in routines have no constructor"
|
||||
ECMA_ERR_BUILTIN_ROUTINES_HAVE_NO_CONSTRUCTOR = "Built-in routines have no constructor"
|
||||
ECMA_ERR_CALLBACK_RESULT_NOT_MODULE = "Callback result must be a module"
|
||||
ECMA_ERR_ALLOCATE_ARRAY_BUFFER = "Cannot allocate memory for ArrayBuffer"
|
||||
ECMA_ERR_ALLOCATE_BIGINT_VALUE = "Cannot allocate memory for a BigInt value"
|
||||
|
@ -248,12 +248,12 @@ ECMA_ERR_TRAP_FALSISH_PROPERTY_NON_CONFIGURABLE = "Trap returned falsish for pro
|
|||
ECMA_ERR_TRAP_RETURNED_NEITHER_OBJECT_NOR_NULL = "Trap returned neither object nor null"
|
||||
ECMA_ERR_TRAP_TRUISH_ADDING_PROPERTY_NON_EXTENSIBLE_TARGET = "Trap returned truish for adding property to the non-extensible target"
|
||||
ECMA_ERR_TRAP_TRUISH_ADD_PROPERTY_INCOMPATIBLE_OTHER_PROP = "Trap returned truish for adding property that is incompatible with the existing property in the target"
|
||||
ECMA_ERR_TRAP_TRUISH_DEFINING_NON_EXISTENT_PROPERTY = "Trap returned truish for defining non-configurable property which is non-existent in the target"
|
||||
ECMA_ERR_TRAP_TRUISH_DEFINING_NON_EXISTENT_PROPERTY = "Trap returned truish for defining non-configurable property which is nonexistent in the target"
|
||||
ECMA_ERR_TRAP_TRUISH_PROPERTY_NON_CONFIGURABLE = "Trap returned truish for property which is non-configurable in the proxy target"
|
||||
ECMA_ERR_TRAP_TRUISH_TARGET_NOT_EXTENSIBLE = "Trap returned truish for target is not extensible"
|
||||
ECMA_ERR_TRAP_WITH_DUPLICATED_ENTRIES = "Trap returned with duplicated entries"
|
||||
ECMA_ERR_TYPEDARRAY_INTRINSTIC_CALLED_BY_NEW_EXPRESSION = "TypedArray intrinstic cannot be called by a 'new' expression"
|
||||
ECMA_ERR_TYPEDARRAY_INTRINSTIC_DIRECTLY_CALLED = "TypedArray intrinstic cannot be directly called"
|
||||
ECMA_ERR_TYPEDARRAY_INTRINSIC_CALLED_BY_NEW_EXPRESSION = "TypedArray intrinsic cannot be called by a 'new' expression"
|
||||
ECMA_ERR_TYPEDARRAY_INTRINSIC_DIRECTLY_CALLED = "TypedArray intrinsic cannot be directly called"
|
||||
ECMA_ERR_CONTENTTYPE_RETURNED_TYPEDARRAY_NOT_MATCH_SOURCE = "TypedArray returned by [[ContentType]] does not match source"
|
||||
ECMA_ERR_UNARY_PLUS_IS_NOT_ALLOWED_FOR_BIGINTS = "Unary plus is not allowed for BigInts"
|
||||
ECMA_ERR_UNDEFINED_REFERENCE = "Undefined reference"
|
||||
|
|
|
@ -1012,7 +1012,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
|||
}
|
||||
case ECMA_OBJECT_CLASS_PROMISE_CAPABILITY:
|
||||
{
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) object_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) object_p;
|
||||
|
||||
if (ecma_is_value_object (capability_p->header.u.cls.u3.promise))
|
||||
{
|
||||
|
@ -1893,7 +1893,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
|||
}
|
||||
case ECMA_OBJECT_CLASS_PROMISE_CAPABILITY:
|
||||
{
|
||||
ext_object_size = sizeof (ecma_promise_capabality_t);
|
||||
ext_object_size = sizeof (ecma_promise_capability_t);
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_CLASS_ASYNC_FROM_SYNC_ITERATOR:
|
||||
|
|
|
@ -359,7 +359,7 @@ typedef enum
|
|||
{
|
||||
ECMA_ENUMERABLE_PROPERTY_KEYS, /**< List only property names */
|
||||
ECMA_ENUMERABLE_PROPERTY_VALUES, /**< List only property values */
|
||||
ECMA_ENUMERABLE_PROPERTY_ENTRIES, /**< List both propery names and values */
|
||||
ECMA_ENUMERABLE_PROPERTY_ENTRIES, /**< List both property names and values */
|
||||
|
||||
ECMA_ENUMERABLE_PROPERTY__COUNT /**< Number of enumerable property listing types */
|
||||
} ecma_enumerable_property_names_options_t;
|
||||
|
@ -914,7 +914,7 @@ typedef struct
|
|||
union
|
||||
{
|
||||
jmem_cpointer_t property_list_cp; /**< compressed pointer to object's
|
||||
* or declerative lexical environments's property list */
|
||||
* or declarative lexical environments's property list */
|
||||
jmem_cpointer_t bound_object_cp; /**< compressed pointer to lexical environments's the bound object */
|
||||
jmem_cpointer_t home_object_cp; /**< compressed pointer to lexical environments's the home object */
|
||||
} u1;
|
||||
|
@ -1399,7 +1399,7 @@ typedef struct
|
|||
#define ECMA_COLLECTION_INITIAL_CAPACITY 4
|
||||
|
||||
/**
|
||||
* Ecma-collenction grow factor when the collection underlying buffer need to be reallocated
|
||||
* Ecma-collection grow factor when the collection underlying buffer need to be reallocated
|
||||
*/
|
||||
#define ECMA_COLLECTION_GROW_FACTOR (ECMA_COLLECTION_INITIAL_CAPACITY * 2)
|
||||
|
||||
|
@ -1740,7 +1740,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* The lowest state of the ecma_prop_hashmap_alloc_state counter.
|
||||
* If ecma_prop_hashmap_alloc_state other other than this value, it is
|
||||
* If ecma_prop_hashmap_alloc_state other than this value, it is
|
||||
* disabled.
|
||||
*/
|
||||
#define ECMA_PROP_HASHMAP_ALLOC_ON 0
|
||||
|
@ -1972,7 +1972,7 @@ typedef struct
|
|||
ecma_extended_object_t header; /**< object header, and [[Promise]] internal slot */
|
||||
ecma_value_t resolve; /**< [[Resolve]] internal slot */
|
||||
ecma_value_t reject; /**< [[Reject]] internal slot */
|
||||
} ecma_promise_capabality_t;
|
||||
} ecma_promise_capability_t;
|
||||
|
||||
/**
|
||||
* Definition of GetCapabilitiesExecutor Functions
|
||||
|
@ -2041,7 +2041,7 @@ typedef enum
|
|||
#if (JERRY_STACK_LIMIT != 0)
|
||||
/**
|
||||
* Check the current stack usage. If the limit is reached a RangeError is raised.
|
||||
* The macro argument specifies the return value which is usally ECMA_VALUE_ERROR or NULL.
|
||||
* The macro argument specifies the return value which is usually ECMA_VALUE_ERROR or NULL.
|
||||
*/
|
||||
#define ECMA_CHECK_STACK_USAGE_RETURN(RETURN_VALUE) \
|
||||
do \
|
||||
|
@ -2121,7 +2121,7 @@ typedef struct
|
|||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
/**
|
||||
* Type to repesent the maximum property index
|
||||
* Type to represent the maximum property index
|
||||
*
|
||||
* For ES6+ the maximum valid property index is 2**53 - 1
|
||||
*/
|
||||
|
|
|
@ -260,7 +260,7 @@ ecma_collection_check_duplicated_entries (ecma_collection_t *collection_p) /**<
|
|||
} /* ecma_collection_check_duplicated_entries */
|
||||
|
||||
/**
|
||||
* Check the string value existance in the collection.
|
||||
* Check the string value existence in the collection.
|
||||
*
|
||||
* Used by:
|
||||
* - ecma_builtin_json_stringify step 4.b.ii.5
|
||||
|
|
|
@ -226,7 +226,7 @@ ecma_get_native_pointer_value (ecma_object_t *obj_p, /**< object to get property
|
|||
* If the specified object has no matching native pointer for the given native type info
|
||||
* the function has no effect.
|
||||
*
|
||||
* @return true - if the native pointer has been deleted succesfully
|
||||
* @return true - if the native pointer has been deleted successfully
|
||||
* false - otherwise
|
||||
*/
|
||||
bool
|
||||
|
|
|
@ -186,7 +186,7 @@ ecma_string_get_chars_fast (const ecma_string_t *string_p, /**< ecma-string */
|
|||
* @return pointer to ecma-string descriptor
|
||||
*/
|
||||
static ecma_string_t *
|
||||
ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**< identifier of externl magic string */
|
||||
ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**< identifier of external magic string */
|
||||
{
|
||||
JERRY_ASSERT (id < lit_get_magic_string_ex_count ());
|
||||
|
||||
|
@ -2186,7 +2186,7 @@ ecma_string_hash (const ecma_string_t *string_p) /**< ecma-string to calculate h
|
|||
/**
|
||||
* Create a substring from an ecma string
|
||||
*
|
||||
* @return a newly consturcted ecma string with its value initialized to a copy of a substring of the first argument
|
||||
* @return a newly constructed ecma string with its value initialized to a copy of a substring of the first argument
|
||||
*/
|
||||
ecma_string_t *
|
||||
ecma_string_substr (const ecma_string_t *string_p, /**< pointer to an ecma string */
|
||||
|
|
|
@ -694,16 +694,16 @@ ecma_make_object_value (const ecma_object_t *object_p) /**< object to reference
|
|||
* @return ecma-value representation of the Error reference
|
||||
*/
|
||||
ecma_value_t JERRY_ATTR_PURE
|
||||
ecma_make_extended_primitive_value (const ecma_extended_primitive_t *primitve_p, /**< extended primitve value */
|
||||
uint32_t type) /**< ecma type of extended primitve value */
|
||||
ecma_make_extended_primitive_value (const ecma_extended_primitive_t *primitive_p, /**< extended primitive value */
|
||||
uint32_t type) /**< ecma type of extended primitive value */
|
||||
{
|
||||
JERRY_ASSERT (primitve_p != NULL);
|
||||
JERRY_ASSERT (primitive_p != NULL);
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
JERRY_ASSERT (primitve_p != ECMA_BIGINT_POINTER_TO_ZERO);
|
||||
JERRY_ASSERT (primitive_p != ECMA_BIGINT_POINTER_TO_ZERO);
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
JERRY_ASSERT (type == ECMA_TYPE_BIGINT || type == ECMA_TYPE_ERROR);
|
||||
|
||||
return ecma_pointer_to_ecma_value (primitve_p) | type;
|
||||
return ecma_pointer_to_ecma_value (primitive_p) | type;
|
||||
} /* ecma_make_extended_primitive_value */
|
||||
|
||||
/**
|
||||
|
|
|
@ -80,7 +80,7 @@ JERRY_STATIC_ASSERT (((int) ECMA_OBJECT_TYPE_BUILT_IN_ARRAY == ((int) ECMA_OBJEC
|
|||
* @return pointer to the object's descriptor
|
||||
*/
|
||||
ecma_object_t *
|
||||
ecma_create_object (ecma_object_t *prototype_object_p, /**< pointer to prototybe of the object (or NULL) */
|
||||
ecma_create_object (ecma_object_t *prototype_object_p, /**< pointer to prototype of the object (or NULL) */
|
||||
size_t ext_object_size, /**< size of extended objects */
|
||||
ecma_object_type_t type) /**< object type */
|
||||
{
|
||||
|
@ -453,8 +453,8 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
|||
/* Otherwise we create a new property pair and use its second value. */
|
||||
ecma_property_pair_t *first_property_pair_p = ecma_alloc_property_pair ();
|
||||
|
||||
/* Need to query property_list_head_p again and recheck the existennce
|
||||
* of property hasmap, because ecma_alloc_property_pair may delete them. */
|
||||
/* Need to query property_list_head_p again and recheck the existence
|
||||
* of property hashmap, because ecma_alloc_property_pair may delete them. */
|
||||
property_list_head_p = &object_p->u1.property_list_cp;
|
||||
#if JERRY_PROPERTY_HASHMAP
|
||||
bool has_hashmap = false;
|
||||
|
@ -726,7 +726,7 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
|||
}
|
||||
|
||||
#if JERRY_PROPERTY_HASHMAP
|
||||
if (steps >= (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2))
|
||||
if (steps >= (ECMA_PROPERTY_HASHMAP_MINIMUM_SIZE / 2))
|
||||
{
|
||||
ecma_property_hashmap_create (obj_p);
|
||||
}
|
||||
|
@ -1226,14 +1226,14 @@ ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p) /**< pro
|
|||
} /* ecma_free_property_descriptor */
|
||||
|
||||
/**
|
||||
* Increase ref count of an extended primitve value.
|
||||
* Increase ref count of an extended primitive value.
|
||||
*/
|
||||
void
|
||||
ecma_ref_extended_primitive (ecma_extended_primitive_t *primitve_p) /**< extended primitve value */
|
||||
ecma_ref_extended_primitive (ecma_extended_primitive_t *primitive_p) /**< extended primitive value */
|
||||
{
|
||||
if (JERRY_LIKELY (primitve_p->refs_and_type < ECMA_EXTENDED_PRIMITIVE_MAX_REF))
|
||||
if (JERRY_LIKELY (primitive_p->refs_and_type < ECMA_EXTENDED_PRIMITIVE_MAX_REF))
|
||||
{
|
||||
primitve_p->refs_and_type += ECMA_EXTENDED_PRIMITIVE_REF_ONE;
|
||||
primitive_p->refs_and_type += ECMA_EXTENDED_PRIMITIVE_REF_ONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1556,7 +1556,7 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
|||
} /* ecma_bytecode_deref */
|
||||
|
||||
/**
|
||||
* Gets the script data asigned to a script / module / function
|
||||
* Gets the script data assigned to a script / module / function
|
||||
*
|
||||
* @return script data - if available, JMEM_CP_NULL - otherwise
|
||||
*/
|
||||
|
|
|
@ -93,7 +93,7 @@ typedef enum
|
|||
ECMA_STRING_FLAG_IS_ASCII = (1 << 0), /**< The string contains only ASCII characters. */
|
||||
ECMA_STRING_FLAG_REHASH_NEEDED = (1 << 1), /**< The hash of the string must be recalculated.
|
||||
* For more details see ecma_append_chars_to_string */
|
||||
ECMA_STRING_FLAG_IS_UINT32 = (1 << 2), /**< The string repesents an UINT32 number */
|
||||
ECMA_STRING_FLAG_IS_UINT32 = (1 << 2), /**< The string represents an UINT32 number */
|
||||
ECMA_STRING_FLAG_MUST_BE_FREED = (1 << 3), /**< The returned buffer must be freed */
|
||||
} ecma_string_flag_t;
|
||||
|
||||
|
@ -245,7 +245,7 @@ ecma_value_t JERRY_ATTR_PURE ecma_make_symbol_value (const ecma_string_t *ecma_s
|
|||
ecma_value_t JERRY_ATTR_PURE ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_magic_string_value (lit_magic_string_id_t id);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_object_value (const ecma_object_t *object_p);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_extended_primitive_value (const ecma_extended_primitive_t *primitve_p,
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_extended_primitive_value (const ecma_extended_primitive_t *primitive_p,
|
||||
uint32_t type);
|
||||
ecma_integer_value_t JERRY_ATTR_CONST ecma_get_integer_from_value (ecma_value_t value);
|
||||
ecma_number_t JERRY_ATTR_PURE ecma_get_float_from_value (ecma_value_t value);
|
||||
|
@ -468,7 +468,7 @@ void ecma_set_property_lcached (ecma_property_t *property_p, bool is_lcached);
|
|||
ecma_property_descriptor_t ecma_make_empty_property_descriptor (void);
|
||||
void ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p);
|
||||
|
||||
void ecma_ref_extended_primitive (ecma_extended_primitive_t *primitve_p);
|
||||
void ecma_ref_extended_primitive (ecma_extended_primitive_t *primitive_p);
|
||||
void ecma_deref_exception (ecma_extended_primitive_t *exception_p);
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
void ecma_deref_bigint (ecma_extended_primitive_t *bigint_p);
|
||||
|
|
|
@ -346,7 +346,7 @@ ecma_module_resolve_import (ecma_module_resolve_result_t *resolve_result_p, /**<
|
|||
{
|
||||
ecma_module_t *imported_module_p = ecma_module_get_from_object (import_node_p->u.path_or_module);
|
||||
|
||||
if (ecma_compare_ecma_string_to_magic_id (import_names_p->imex_name_p, LIT_MAGIC_STRING_ASTERIX_CHAR))
|
||||
if (ecma_compare_ecma_string_to_magic_id (import_names_p->imex_name_p, LIT_MAGIC_STRING_ASTERISK_CHAR))
|
||||
{
|
||||
/* Namespace import. */
|
||||
ecma_value_t ns = ecma_make_object_value (imported_module_p->namespace_object_p);
|
||||
|
@ -471,7 +471,7 @@ ecma_module_resolve_export (ecma_module_t *const module_p, /**< base module */
|
|||
{
|
||||
ecma_module_t *target_module_p = ecma_module_get_from_object (*indirect_export_p->u.module_object_p);
|
||||
|
||||
if (ecma_compare_ecma_string_to_magic_id (export_names_p->local_name_p, LIT_MAGIC_STRING_ASTERIX_CHAR))
|
||||
if (ecma_compare_ecma_string_to_magic_id (export_names_p->local_name_p, LIT_MAGIC_STRING_ASTERISK_CHAR))
|
||||
{
|
||||
/* Namespace export. */
|
||||
ecma_value_t ns = ecma_make_object_value (target_module_p->namespace_object_p);
|
||||
|
@ -721,7 +721,7 @@ ecma_module_create_namespace_object (ecma_module_t *module_p) /**< module */
|
|||
JERRY_ASSERT (!(module_p->header.u.cls.u2.module_flags & ECMA_MODULE_HAS_NAMESPACE));
|
||||
|
||||
ecma_module_resolve_set_t *resolve_set_p;
|
||||
resolve_set_p = ecma_module_resolve_set_create (module_p, ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR));
|
||||
resolve_set_p = ecma_module_resolve_set_create (module_p, ecma_get_magic_string (LIT_MAGIC_STRING_ASTERISK_CHAR));
|
||||
|
||||
/* The properties collection stores name / result item pairs. Name is always
|
||||
* a string, and result can be a property reference or namespace object. */
|
||||
|
@ -841,7 +841,7 @@ ecma_module_create_namespace_object (ecma_module_t *module_p) /**< module */
|
|||
/* Circular imports are ignored */
|
||||
ecma_module_resolve_set_append (resolve_set_p,
|
||||
ecma_module_get_from_object (*star_export_p->u.module_object_p),
|
||||
ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR));
|
||||
ecma_get_magic_string (LIT_MAGIC_STRING_ASTERISK_CHAR));
|
||||
|
||||
star_export_p = star_export_p->next_p;
|
||||
}
|
||||
|
@ -965,7 +965,7 @@ ecma_module_connect_imports (ecma_module_t *module_p)
|
|||
|
||||
while (import_names_p != NULL)
|
||||
{
|
||||
if (ecma_compare_ecma_string_to_magic_id (import_names_p->imex_name_p, LIT_MAGIC_STRING_ASTERIX_CHAR))
|
||||
if (ecma_compare_ecma_string_to_magic_id (import_names_p->imex_name_p, LIT_MAGIC_STRING_ASTERISK_CHAR))
|
||||
{
|
||||
/* Namespace import. */
|
||||
ecma_property_value_t *value_p;
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef struct ecma_module
|
|||
/* Note: state is stored in header.u.class_prop.extra_info */
|
||||
ecma_extended_object_t header; /**< header part */
|
||||
/* TODO(dbatyai): These could be compressed pointers */
|
||||
ecma_object_t *scope_p; /**< lexical lenvironment of the module */
|
||||
ecma_object_t *scope_p; /**< lexical environment of the module */
|
||||
ecma_object_t *namespace_object_p; /**< namespace object of the module */
|
||||
struct ecma_module_node *imports_p; /**< import requests of the module */
|
||||
ecma_module_names_t *local_exports_p; /**< local exports of the module */
|
||||
|
@ -111,7 +111,7 @@ typedef struct ecma_module_resolve_stack
|
|||
struct ecma_module_resolve_stack *next_p; /**< next in linked list */
|
||||
ecma_module_t *module_p; /**< module request */
|
||||
ecma_string_t *export_name_p; /**< export identifier name */
|
||||
bool resolving; /**< flag storing wether the current frame started resolving */
|
||||
bool resolving; /**< flag storing whether the current frame started resolving */
|
||||
} ecma_module_resolve_stack_t;
|
||||
|
||||
ecma_value_t ecma_module_initialize (ecma_module_t *module_p);
|
||||
|
|
|
@ -102,13 +102,13 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
|||
prop_iter_cp = prop_iter_p->next_property_cp;
|
||||
}
|
||||
|
||||
if (named_property_count < (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2))
|
||||
if (named_property_count < (ECMA_PROPERTY_HASHMAP_MINIMUM_SIZE / 2))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* The max_property_count must be power of 2. */
|
||||
uint32_t max_property_count = ECMA_PROPERTY_HASMAP_MINIMUM_SIZE;
|
||||
uint32_t max_property_count = ECMA_PROPERTY_HASHMAP_MINIMUM_SIZE;
|
||||
|
||||
/* At least 1/3 items must be NULL. */
|
||||
while (max_property_count < (named_property_count + (named_property_count >> 1)))
|
||||
|
@ -162,7 +162,7 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
|||
entry_index &= mask;
|
||||
#ifndef JERRY_NDEBUG
|
||||
/* Because max_property_count (power of 2) and step (a prime
|
||||
* number) are relative primes, all entries of the hasmap are
|
||||
* number) are relative primes, all entries of the hashmap are
|
||||
* visited exactly once before the start entry index is reached
|
||||
* again. Furthermore because at least one NULL is present in
|
||||
* the hashmap, the while loop must be terminated before the
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/**
|
||||
* Recommended minimum number of items in a property cache.
|
||||
*/
|
||||
#define ECMA_PROPERTY_HASMAP_MINIMUM_SIZE 32
|
||||
#define ECMA_PROPERTY_HASHMAP_MINIMUM_SIZE 32
|
||||
|
||||
/**
|
||||
* Property hash.
|
||||
|
|
|
@ -920,10 +920,10 @@ ecma_builtin_array_prototype_object_sort_compare_helper (ecma_value_t lhs, /**<
|
|||
{
|
||||
JERRY_UNUSED (array_buffer_p);
|
||||
/*
|
||||
* ECMA-262 v5, 15.4.4.11 NOTE1: Because non-existent property values always
|
||||
* ECMA-262 v5, 15.4.4.11 NOTE1: Because nonexistent property values always
|
||||
* compare greater than undefined property values, and undefined always
|
||||
* compares greater than any other value, undefined property values always
|
||||
* sort to the end of the result, followed by non-existent property values.
|
||||
* sort to the end of the result, followed by nonexistent property values.
|
||||
*/
|
||||
bool lhs_is_undef = ecma_is_value_undefined (lhs);
|
||||
bool rhs_is_undef = ecma_is_value_undefined (rhs);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
*/
|
||||
enum
|
||||
{
|
||||
ECMA_ASYNC_FROM_SYNC_ITERATOR_PROTOTYPE_ROUTINE_START = 0, /**< buitlin routine start id */
|
||||
ECMA_ASYNC_FROM_SYNC_ITERATOR_PROTOTYPE_ROUTINE_START = 0, /**< builtin routine start id */
|
||||
ECMA_ASYNC_FROM_SYNC_ITERATOR_PROTOTYPE_ROUTINE_NEXT, /**< 'next' routine v11, 25.1.4.2.1 */
|
||||
ECMA_ASYNC_FROM_SYNC_ITERATOR_PROTOTYPE_ROUTINE_RETURN, /**< 'return' routine v11, 25.1.4.2.2 */
|
||||
ECMA_ASYNC_FROM_SYNC_ITERATOR_PROTOTYPE_ROUTINE_THROW /**< 'throw' routine v11, 25.1.4.2.3 */
|
||||
|
@ -112,18 +112,18 @@ ecma_op_async_from_sync_iterator_prototype_continuation (ecma_value_t result, /*
|
|||
}
|
||||
|
||||
/* 8 - 9. */
|
||||
ecma_object_t *on_fullfilled = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_ASYNC_FROM_SYNC_ITERATOR_UNWRAP,
|
||||
ecma_object_t *on_fulfilled = ecma_op_create_native_handler (ECMA_NATIVE_HANDLER_ASYNC_FROM_SYNC_ITERATOR_UNWRAP,
|
||||
sizeof (ecma_extended_object_t));
|
||||
((ecma_extended_object_t *) on_fullfilled)->u.built_in.u2.routine_flags = (uint8_t) done_flag;
|
||||
((ecma_extended_object_t *) on_fulfilled)->u.built_in.u2.routine_flags = (uint8_t) done_flag;
|
||||
|
||||
/* 10. */
|
||||
ecma_value_t then_result = ecma_promise_perform_then (value_wrapper,
|
||||
ecma_make_object_value (on_fullfilled),
|
||||
ecma_make_object_value (on_fulfilled),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
capability_obj_p);
|
||||
|
||||
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (then_result));
|
||||
ecma_deref_object (on_fullfilled);
|
||||
ecma_deref_object (on_fulfilled);
|
||||
ecma_free_value (value_wrapper);
|
||||
|
||||
/* 11. */
|
||||
|
@ -189,7 +189,7 @@ ecma_builtin_async_from_sync_iterator_prototype_do (ecma_async_from_sync_iterato
|
|||
return method;
|
||||
}
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
|
||||
ecma_value_t call_arg;
|
||||
uint32_t arg_size;
|
||||
|
|
|
@ -82,7 +82,7 @@ ecma_builtin_bigint_prototype_object_value_of (ecma_value_t this_arg) /**< this
|
|||
}
|
||||
}
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_BIGINT_VALUE_EXCPECTED);
|
||||
return ecma_raise_type_error (ECMA_ERR_BIGINT_VALUE_EXPECTED);
|
||||
} /* ecma_builtin_bigint_prototype_object_value_of */
|
||||
|
||||
/**
|
||||
|
|
|
@ -125,7 +125,7 @@ ecma_date_parse_date_chars (const lit_utf8_byte_t **str_p, /**< pointer to the c
|
|||
} /* ecma_date_parse_date_chars */
|
||||
|
||||
/**
|
||||
* Helper function to try to parse a special chracter (+,-,T,Z,:,.) in a date string
|
||||
* Helper function to try to parse a special character (+,-,T,Z,:,.) in a date string
|
||||
*
|
||||
* @return true if the first character is same as the expected, false otherwise
|
||||
*/
|
||||
|
@ -256,7 +256,7 @@ ecma_date_construct_helper (const ecma_value_t *args, /**< arguments passed to t
|
|||
ECMA_NUMBER_ZERO, /* hours */
|
||||
ECMA_NUMBER_ZERO, /* minutes */
|
||||
ECMA_NUMBER_ZERO, /* seconds */
|
||||
ECMA_NUMBER_ZERO /* miliseconds */
|
||||
ECMA_NUMBER_ZERO /* milliseconds */
|
||||
};
|
||||
|
||||
args_len = JERRY_MIN (args_len, sizeof (date_nums) / sizeof (date_nums[0]));
|
||||
|
|
|
@ -412,7 +412,7 @@ ecma_date_make_time (ecma_number_t hour, /**< hour value */
|
|||
* See also:
|
||||
* ECMA-262 v11, 20.4.1.12
|
||||
*
|
||||
* @return elpased number of days since Unix Epoch
|
||||
* @return elapsed number of days since Unix Epoch
|
||||
*/
|
||||
ecma_number_t
|
||||
ecma_date_make_day (ecma_number_t year, /**< year value */
|
||||
|
@ -453,7 +453,7 @@ ecma_date_make_day (ecma_number_t year, /**< year value */
|
|||
* See also:
|
||||
* ECMA-262 v11, 20.4.1.13
|
||||
*
|
||||
* @return elpased number of milliceconds since Unix Epoch
|
||||
* @return elapsed number of milliseconds since Unix Epoch
|
||||
*/
|
||||
ecma_number_t
|
||||
ecma_date_make_date (ecma_number_t day, /**< day value */
|
||||
|
@ -473,7 +473,7 @@ ecma_date_make_date (ecma_number_t day, /**< day value */
|
|||
* See also:
|
||||
* ECMA-262 v11, 20.4.1.14
|
||||
*
|
||||
* @return elpased number of milliceconds since Unix Epoch
|
||||
* @return elapsed number of milliseconds since Unix Epoch
|
||||
*/
|
||||
ecma_number_t
|
||||
ecma_date_time_clip (ecma_number_t time) /**< time value */
|
||||
|
|
|
@ -101,7 +101,7 @@ typedef struct
|
|||
const lit_utf8_byte_t *string_p; /**< source string */
|
||||
lit_utf8_size_t string_size; /**< source string size */
|
||||
const lit_utf8_byte_t *matched_p; /**< matched string */
|
||||
lit_utf8_size_t matched_size; /**< matcehd string size */
|
||||
lit_utf8_size_t matched_size; /**< matched string size */
|
||||
lit_utf8_size_t match_byte_pos; /**< byte position of the match in the source string */
|
||||
uint16_t flags; /**< replace flags */
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ ecma_builtin_promise_perform_race (ecma_value_t iterator, /**< the iterator for
|
|||
JERRY_ASSERT (ecma_object_class_is (capability_obj_p, ECMA_OBJECT_CLASS_PROMISE_CAPABILITY));
|
||||
JERRY_ASSERT (ecma_is_constructor (ctor));
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
|
||||
ecma_value_t resolve = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (ctor), LIT_MAGIC_STRING_RESOLVE);
|
||||
|
||||
|
@ -182,7 +182,7 @@ ecma_builtin_promise_perform (ecma_value_t iterator, /**< iteratorRecord */
|
|||
JERRY_ASSERT (ecma_object_class_is (capability_obj_p, ECMA_OBJECT_CLASS_PROMISE_CAPABILITY));
|
||||
JERRY_ASSERT (ecma_is_constructor (ctor));
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
|
||||
ecma_value_t resolve = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (ctor), LIT_MAGIC_STRING_RESOLVE);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Promose built-in description
|
||||
* Promise built-in description
|
||||
*/
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
|
|
@ -167,7 +167,7 @@ ecma_builtin_symbol_for_helper (ecma_value_t value_to_find) /**< symbol or ecma-
|
|||
return ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
|
||||
/* There was no matching, sp a new symbol should be added the the global symbol list. The symbol creation requires
|
||||
/* There was no matching, sp a new symbol should be added the global symbol list. The symbol creation requires
|
||||
an extra reference to the descriptor string, but this reference has already been added. */
|
||||
ecma_string_t *new_symbol_p = ecma_new_symbol_from_descriptor_string (value_to_find);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ ecma_builtin_type_error_thrower_dispatch_call (const ecma_value_t *arguments_lis
|
|||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_CANNOT_ACCESS_CALLER_CALLE_ARGUMENTS);
|
||||
return ecma_raise_type_error (ECMA_ERR_CANNOT_ACCESS_CALLER_CALLEE_ARGUMENTS);
|
||||
} /* ecma_builtin_type_error_thrower_dispatch_call */
|
||||
|
||||
/**
|
||||
|
|
|
@ -134,7 +134,7 @@ enum
|
|||
* All the builtin object must be extensible except the ThrowTypeError object.
|
||||
*/
|
||||
JERRY_STATIC_ASSERT (ECMA_BUILTIN_EXTENSIBLE_CHECK == true,
|
||||
ecma_builtin_must_be_extensible_except_the_builtin_thorw_type_error_object);
|
||||
ecma_builtin_must_be_extensible_except_the_builtin_throw_type_error_object);
|
||||
#endif /* !JERRY_NDEBUG */
|
||||
|
||||
/**
|
||||
|
@ -1299,13 +1299,13 @@ ecma_builtin_routine_list_lazy_property_names (ecma_object_t *object_p, /**< a b
|
|||
|
||||
if (!(ext_func_p->u.built_in.u2.routine_flags & ECMA_BUILTIN_ROUTINE_LENGTH_INITIALIZED))
|
||||
{
|
||||
/* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
|
||||
/* Uninitialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
|
||||
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
|
||||
prop_counter_p->string_named_props++;
|
||||
}
|
||||
if (!(ext_func_p->u.built_in.u2.routine_flags & ECMA_BUILTIN_ROUTINE_NAME_INITIALIZED))
|
||||
{
|
||||
/* Unintialized 'name' property is non-enumerable (ECMA-262 v6, 19.2.4.2) */
|
||||
/* Uninitialized 'name' property is non-enumerable (ECMA-262 v6, 19.2.4.2) */
|
||||
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_NAME));
|
||||
prop_counter_p->string_named_props++;
|
||||
}
|
||||
|
@ -1508,7 +1508,7 @@ ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
|
|||
|
||||
if (ecma_builtin_function_is_routine (obj_p))
|
||||
{
|
||||
return ecma_raise_type_error (ECMA_ERR_BULTIN_ROUTINES_HAVE_NO_CONSTRUCTOR);
|
||||
return ecma_raise_type_error (ECMA_ERR_BUILTIN_ROUTINES_HAVE_NO_CONSTRUCTOR);
|
||||
}
|
||||
|
||||
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;
|
||||
|
|
|
@ -836,7 +836,7 @@ ecma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument
|
|||
* See also:
|
||||
* ECMA-262 v5.1, 15.4.4.2
|
||||
*
|
||||
* @return NULL - if the converison fails
|
||||
* @return NULL - if the conversion fails
|
||||
* ecma_string_t * - otherwise
|
||||
*/
|
||||
static ecma_string_t *
|
||||
|
@ -885,8 +885,8 @@ ecma_op_typedarray_get_separator_string (ecma_value_t separator) /**< possible s
|
|||
} /* ecma_op_typedarray_get_separator_string */
|
||||
|
||||
/**
|
||||
* The TypedArray.prototype object's 'join' routine basen on
|
||||
* the Array.porottype object's 'join'
|
||||
* The TypedArray.prototype object's 'join' routine based on
|
||||
* the Array.prototype object's 'join'
|
||||
*
|
||||
* See also:
|
||||
* ECMA-262 v5, 15.4.4.5
|
||||
|
@ -1849,9 +1849,9 @@ ecma_builtin_typedarray_prototype_includes (ecma_typedarray_info_t *info_p, /**<
|
|||
{
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
bool is_bigint = ECMA_TYPEDARRAY_IS_BIGINT_TYPE (info_p->id);
|
||||
#else /* !JERRRY_BUILTIN_BIGINT */
|
||||
#else /* !JERRY_BUILTIN_BIGINT */
|
||||
bool is_bigint = false;
|
||||
#endif /* JERRRY_BUILTIN_BIGINT */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
if (ecma_arraybuffer_is_detached (info_p->array_buffer_p))
|
||||
{
|
||||
|
|
|
@ -174,7 +174,7 @@ ecma_builtin_typedarray_dispatch_call (const ecma_value_t *arguments_list_p, /**
|
|||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_TYPEDARRAY_INTRINSTIC_DIRECTLY_CALLED);
|
||||
return ecma_raise_type_error (ECMA_ERR_TYPEDARRAY_INTRINSIC_DIRECTLY_CALLED);
|
||||
} /* ecma_builtin_typedarray_dispatch_call */
|
||||
|
||||
/**
|
||||
|
@ -191,7 +191,7 @@ ecma_builtin_typedarray_dispatch_construct (const ecma_value_t *arguments_list_p
|
|||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_TYPEDARRAY_INTRINSTIC_CALLED_BY_NEW_EXPRESSION);
|
||||
return ecma_raise_type_error (ECMA_ERR_TYPEDARRAY_INTRINSIC_CALLED_BY_NEW_EXPRESSION);
|
||||
} /* ecma_builtin_typedarray_dispatch_construct */
|
||||
|
||||
/**
|
||||
|
|
|
@ -220,7 +220,7 @@ ecma_op_new_array_object_from_buffer (const ecma_value_t *args_p, /**< array ele
|
|||
} /* ecma_op_new_array_object_from_buffer */
|
||||
|
||||
/**
|
||||
* Allocate a new fast acces mode array object from the given collection
|
||||
* Allocate a new fast access mode array object from the given collection
|
||||
*
|
||||
* Note: The given collection will be unavailable after and it's underlying buffer is reused
|
||||
*
|
||||
|
@ -229,7 +229,7 @@ ecma_op_new_array_object_from_buffer (const ecma_value_t *args_p, /**< array ele
|
|||
ecma_value_t
|
||||
ecma_op_new_array_object_from_collection (ecma_collection_t *collection_p, /**< collection to create array from */
|
||||
bool unref_objects) /**< true - if the collection potentially
|
||||
containts objects
|
||||
contains objects
|
||||
false - otherwise */
|
||||
{
|
||||
const uint32_t item_count = collection_p->item_count;
|
||||
|
@ -1045,7 +1045,7 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
|
|||
|
||||
/**
|
||||
* Property descriptor bitset for fast array data properties.
|
||||
* If the property desciptor fields contains all the flags below
|
||||
* If the property descriptor fields contains all the flags below
|
||||
* attempt to stay fast access array during [[DefineOwnProperty]] operation.
|
||||
*/
|
||||
#define ECMA_FAST_ARRAY_DATA_PROP_FLAGS \
|
||||
|
@ -1136,10 +1136,10 @@ ecma_op_array_object_define_own_property (ecma_object_t *object_p, /**< the arra
|
|||
prop_desc = *property_desc_p;
|
||||
prop_desc.flags &= (uint16_t) ~JERRY_PROP_SHOULD_THROW;
|
||||
|
||||
ecma_value_t completition = ecma_op_general_object_define_own_property (object_p, property_name_p, &prop_desc);
|
||||
JERRY_ASSERT (ecma_is_value_boolean (completition));
|
||||
ecma_value_t completion = ecma_op_general_object_define_own_property (object_p, property_name_p, &prop_desc);
|
||||
JERRY_ASSERT (ecma_is_value_boolean (completion));
|
||||
|
||||
if (ecma_is_value_false (completition))
|
||||
if (ecma_is_value_false (completion))
|
||||
{
|
||||
return ecma_raise_property_redefinition (property_name_p, property_desc_p->flags);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#define ECMA_FAST_ARRAY_HOLE_SHIFT 8
|
||||
|
||||
/**
|
||||
* This number represents 1 array hole in underlying buffer of a fast acces mode array
|
||||
* This number represents 1 array hole in underlying buffer of a fast access mode array
|
||||
*/
|
||||
#define ECMA_FAST_ARRAY_HOLE_ONE (1 << ECMA_FAST_ARRAY_HOLE_SHIFT)
|
||||
|
||||
|
@ -76,7 +76,7 @@ bool ecma_op_array_is_fast_array (ecma_extended_object_t *array_p);
|
|||
|
||||
uint32_t ecma_fast_array_get_hole_count (ecma_object_t *obj_p);
|
||||
|
||||
ecma_value_t *ecma_fast_array_extend (ecma_object_t *object_p, uint32_t new_lengt);
|
||||
ecma_value_t *ecma_fast_array_extend (ecma_object_t *object_p, uint32_t new_length);
|
||||
|
||||
bool ecma_fast_array_set_property (ecma_object_t *object_p, uint32_t index, ecma_value_t value);
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ ecma_async_yield_call (ecma_value_t function, /**< function (takes reference) */
|
|||
} /* ecma_async_yield_call */
|
||||
|
||||
/**
|
||||
* Perform an exception throw and call the approprite handler
|
||||
* Perform an exception throw and call the appropriate handler
|
||||
*
|
||||
* @return ecma value
|
||||
* Returned value must be freed with ecma_free_value.
|
||||
|
|
|
@ -72,7 +72,7 @@ ecma_bigint_create_from_digit (ecma_bigint_digit_t digit, /* single digit */
|
|||
* Returned value must be freed with ecma_free_value.
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_bigint_parse_string (const lit_utf8_byte_t *string_p, /**< string represenation of the BigInt */
|
||||
ecma_bigint_parse_string (const lit_utf8_byte_t *string_p, /**< string representation of the BigInt */
|
||||
lit_utf8_size_t size, /**< string size */
|
||||
uint32_t options) /**< ecma_bigint_parse_string_options_t option bits */
|
||||
{
|
||||
|
|
|
@ -650,7 +650,7 @@ ecma_op_container_has (ecma_extended_object_t *map_object_p, /**< map object */
|
|||
* @return ecma value
|
||||
*/
|
||||
static ecma_value_t
|
||||
ecma_op_container_set_noramlize_zero (ecma_value_t this_arg) /*< this arg */
|
||||
ecma_op_container_set_normalize_zero (ecma_value_t this_arg) /*< this arg */
|
||||
{
|
||||
if (ecma_is_value_number (this_arg))
|
||||
{
|
||||
|
@ -663,7 +663,7 @@ ecma_op_container_set_noramlize_zero (ecma_value_t this_arg) /*< this arg */
|
|||
}
|
||||
|
||||
return this_arg;
|
||||
} /* ecma_op_container_set_noramlize_zero */
|
||||
} /* ecma_op_container_set_normalize_zero */
|
||||
|
||||
/**
|
||||
* The generic Map prototype object's 'set' and Set prototype object's 'add' routine
|
||||
|
@ -688,7 +688,7 @@ ecma_op_container_set (ecma_extended_object_t *map_object_p, /**< map object */
|
|||
|
||||
if (entry_p == NULL)
|
||||
{
|
||||
ecma_op_internal_buffer_append (container_p, ecma_op_container_set_noramlize_zero (key_arg), value_arg, lit_id);
|
||||
ecma_op_internal_buffer_append (container_p, ecma_op_container_set_normalize_zero (key_arg), value_arg, lit_id);
|
||||
|
||||
if ((map_object_p->u.cls.u1.container_flags & ECMA_CONTAINER_FLAGS_WEAK) != 0)
|
||||
{
|
||||
|
@ -698,7 +698,7 @@ ecma_op_container_set (ecma_extended_object_t *map_object_p, /**< map object */
|
|||
}
|
||||
else
|
||||
{
|
||||
ecma_op_internal_buffer_update (entry_p, ecma_op_container_set_noramlize_zero (value_arg), lit_id);
|
||||
ecma_op_internal_buffer_update (entry_p, ecma_op_container_set_normalize_zero (value_arg), lit_id);
|
||||
}
|
||||
|
||||
ecma_ref_object ((ecma_object_t *) map_object_p);
|
||||
|
|
|
@ -184,16 +184,16 @@ ecma_op_dataview_get_object (ecma_value_t this_arg) /**< this argument */
|
|||
} /* ecma_op_dataview_get_object */
|
||||
|
||||
/**
|
||||
* Helper union to specify the system's endiannes
|
||||
* Helper union to specify the system's endianness
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
uint32_t number; /**< for write numeric data */
|
||||
char data[sizeof (uint32_t)]; /**< for read numeric data */
|
||||
} ecma_dataview_endiannes_check_t;
|
||||
} ecma_dataview_endianness_check_t;
|
||||
|
||||
/**
|
||||
* Helper function to check the current system endiannes
|
||||
* Helper function to check the current system endianness
|
||||
*
|
||||
* @return true - if the current system has little endian byteorder
|
||||
* false - otherwise
|
||||
|
@ -201,15 +201,15 @@ typedef union
|
|||
static bool
|
||||
ecma_dataview_check_little_endian (void)
|
||||
{
|
||||
ecma_dataview_endiannes_check_t checker;
|
||||
ecma_dataview_endianness_check_t checker;
|
||||
checker.number = 0x01;
|
||||
|
||||
return checker.data[0] == 0x01;
|
||||
} /* ecma_dataview_check_little_endian */
|
||||
|
||||
/**
|
||||
* Helper function for swap bytes if the system's endiannes
|
||||
* does not match with the requested endiannes.
|
||||
* Helper function for swap bytes if the system's endianness
|
||||
* does not match with the requested endianness.
|
||||
*/
|
||||
static void
|
||||
ecma_dataview_swap_order (bool system_is_little_endian, /**< true - if the system has little endian byteorder
|
||||
|
@ -231,7 +231,7 @@ ecma_dataview_swap_order (bool system_is_little_endian, /**< true - if the syste
|
|||
} /* ecma_dataview_swap_order */
|
||||
|
||||
/**
|
||||
* GetViewValue and SetViewValue abstact operation
|
||||
* GetViewValue and SetViewValue abstract operation
|
||||
*
|
||||
* See also:
|
||||
* ECMA-262 v11, 24.3.1.1
|
||||
|
|
|
@ -246,7 +246,7 @@ ecma_object_check_constructor (ecma_object_t *obj_p) /**< ecma object */
|
|||
{
|
||||
if (ecma_builtin_function_is_routine (obj_p))
|
||||
{
|
||||
return ECMA_ERR_BULTIN_ROUTINES_HAVE_NO_CONSTRUCTOR;
|
||||
return ECMA_ERR_BUILTIN_ROUTINES_HAVE_NO_CONSTRUCTOR;
|
||||
}
|
||||
|
||||
JERRY_ASSERT (((ecma_extended_object_t *) obj_p)->u.built_in.id != ECMA_BUILTIN_ID_HANDLER);
|
||||
|
@ -1276,7 +1276,7 @@ ecma_op_function_call_native (ecma_object_t *func_obj_p, /**< Function object */
|
|||
* @return target function of the bound function
|
||||
*/
|
||||
JERRY_ATTR_NOINLINE static ecma_object_t *
|
||||
ecma_op_bound_function_get_argument_list (ecma_object_t *func_obj_p, /**< bound bunction object */
|
||||
ecma_op_bound_function_get_argument_list (ecma_object_t *func_obj_p, /**< bound function object */
|
||||
ecma_collection_t *list_p) /**< list of arguments */
|
||||
{
|
||||
JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_BOUND_FUNCTION);
|
||||
|
@ -2105,7 +2105,7 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio
|
|||
|
||||
if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))
|
||||
{
|
||||
/* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
|
||||
/* Uninitialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
|
||||
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
|
||||
prop_counter_p->string_named_props++;
|
||||
}
|
||||
|
@ -2113,7 +2113,7 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio
|
|||
if (CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR
|
||||
&& !ECMA_GET_SECOND_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))
|
||||
{
|
||||
/* Unintialized 'name' property is non-enumerable (ECMA-262 v6, 19.2.4.2) */
|
||||
/* Uninitialized 'name' property is non-enumerable (ECMA-262 v6, 19.2.4.2) */
|
||||
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_NAME));
|
||||
prop_counter_p->string_named_props++;
|
||||
}
|
||||
|
@ -2184,7 +2184,7 @@ ecma_op_bound_function_list_lazy_property_names (ecma_object_t *object_p, /**< b
|
|||
return;
|
||||
}
|
||||
|
||||
/* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
|
||||
/* Uninitialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
|
||||
ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) object_p;
|
||||
if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (bound_func_p->header.u.bound_function.target_function))
|
||||
{
|
||||
|
|
|
@ -454,7 +454,7 @@ ecma_op_iterator_value (ecma_value_t iter_result) /**< iterator value */
|
|||
*
|
||||
* See also: ECMA-262 v6, 7.4.6
|
||||
*
|
||||
* @return ECMA_VALUE_EMPTY - if "return" is succesfully invoked,
|
||||
* @return ECMA_VALUE_EMPTY - if "return" is successfully invoked,
|
||||
* and the operation is called with normal completion
|
||||
* ECMA_VALUE_ERROR - otherwise
|
||||
*/
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/**
|
||||
* Mask for job queue type.
|
||||
*/
|
||||
#define ECMA_JOB_QUEURE_TYPE_MASK ((uintptr_t) 0x07)
|
||||
#define ECMA_JOB_QUEUE_TYPE_MASK ((uintptr_t) 0x07)
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
|
@ -97,7 +97,7 @@ ecma_job_queue_init (void)
|
|||
static inline ecma_job_queue_item_type_t
|
||||
ecma_job_queue_get_type (ecma_job_queue_item_t *job_p) /**< the job */
|
||||
{
|
||||
return (ecma_job_queue_item_type_t) (job_p->next_and_type & ECMA_JOB_QUEURE_TYPE_MASK);
|
||||
return (ecma_job_queue_item_type_t) (job_p->next_and_type & ECMA_JOB_QUEUE_TYPE_MASK);
|
||||
} /* ecma_job_queue_get_type */
|
||||
|
||||
/**
|
||||
|
@ -108,7 +108,7 @@ ecma_job_queue_get_type (ecma_job_queue_item_t *job_p) /**< the job */
|
|||
static inline ecma_job_queue_item_t *
|
||||
ecma_job_queue_get_next (ecma_job_queue_item_t *job_p) /**< the job */
|
||||
{
|
||||
return (ecma_job_queue_item_t *) (job_p->next_and_type & ~ECMA_JOB_QUEURE_TYPE_MASK);
|
||||
return (ecma_job_queue_item_t *) (job_p->next_and_type & ~ECMA_JOB_QUEUE_TYPE_MASK);
|
||||
} /* ecma_job_queue_get_next */
|
||||
|
||||
/**
|
||||
|
@ -185,8 +185,8 @@ ecma_process_promise_reaction_job (ecma_job_promise_reaction_t *job_p) /**< the
|
|||
/* 2. */
|
||||
JERRY_ASSERT (
|
||||
ecma_object_class_is (ecma_get_object_from_value (job_p->capability), ECMA_OBJECT_CLASS_PROMISE_CAPABILITY));
|
||||
ecma_promise_capabality_t *capability_p;
|
||||
capability_p = (ecma_promise_capabality_t *) ecma_get_object_from_value (job_p->capability);
|
||||
ecma_promise_capability_t *capability_p;
|
||||
capability_p = (ecma_promise_capability_t *) ecma_get_object_from_value (job_p->capability);
|
||||
|
||||
/* 3. */
|
||||
ecma_value_t handler = job_p->handler;
|
||||
|
@ -392,7 +392,7 @@ ecma_process_promise_resolve_thenable_job (ecma_job_promise_resolve_thenable_t *
|
|||
static void
|
||||
ecma_enqueue_job (ecma_job_queue_item_t *job_p) /**< the job */
|
||||
{
|
||||
JERRY_ASSERT (job_p->next_and_type <= ECMA_JOB_QUEURE_TYPE_MASK);
|
||||
JERRY_ASSERT (job_p->next_and_type <= ECMA_JOB_QUEUE_TYPE_MASK);
|
||||
|
||||
if (JERRY_CONTEXT (job_queue_head_p) == NULL)
|
||||
{
|
||||
|
@ -401,7 +401,7 @@ ecma_enqueue_job (ecma_job_queue_item_t *job_p) /**< the job */
|
|||
}
|
||||
else
|
||||
{
|
||||
JERRY_ASSERT ((JERRY_CONTEXT (job_queue_tail_p)->next_and_type & ~ECMA_JOB_QUEURE_TYPE_MASK) == 0);
|
||||
JERRY_ASSERT ((JERRY_CONTEXT (job_queue_tail_p)->next_and_type & ~ECMA_JOB_QUEUE_TYPE_MASK) == 0);
|
||||
|
||||
JERRY_CONTEXT (job_queue_tail_p)->next_and_type |= (uintptr_t) job_p;
|
||||
JERRY_CONTEXT (job_queue_tail_p) = job_p;
|
||||
|
|
|
@ -187,7 +187,7 @@ ecma_op_has_binding (ecma_object_t *lex_env_p, /**< lexical environment */
|
|||
* See also: ECMA-262 v5, 10.2.1
|
||||
*
|
||||
* @return ECMA_PROPERTY_POINTER_ERROR - if the operation raises error
|
||||
* pointer to the created property - if the binding was created into a declerative environment
|
||||
* pointer to the created property - if the binding was created into a declarative environment
|
||||
* NULL - otherwise
|
||||
*/
|
||||
ecma_property_t *
|
||||
|
@ -582,7 +582,7 @@ ecma_op_get_environment_record (ecma_object_t *lex_env_p) /**< lexical environme
|
|||
*
|
||||
* See also: ECMA-262 v6, 8.1.1.3
|
||||
*
|
||||
* @return true - if the status is "initialzed"
|
||||
* @return true - if the status is "initialized"
|
||||
* false - otherwise
|
||||
*/
|
||||
bool
|
||||
|
|
|
@ -194,7 +194,7 @@ static const lit_magic_string_id_t to_primitive_non_string_hint_method_names[2]
|
|||
};
|
||||
|
||||
/**
|
||||
* Hints for the ecma general object's toPrimitve operation
|
||||
* Hints for the ecma general object's toPrimitive operation
|
||||
*/
|
||||
static const lit_magic_string_id_t hints[3] = {
|
||||
LIT_MAGIC_STRING_DEFAULT, /**< "default" hint */
|
||||
|
|
|
@ -552,12 +552,12 @@ ecma_promise_all_or_all_settled_handler_cb (ecma_object_t *function_obj_p, /**<
|
|||
else
|
||||
{
|
||||
lit_magic_string_id_t status_property_val = LIT_MAGIC_STRING_REJECTED;
|
||||
lit_magic_string_id_t data_propery_name = LIT_MAGIC_STRING_REASON;
|
||||
lit_magic_string_id_t data_property_name = LIT_MAGIC_STRING_REASON;
|
||||
|
||||
if (promise_type == ECMA_PROMISE_ALLSETTLED_RESOLVE)
|
||||
{
|
||||
status_property_val = LIT_MAGIC_STRING_FULFILLED;
|
||||
data_propery_name = LIT_MAGIC_STRING_VALUE;
|
||||
data_property_name = LIT_MAGIC_STRING_VALUE;
|
||||
}
|
||||
|
||||
ecma_object_t *obj_p =
|
||||
|
@ -571,7 +571,7 @@ ecma_promise_all_or_all_settled_handler_cb (ecma_object_t *function_obj_p, /**<
|
|||
prop_value_p->value = ecma_make_magic_string_value (status_property_val);
|
||||
|
||||
prop_value_p = ecma_create_named_data_property (obj_p,
|
||||
ecma_get_magic_string (data_propery_name),
|
||||
ecma_get_magic_string (data_property_name),
|
||||
ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE,
|
||||
NULL);
|
||||
prop_value_p->value = ecma_copy_value_if_not_object (arg);
|
||||
|
@ -592,7 +592,7 @@ ecma_promise_all_or_all_settled_handler_cb (ecma_object_t *function_obj_p, /**<
|
|||
if (ecma_promise_remaining_inc_or_dec (executor_p->remaining_elements, false) == 0)
|
||||
{
|
||||
ecma_value_t capability = executor_p->capability;
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) ecma_get_object_from_value (capability);
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) ecma_get_object_from_value (capability);
|
||||
if (promise_type == ECMA_PROMISE_ANY_REJECT)
|
||||
{
|
||||
ecma_value_t error_val = ecma_new_aggregate_error (executor_p->values, ECMA_VALUE_UNDEFINED);
|
||||
|
@ -633,7 +633,7 @@ ecma_op_get_capabilities_executor_cb (ecma_object_t *function_obj_p, /**< functi
|
|||
/* 2-3. */
|
||||
ecma_object_t *capability_obj_p = ecma_get_object_from_value (executor_p->capability);
|
||||
JERRY_ASSERT (ecma_object_class_is (capability_obj_p, ECMA_OBJECT_CLASS_PROMISE_CAPABILITY));
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
|
||||
/* 4. */
|
||||
if (!ecma_is_value_undefined (capability_p->resolve))
|
||||
|
@ -679,10 +679,10 @@ ecma_promise_new_capability (ecma_value_t constructor, /**< constructor function
|
|||
|
||||
/* 3. */
|
||||
ecma_object_t *capability_obj_p = ecma_create_object (ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE),
|
||||
sizeof (ecma_promise_capabality_t),
|
||||
sizeof (ecma_promise_capability_t),
|
||||
ECMA_OBJECT_TYPE_CLASS);
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
capability_p->header.u.cls.type = ECMA_OBJECT_CLASS_PROMISE_CAPABILITY;
|
||||
capability_p->header.u.cls.u3.promise = ECMA_VALUE_UNDEFINED;
|
||||
capability_p->resolve = ECMA_VALUE_UNDEFINED;
|
||||
|
@ -787,7 +787,7 @@ ecma_promise_reject_or_resolve (ecma_value_t this_arg, /**< "this" argument */
|
|||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
|
||||
ecma_value_t func = is_resolve ? capability_p->resolve : capability_p->reject;
|
||||
|
||||
|
@ -1133,7 +1133,7 @@ ecma_op_if_abrupt_reject_promise (ecma_value_t *value_p, /**< [in - out] complet
|
|||
|
||||
ecma_value_t reason = jcontext_take_exception ();
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) capability_obj_p;
|
||||
ecma_value_t call_ret =
|
||||
ecma_op_function_call (ecma_get_object_from_value (capability_p->reject), ECMA_VALUE_UNDEFINED, &reason, 1);
|
||||
ecma_free_value (reason);
|
||||
|
@ -1167,9 +1167,9 @@ ecma_promise_perform_then (ecma_value_t promise, /**< the promise which call 'th
|
|||
{
|
||||
JERRY_ASSERT (ecma_object_class_is (result_capability_obj_p, ECMA_OBJECT_CLASS_PROMISE_CAPABILITY));
|
||||
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) result_capability_obj_p;
|
||||
ecma_promise_capability_t *capability_p = (ecma_promise_capability_t *) result_capability_obj_p;
|
||||
|
||||
/* 3. boolean true indicates "indentity" */
|
||||
/* 3. boolean true indicates "identity" */
|
||||
if (!ecma_op_is_callable (on_fulfilled))
|
||||
{
|
||||
on_fulfilled = ECMA_VALUE_TRUE;
|
||||
|
|
|
@ -80,7 +80,7 @@ typedef struct
|
|||
/* The Promise reaction is a compressed structure, where each item can
|
||||
* be a sequence of up to three ecma object values as seen below:
|
||||
*
|
||||
* [ Capability ][ Optional fullfilled callback ][ Optional rejected callback ]
|
||||
* [ Capability ][ Optional fulfilled callback ][ Optional rejected callback ]
|
||||
* [ Async function callback ]
|
||||
*
|
||||
* The first member is an object, which lower bits specify the type of the reaction:
|
||||
|
@ -88,7 +88,7 @@ typedef struct
|
|||
* The first two objects specify the resolve/reject functions of the promise
|
||||
* returned by the `then` operation which can be used to chain event handlers.
|
||||
*
|
||||
* bit 0: has a fullfilled callback
|
||||
* bit 0: has a fulfilled callback
|
||||
* bit 1: has a rejected callback
|
||||
*
|
||||
* bit 2 is set: async function callback
|
||||
|
|
|
@ -248,7 +248,7 @@ ecma_validate_proxy_object (ecma_value_t handler, /**< proxy handler */
|
|||
return ecma_op_get_method_by_magic_id (handler, magic_id);
|
||||
} /* ecma_validate_proxy_object */
|
||||
|
||||
/* Interal operations */
|
||||
/* Internal operations */
|
||||
|
||||
/**
|
||||
* The Proxy object [[GetPrototypeOf]] internal routine
|
||||
|
@ -1231,7 +1231,7 @@ ecma_proxy_object_get (ecma_object_t *obj_p, /**< proxy object */
|
|||
* Note: Returned value is always a simple value so freeing it is unnecessary.
|
||||
*
|
||||
* @return ECMA_VALUE_ERROR - if the operation fails
|
||||
* ECMA_VALUE_{TRUE/FALSE} - depends on whether the propety can be set to the given object
|
||||
* ECMA_VALUE_{TRUE/FALSE} - depends on whether the property can be set to the given object
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_proxy_object_set (ecma_object_t *obj_p, /**< proxy object */
|
||||
|
@ -1352,7 +1352,7 @@ ecma_proxy_object_set (ecma_object_t *obj_p, /**< proxy object */
|
|||
* Note: Returned value is always a simple value so freeing it is unnecessary.
|
||||
*
|
||||
* @return ECMA_VALUE_ERROR - if the operation fails
|
||||
* ECMA_VALUE_{TRUE/FALSE} - depends on whether the propety can be deleted
|
||||
* ECMA_VALUE_{TRUE/FALSE} - depends on whether the property can be deleted
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_proxy_object_delete_property (ecma_object_t *obj_p, /**< proxy object */
|
||||
|
|
|
@ -36,7 +36,7 @@ ecma_proxy_revoke_cb (ecma_object_t *function_obj_p, const ecma_value_t args_p[]
|
|||
|
||||
ecma_value_t ecma_proxy_object_find (ecma_object_t *obj_p, ecma_string_t *prop_name_p);
|
||||
|
||||
/* Interal operations */
|
||||
/* Internal operations */
|
||||
|
||||
ecma_value_t ecma_proxy_object_get_prototype_of (ecma_object_t *obj_p);
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ ecma_regexp_step_back (ecma_regexp_ctx_t *re_ctx_p, /**< regexp context */
|
|||
} /* ecma_regexp_step_back */
|
||||
|
||||
/**
|
||||
* Check if the current poisition is on a word boundary.
|
||||
* Check if the current position is on a word boundary.
|
||||
*
|
||||
* @return true, if on a word boundary
|
||||
* false - otherwise
|
||||
|
|
|
@ -32,7 +32,7 @@ ecma_value_t ecma_op_create_shared_arraybuffer_object (const ecma_value_t *, uin
|
|||
/**
|
||||
* Helper functions for SharedArrayBuffer.
|
||||
*/
|
||||
ecma_object_t *ecma_shared_arraybuffer_new_object (uint32_t lengh);
|
||||
ecma_object_t *ecma_shared_arraybuffer_new_object (uint32_t length);
|
||||
#endif /* JERRY_BUILTIN_SHAREDARRAYBUFFER */
|
||||
bool ecma_is_shared_arraybuffer (ecma_value_t val);
|
||||
bool ecma_object_is_shared_arraybuffer (ecma_object_t *val);
|
||||
|
|
|
@ -326,15 +326,15 @@ static ecma_value_t
|
|||
ecma_typedarray_set_int16_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */
|
||||
ecma_value_t value) /**< the number value to set */
|
||||
{
|
||||
ecma_number_t resut_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
ecma_number_t result_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (to_num))
|
||||
{
|
||||
return to_num;
|
||||
}
|
||||
|
||||
int16_t num = (int16_t) ecma_typedarray_setter_number_to_uint32 (resut_num);
|
||||
int16_t num = (int16_t) ecma_typedarray_setter_number_to_uint32 (result_num);
|
||||
ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, int16_t);
|
||||
return ECMA_VALUE_TRUE;
|
||||
} /* ecma_typedarray_set_int16_element */
|
||||
|
@ -349,15 +349,15 @@ static ecma_value_t
|
|||
ecma_typedarray_set_uint16_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */
|
||||
ecma_value_t value) /**< the number value to set */
|
||||
{
|
||||
ecma_number_t resut_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
ecma_number_t result_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (to_num))
|
||||
{
|
||||
return to_num;
|
||||
}
|
||||
|
||||
uint16_t num = (uint16_t) ecma_typedarray_setter_number_to_uint32 (resut_num);
|
||||
uint16_t num = (uint16_t) ecma_typedarray_setter_number_to_uint32 (result_num);
|
||||
ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, uint16_t);
|
||||
return ECMA_VALUE_TRUE;
|
||||
} /* ecma_typedarray_set_uint16_element */
|
||||
|
@ -372,15 +372,15 @@ static ecma_value_t
|
|||
ecma_typedarray_set_int32_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */
|
||||
ecma_value_t value) /**< the number value to set */
|
||||
{
|
||||
ecma_number_t resut_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
ecma_number_t result_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (to_num))
|
||||
{
|
||||
return to_num;
|
||||
}
|
||||
|
||||
int32_t num = (int32_t) ecma_typedarray_setter_number_to_uint32 (resut_num);
|
||||
int32_t num = (int32_t) ecma_typedarray_setter_number_to_uint32 (result_num);
|
||||
ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, int32_t);
|
||||
return ECMA_VALUE_TRUE;
|
||||
} /* ecma_typedarray_set_int32_element */
|
||||
|
@ -395,15 +395,15 @@ static ecma_value_t
|
|||
ecma_typedarray_set_uint32_element (lit_utf8_byte_t *dst_p, /**< the location in the internal arraybuffer */
|
||||
ecma_value_t value) /**< the number value to set */
|
||||
{
|
||||
ecma_number_t resut_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &resut_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
ecma_number_t result_num;
|
||||
ecma_value_t to_num = ecma_op_to_numeric (value, &result_num, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (to_num))
|
||||
{
|
||||
return to_num;
|
||||
}
|
||||
|
||||
uint32_t num = (uint32_t) ecma_typedarray_setter_number_to_uint32 (resut_num);
|
||||
uint32_t num = (uint32_t) ecma_typedarray_setter_number_to_uint32 (result_num);
|
||||
ECMA_TYPEDARRAY_SET_ELEMENT (dst_p, num, uint32_t);
|
||||
return ECMA_VALUE_TRUE;
|
||||
} /* ecma_typedarray_set_uint32_element */
|
||||
|
@ -967,7 +967,7 @@ ecma_typedarray_create_object_with_typedarray (ecma_object_t *typedarray_p, /**<
|
|||
static ecma_value_t
|
||||
ecma_op_typedarray_from_helper (ecma_value_t this_val, /**< this_arg for the above from function */
|
||||
ecma_value_t current_value, /**< given value to set */
|
||||
uint32_t index, /**< currrent index */
|
||||
uint32_t index, /**< current index */
|
||||
ecma_object_t *func_object_p, /**< map function object */
|
||||
uint8_t *buffer_p, /**< target buffer */
|
||||
ecma_typedarray_setter_fn_t setter_cb) /**< setter callback function */
|
||||
|
@ -1599,7 +1599,7 @@ ecma_typedarray_get_offset (ecma_object_t *typedarray_p) /**< the pointer to the
|
|||
/**
|
||||
* Utility function: return the pointer of the data buffer referenced by the typedarray info
|
||||
*
|
||||
* @return pointer to the data buffer if successfull,
|
||||
* @return pointer to the data buffer if successful,
|
||||
* NULL otherwise
|
||||
*/
|
||||
uint8_t *
|
||||
|
@ -2019,7 +2019,7 @@ ecma_typedarray_create (ecma_object_t *constructor_p, /**< constructor function
|
|||
ecma_value_t
|
||||
ecma_typedarray_species_create (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t *arguments_list_p, /**< the arg list passed to typedarray construct */
|
||||
uint32_t arguments_list_len) /**< length of the the arg list */
|
||||
uint32_t arguments_list_len) /**< length of the arg list */
|
||||
{
|
||||
ecma_object_t *typedarray_p = ecma_get_object_from_value (this_arg);
|
||||
ecma_typedarray_info_t info = ecma_typedarray_get_info (typedarray_p);
|
||||
|
|
|
@ -229,7 +229,7 @@
|
|||
* Enable/Disable the JavaScript parser.
|
||||
*
|
||||
* Allowed values:
|
||||
* 0: Disable the JavaScript parser and all related functionallity.
|
||||
* 0: Disable the JavaScript parser and all related functionality.
|
||||
* 1: Enable the JavaScript parser.
|
||||
*
|
||||
* Default value: 1
|
||||
|
@ -257,7 +257,7 @@
|
|||
* Enable/Disable ECMA property hashmap.
|
||||
*
|
||||
* Allowed values:
|
||||
* 0: Disable property hasmap.
|
||||
* 0: Disable property hashmap.
|
||||
* 1: Enable property hashmap.
|
||||
*
|
||||
* Default value: 1
|
||||
|
@ -392,7 +392,7 @@
|
|||
* For the moment it is mainly meant for the following targets:
|
||||
* - ESP8266
|
||||
*
|
||||
* Example configuration for moving (some) constatns into a given section:
|
||||
* Example configuration for moving (some) constants into a given section:
|
||||
* # define JERRY_ATTR_CONST_DATA __attribute__((section(".rodata.const")))
|
||||
*/
|
||||
#ifndef JERRY_ATTR_CONST_DATA
|
||||
|
@ -402,7 +402,7 @@
|
|||
/**
|
||||
* The JERRY_ATTR_GLOBAL_HEAP allows adding extra attributes for the Jerry global heap.
|
||||
*
|
||||
* Example on how to move the global heap into it's own section:
|
||||
* Example on how to move the global heap into its own section:
|
||||
* #define JERRY_ATTR_GLOBAL_HEAP __attribute__((section(".text.globalheap")))
|
||||
*/
|
||||
#ifndef JERRY_ATTR_GLOBAL_HEAP
|
||||
|
|
|
@ -169,7 +169,7 @@ void jerry_port_print_buffer (const jerry_char_t *buffer_p, jerry_size_t buffer_
|
|||
* The implementation should allocate storage necessary for the string. The result string should include the ending line
|
||||
* terminator character(s) and should be zero terminated.
|
||||
*
|
||||
* An implementation may return NULL to signal that the end of input is reached, or an error occured.
|
||||
* An implementation may return NULL to signal that the end of input is reached, or an error occurred.
|
||||
*
|
||||
* When a non-NULL value is returned, the caller will pass the returned value to `jerry_port_line_free` when the line is
|
||||
* no longer needed. This can be used to finalize dynamically allocated buffers if necessary.
|
||||
|
|
|
@ -357,7 +357,7 @@ jmem_heap_alloc_block_null_on_error (const size_t size) /**< required memory siz
|
|||
|
||||
#if !JERRY_SYSTEM_ALLOCATOR
|
||||
/**
|
||||
* Finds the block in the free block list which preceeds the argument block
|
||||
* Finds the block in the free block list which precedes the argument block
|
||||
*
|
||||
* @return pointer to the preceeding block
|
||||
*/
|
||||
|
@ -587,7 +587,7 @@ jmem_heap_realloc_block (void *ptr, /**< memory region to reallocate */
|
|||
}
|
||||
/*
|
||||
* Check if block can be extended at the front.
|
||||
* This is less optimal because we need to copy the data, but still better than allocting a new block.
|
||||
* This is less optimal because we need to copy the data, but still better than allocating a new block.
|
||||
*/
|
||||
else if (jmem_heap_get_region_end (prev_p) == block_p)
|
||||
{
|
||||
|
@ -609,7 +609,7 @@ jmem_heap_realloc_block (void *ptr, /**< memory region to reallocate */
|
|||
|
||||
ret_block_p = (uint8_t *) block_p - required_size;
|
||||
|
||||
/* Mark the the new block as undefined so that we are able to write to it. */
|
||||
/* Mark the new block as undefined so that we are able to write to it. */
|
||||
JMEM_VALGRIND_UNDEFINED_SPACE (ret_block_p, old_size);
|
||||
/* The blocks are likely to overlap, so mark the old block as defined memory again. */
|
||||
JMEM_VALGRIND_DEFINED_SPACE (block_p, old_size);
|
||||
|
|
|
@ -74,10 +74,10 @@ LIT_SEARCH_CHAR_IN_ARRAY_FN (lit_search_codepoint_in_array, lit_code_point_t, ui
|
|||
|
||||
/**
|
||||
* Binary search algorithm that searches a character in the given intervals.
|
||||
* Intervals specifed by two arrays. The first one contains the starting points
|
||||
* Intervals specified by two arrays. The first one contains the starting points
|
||||
* of the intervals, the second one contains the length of them.
|
||||
*
|
||||
* @return true - if the the character is included (inclusively) in one of the intervals in the given array
|
||||
* @return true - if the character is included (inclusively) in one of the intervals in the given array
|
||||
* false - otherwise
|
||||
*/
|
||||
#define LIT_SEARCH_CHAR_IN_INTERVAL_ARRAY_FN(function_name, char_type, array_type, interval_type) \
|
||||
|
@ -559,7 +559,7 @@ lit_char_is_word_char (lit_code_point_t c) /**< code point */
|
|||
/**
|
||||
* Check if the specified character is in one of those tables which contain bidirectional conversions.
|
||||
*
|
||||
* @return codepoint of the converted character if it is found the the tables
|
||||
* @return codepoint of the converted character if it is found the tables
|
||||
* LIT_INVALID_CP - otherwise.
|
||||
*/
|
||||
static lit_code_point_t
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING__EMPTY, "")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPACE_CHAR, " ")
|
||||
#if JERRY_MODULE_SYSTEM
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASTERIX_CHAR, "*")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASTERISK_CHAR, "*")
|
||||
#endif /* JERRY_MODULE_SYSTEM */
|
||||
#if JERRY_BUILTIN_ARRAY || JERRY_BUILTIN_TYPEDARRAY
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COMMA_CHAR, ",")
|
||||
|
|
|
@ -639,14 +639,14 @@ lit_utf8_string_calc_hash (const lit_utf8_byte_t *utf8_buf_p, /**< characters bu
|
|||
* Return code unit at the specified position in string
|
||||
*
|
||||
* NOTE:
|
||||
* code_unit_offset should be less then string's length
|
||||
* code_unit_offset should be less than string's length
|
||||
*
|
||||
* @return code unit value
|
||||
*/
|
||||
ecma_char_t
|
||||
lit_utf8_string_code_unit_at (const lit_utf8_byte_t *utf8_buf_p, /**< utf-8 string */
|
||||
lit_utf8_size_t utf8_buf_size, /**< string size in bytes */
|
||||
lit_utf8_size_t code_unit_offset) /**< ofset of a code_unit */
|
||||
lit_utf8_size_t code_unit_offset) /**< offset of a code_unit */
|
||||
{
|
||||
lit_utf8_byte_t *current_p = (lit_utf8_byte_t *) utf8_buf_p;
|
||||
ecma_char_t code_unit;
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
#define LIT_UTF8_4_BYTE_CODE_POINT_MAX (LIT_UNICODE_CODE_POINT_MAX)
|
||||
|
||||
/**
|
||||
* Differnce between byte count needed to represent code point greater than 0xFFFF
|
||||
* Difference between byte count needed to represent code point greater than 0xFFFF
|
||||
* in common UTF-8 (4 bytes required) and CESU-8 (6 bytes required)
|
||||
*/
|
||||
#define LIT_UTF8_CESU8_SURROGATE_SIZE_DIF (2 * LIT_UTF8_MAX_BYTES_IN_CODE_UNIT - LIT_UTF8_MAX_BYTES_IN_CODE_POINT)
|
||||
|
|
|
@ -774,7 +774,7 @@
|
|||
#define CBC_SMALL_LITERAL_ENCODING_DELTA 0xfe01
|
||||
|
||||
/**
|
||||
* Literal indicies belong to one of the following groups:
|
||||
* Literal indices belong to one of the following groups:
|
||||
*
|
||||
* 0 <= index < argument_end : arguments
|
||||
* argument_end <= index < register_end : registers
|
||||
|
|
|
@ -1829,7 +1829,7 @@ lexer_consume_next_character (parser_context_t *context_p) /**< context */
|
|||
* Checks whether the next character can be the start of a post primary expression
|
||||
*
|
||||
* Note:
|
||||
* the result is not precise, but this inprecise result
|
||||
* the result is not precise, but this imprecise result
|
||||
* has no side effects for negating number literals
|
||||
*
|
||||
* @return true if the next character can be the start of a post primary expression
|
||||
|
|
|
@ -196,10 +196,10 @@ typedef enum
|
|||
LEXER_PROPERTY_GETTER, /**< property getter function */
|
||||
LEXER_PROPERTY_SETTER, /**< property setter function */
|
||||
LEXER_COMMA_SEP_LIST, /**< comma separated bracketed expression list */
|
||||
LEXER_ASSIGN_GROUP_EXPR, /**< indetifier for the assignment is located in a group expression */
|
||||
LEXER_ASSIGN_GROUP_EXPR, /**< identifier for the assignment is located in a group expression */
|
||||
LEXER_ASSIGN_CONST, /**< a const binding is reassigned */
|
||||
LEXER_INVALID_PATTERN, /**< special value for invalid destructuring pattern */
|
||||
LEXER_PRIVATE_PRIMARY_EXPR, /**< private field in primary expession position */
|
||||
LEXER_PRIVATE_PRIMARY_EXPR, /**< private field in primary expression position */
|
||||
LEXER_ASSIGN_REFERENCE, /**< special value for reference assignment */
|
||||
|
||||
/* Keywords which are not keyword tokens. */
|
||||
|
|
|
@ -383,7 +383,7 @@ typedef enum
|
|||
{
|
||||
PARSER_CLASS_LITERAL_NO_OPTS = 0, /**< no options are provided */
|
||||
PARSER_CLASS_LITERAL_CTOR_PRESENT = (1 << 0), /**< class constructor is present */
|
||||
PARSER_CLASS_LITERAL_HERTIAGE_PRESENT = (1 << 1), /**< class heritage is present */
|
||||
PARSER_CLASS_LITERAL_HERITAGE_PRESENT = (1 << 1), /**< class heritage is present */
|
||||
} parser_class_literal_opts_t;
|
||||
|
||||
/**
|
||||
|
@ -452,7 +452,7 @@ parser_parse_class_body (parser_context_t *context_p, /**< context */
|
|||
ctor_literal_p = lexer_construct_unused_literal (context_p);
|
||||
parser_emit_cbc_literal (context_p, CBC_PUSH_LITERAL, (uint16_t) (context_p->literal_count++));
|
||||
}
|
||||
else if (opts & PARSER_CLASS_LITERAL_HERTIAGE_PRESENT)
|
||||
else if (opts & PARSER_CLASS_LITERAL_HERITAGE_PRESENT)
|
||||
{
|
||||
parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_IMPLICIT_CONSTRUCTOR_HERITAGE);
|
||||
}
|
||||
|
@ -547,7 +547,7 @@ parser_parse_class_body (parser_context_t *context_p, /**< context */
|
|||
uint32_t constructor_status_flags =
|
||||
(PARSER_FUNCTION_CLOSURE | PARSER_ALLOW_SUPER | PARSER_CLASS_CONSTRUCTOR | PARSER_LEXICAL_ENV_NEEDED);
|
||||
|
||||
if (opts & PARSER_CLASS_LITERAL_HERTIAGE_PRESENT)
|
||||
if (opts & PARSER_CLASS_LITERAL_HERITAGE_PRESENT)
|
||||
{
|
||||
constructor_status_flags |= PARSER_ALLOW_SUPER_CALL;
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ parser_parse_class (parser_context_t *context_p, /**< context */
|
|||
{
|
||||
lexer_next_token (context_p);
|
||||
parser_parse_expression (context_p, PARSE_EXPR | PARSE_EXPR_LEFT_HAND_SIDE);
|
||||
opts = (parser_class_literal_opts_t) ((int) opts | (int) PARSER_CLASS_LITERAL_HERTIAGE_PRESENT);
|
||||
opts = (parser_class_literal_opts_t) ((int) opts | (int) PARSER_CLASS_LITERAL_HERITAGE_PRESENT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1818,7 +1818,7 @@ parser_parse_tagged_template_literal (parser_context_t *context_p) /**< context
|
|||
} /* parser_parse_tagged_template_literal */
|
||||
|
||||
/**
|
||||
* Checks wheteher the current expression can be an assignment expression.
|
||||
* Checks whether the current expression can be an assignment expression.
|
||||
*
|
||||
* @return true if the current expression can be an assignment expression, false otherwise
|
||||
*/
|
||||
|
@ -3097,11 +3097,11 @@ parser_process_binary_assignment_token (parser_context_t *context_p, /**< contex
|
|||
}
|
||||
}
|
||||
|
||||
bool group_expr_assingment = false;
|
||||
bool group_expr_assignment = false;
|
||||
|
||||
if (JERRY_UNLIKELY (context_p->stack_top_uint8 == LEXER_ASSIGN_GROUP_EXPR))
|
||||
{
|
||||
group_expr_assingment = true;
|
||||
group_expr_assignment = true;
|
||||
parser_stack_pop_uint8 (context_p);
|
||||
}
|
||||
|
||||
|
@ -3122,7 +3122,7 @@ parser_process_binary_assignment_token (parser_context_t *context_p, /**< contex
|
|||
return;
|
||||
}
|
||||
|
||||
if (!group_expr_assingment)
|
||||
if (!group_expr_assignment)
|
||||
{
|
||||
uint16_t function_literal_index = parser_check_anonymous_function_declaration (context_p);
|
||||
|
||||
|
@ -3253,7 +3253,7 @@ parser_process_binary_lvalue_token (parser_context_t *context_p, /**< context */
|
|||
*/
|
||||
static void
|
||||
parser_process_binary_opcodes (parser_context_t *context_p, /**< context */
|
||||
uint8_t min_prec_treshold) /**< minimal precedence of tokens */
|
||||
uint8_t min_prec_threshhold) /**< minimal precedence of tokens */
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
@ -3262,11 +3262,11 @@ parser_process_binary_opcodes (parser_context_t *context_p, /**< context */
|
|||
/* For left-to-right operators (all binary operators except assignment
|
||||
* and logical operators), the byte code is flushed if the precedence
|
||||
* of the next operator is less or equal than the current operator. For
|
||||
* assignment and logical operators, we add 1 to the min precendence to
|
||||
* assignment and logical operators, we add 1 to the min precedence to
|
||||
* force right-to-left evaluation order. */
|
||||
|
||||
if (!LEXER_IS_BINARY_OP_TOKEN (token)
|
||||
|| parser_binary_precedence_table[token - LEXER_FIRST_BINARY_OP] < min_prec_treshold)
|
||||
|| parser_binary_precedence_table[token - LEXER_FIRST_BINARY_OP] < min_prec_threshhold)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -4015,7 +4015,7 @@ parser_process_group_expression (parser_context_t *context_p, /**< context */
|
|||
lexer_next_token (context_p);
|
||||
|
||||
/* Lookahead for anonymous function declaration after '=' token when the assignment base is LHS expression
|
||||
with a single indentifier in it. e.g.: (a) = function () {} */
|
||||
with a single identifier in it. e.g.: (a) = function () {} */
|
||||
if (JERRY_UNLIKELY (context_p->token.type == LEXER_ASSIGN
|
||||
&& PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode)
|
||||
&& context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL
|
||||
|
@ -4095,7 +4095,7 @@ process_unary_expression:
|
|||
|
||||
if (JERRY_LIKELY (grouping_level != PARSE_EXPR_LEFT_HAND_SIDE))
|
||||
{
|
||||
uint8_t min_prec_treshold = 0;
|
||||
uint8_t min_prec_threshhold = 0;
|
||||
|
||||
if (LEXER_IS_BINARY_OP_TOKEN (context_p->token.type))
|
||||
{
|
||||
|
@ -4104,19 +4104,19 @@ process_unary_expression:
|
|||
parser_check_invalid_logical_op (context_p, LEXER_LOGICAL_OR, LEXER_LOGICAL_AND);
|
||||
}
|
||||
|
||||
min_prec_treshold = parser_binary_precedence_table[context_p->token.type - LEXER_FIRST_BINARY_OP];
|
||||
min_prec_threshhold = parser_binary_precedence_table[context_p->token.type - LEXER_FIRST_BINARY_OP];
|
||||
|
||||
/* Check for BINARY_LVALUE tokens + LEXER_LOGICAL_OR + LEXER_LOGICAL_AND + LEXER_EXPONENTIATION */
|
||||
if ((min_prec_treshold == PARSER_RIGHT_TO_LEFT_ORDER_EXPONENTIATION)
|
||||
|| (min_prec_treshold <= PARSER_RIGHT_TO_LEFT_ORDER_MAX_PRECEDENCE
|
||||
&& min_prec_treshold != PARSER_RIGHT_TO_LEFT_ORDER_TERNARY_PRECEDENCE))
|
||||
if ((min_prec_threshhold == PARSER_RIGHT_TO_LEFT_ORDER_EXPONENTIATION)
|
||||
|| (min_prec_threshhold <= PARSER_RIGHT_TO_LEFT_ORDER_MAX_PRECEDENCE
|
||||
&& min_prec_threshhold != PARSER_RIGHT_TO_LEFT_ORDER_TERNARY_PRECEDENCE))
|
||||
{
|
||||
/* Right-to-left evaluation order. */
|
||||
min_prec_treshold++;
|
||||
min_prec_threshhold++;
|
||||
}
|
||||
}
|
||||
|
||||
parser_process_binary_opcodes (context_p, min_prec_treshold);
|
||||
parser_process_binary_opcodes (context_p, min_prec_threshhold);
|
||||
}
|
||||
if (context_p->token.type == LEXER_RIGHT_PAREN
|
||||
&& (context_p->stack_top_uint8 == LEXER_LEFT_PAREN || context_p->stack_top_uint8 == LEXER_COMMA_SEP_LIST))
|
||||
|
|
|
@ -491,7 +491,7 @@ typedef struct parser_saved_context_t
|
|||
uint16_t scope_stack_top; /**< preserved top of scope stack */
|
||||
uint16_t scope_stack_reg_top; /**< preserved top register of scope stack */
|
||||
uint16_t scope_stack_global_end; /**< end of global declarations of a function */
|
||||
ecma_value_t tagged_template_literal_cp; /**< compessed pointer to the tagged template literal collection */
|
||||
ecma_value_t tagged_template_literal_cp; /**< compressed pointer to the tagged template literal collection */
|
||||
#ifndef JERRY_NDEBUG
|
||||
uint16_t context_stack_depth; /**< current context stack depth */
|
||||
#endif /* !JERRY_NDEBUG */
|
||||
|
@ -515,11 +515,11 @@ typedef struct
|
|||
/** Union for rarely used members. */
|
||||
union
|
||||
{
|
||||
void *allocated_buffer_p; /**< dinamically allocated buffer
|
||||
void *allocated_buffer_p; /**< dynamically allocated buffer
|
||||
* which needs to be freed on error */
|
||||
scanner_context_t *scanner_context_p; /**< scanner context for the pre-scanner */
|
||||
} u;
|
||||
uint32_t allocated_buffer_size; /**< size of the dinamically allocated buffer */
|
||||
uint32_t allocated_buffer_size; /**< size of the dynamically allocated buffer */
|
||||
|
||||
/* Parser members. */
|
||||
uint32_t status_flags; /**< status flags */
|
||||
|
@ -578,7 +578,7 @@ typedef struct
|
|||
uint16_t scope_stack_top; /**< current top of scope stack */
|
||||
uint16_t scope_stack_reg_top; /**< current top register of scope stack */
|
||||
uint16_t scope_stack_global_end; /**< end of global declarations of a function */
|
||||
ecma_value_t tagged_template_literal_cp; /**< compessed pointer to the tagged template literal collection */
|
||||
ecma_value_t tagged_template_literal_cp; /**< compressed pointer to the tagged template literal collection */
|
||||
parser_private_context_t *private_context_p; /**< private context */
|
||||
uint8_t stack_top_uint8; /**< top byte stored on the stack */
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ parser_line_info_generate (parser_context_t *context_p) /**< context */
|
|||
}
|
||||
|
||||
/* Skip those line/column pairs which byte code was discarded during post processing
|
||||
* or does not change line/column (this is possible when multiple skips occures). */
|
||||
* or does not change line/column (this is possible when multiple skips occur). */
|
||||
if (iterator_byte_code_offset == iterator_last_byte_code_offset
|
||||
|| (iterator_line == iterator_prev_line && iterator_column == iterator_prev_column))
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
PARSER_STATM_NO_OPTS = 0, /**< no options */
|
||||
PARSER_STATM_SINGLE_STATM = (1 << 0), /**< statment can form single statement context */
|
||||
PARSER_STATM_SINGLE_STATM = (1 << 0), /**< statement can form single statement context */
|
||||
PARSER_STATM_HAS_BLOCK = (1 << 1), /**< statement always has a code block */
|
||||
PARSER_STATM_BREAK_TARGET = (1 << 2), /**< break target statement */
|
||||
PARSER_STATM_CONTINUE_TARGET = (1 << 3), /**< continue target statement */
|
||||
|
@ -1450,7 +1450,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
|
|||
scanner_release_next (context_p, sizeof (scanner_for_info_t));
|
||||
}
|
||||
|
||||
/* The prescanner couldn't find the second semicolon or the closing paranthesis. */
|
||||
/* The prescanner couldn't find the second semicolon or the closing parentheses. */
|
||||
lexer_next_token (context_p);
|
||||
parser_parse_expression (context_p, PARSE_EXPR);
|
||||
|
||||
|
@ -1653,7 +1653,7 @@ parser_parse_switch_statement_start (parser_context_t *context_p) /**< context *
|
|||
scanner_get_location (&start_location, context_p);
|
||||
|
||||
/* The reason of using an iterator is error management. If an error
|
||||
* occures, parser_free_jumps() free all data. However, the branches
|
||||
* occur, parser_free_jumps() free all data. However, the branches
|
||||
* created by parser_emit_cbc_forward_branch_item() would not be freed.
|
||||
* To free these branches, the current switch data is always stored
|
||||
* on the stack. If any change happens, this data is updated. Updates
|
||||
|
@ -2300,7 +2300,7 @@ parser_parse_import_statement (parser_context_t *context_p) /**< parser context
|
|||
parser_raise_error (context_p, PARSER_ERR_DUPLICATED_IMPORT_BINDING);
|
||||
}
|
||||
|
||||
ecma_string_t *import_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR);
|
||||
ecma_string_t *import_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_ASTERISK_CHAR);
|
||||
|
||||
parser_module_add_names_to_node (context_p, import_name_p, local_name_p);
|
||||
ecma_deref_ecma_string (local_name_p);
|
||||
|
@ -2439,7 +2439,7 @@ parser_parse_export_statement (parser_context_t *context_p) /**< context */
|
|||
parser_raise_error (context_p, PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER);
|
||||
}
|
||||
|
||||
ecma_string_t *local_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_ASTERIX_CHAR);
|
||||
ecma_string_t *local_name_p = ecma_get_magic_string (LIT_MAGIC_STRING_ASTERISK_CHAR);
|
||||
parser_module_add_names_to_node (context_p, export_name_p, local_name_p);
|
||||
ecma_deref_ecma_string (export_name_p);
|
||||
|
||||
|
|
|
@ -46,12 +46,12 @@ JERRY_STATIC_ASSERT ((PARSER_RESTORE_STATUS_FLAGS (ECMA_PARSE_FUNCTION_CONTEXT)
|
|||
ecma_parse_function_context_must_not_be_transformed);
|
||||
|
||||
/**
|
||||
* Compute real literal indicies.
|
||||
* Compute real literal indices.
|
||||
*
|
||||
* @return length of the prefix opcodes
|
||||
*/
|
||||
static void
|
||||
parser_compute_indicies (parser_context_t *context_p, /**< context */
|
||||
parser_compute_indices (parser_context_t *context_p, /**< context */
|
||||
uint16_t *ident_end, /**< end of the identifier group */
|
||||
uint16_t *const_literal_end) /**< end of the const literal group */
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
|
|||
|
||||
*ident_end = ident_index;
|
||||
*const_literal_end = const_literal_index;
|
||||
} /* parser_compute_indicies */
|
||||
} /* parser_compute_indices */
|
||||
|
||||
/**
|
||||
* Initialize literal pool.
|
||||
|
@ -608,7 +608,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
|
|||
|
||||
JERRY_ASSERT (context_p->literal_count <= PARSER_MAXIMUM_NUMBER_OF_LITERALS);
|
||||
|
||||
parser_compute_indicies (context_p, &ident_end, &const_literal_end);
|
||||
parser_compute_indices (context_p, &ident_end, &const_literal_end);
|
||||
|
||||
if (context_p->literal_count <= CBC_MAXIMUM_SMALL_VALUE)
|
||||
{
|
||||
|
@ -778,7 +778,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
|
|||
if (last_opcode == (cbc_opcode_t) (CBC_JUMP_FORWARD + PARSER_MAX_BRANCH_LENGTH - 1) && prefix_zero
|
||||
&& page_p->bytes[offset] == PARSER_MAX_BRANCH_LENGTH + 1)
|
||||
{
|
||||
/* Uncoditional jumps which jump right after the instruction
|
||||
/* Unconditional jumps which jump right after the instruction
|
||||
* are effectively NOPs. These jumps are removed from the
|
||||
* stream. The 1 byte long CBC_JUMP_FORWARD form marks these
|
||||
* instructions, since this form is constructed during post
|
||||
|
@ -2963,7 +2963,7 @@ parser_parse_class_fields (parser_context_t *context_p) /**< context */
|
|||
* Check whether the last emitted cbc opcode was an anonymous function declaration
|
||||
*
|
||||
* @return PARSER_NOT_FUNCTION_LITERAL - if the last opcode is not a function literal
|
||||
* PARSER_NAMED_FUNCTION - if the last opcode is not a named function declataion
|
||||
* PARSER_NAMED_FUNCTION - if the last opcode is not a named function declaration
|
||||
* PARSER_ANONYMOUS_CLASS - if the last opcode is an anonymous class declaration
|
||||
* literal index of the anonymous function literal - otherwise
|
||||
*/
|
||||
|
|
|
@ -182,7 +182,7 @@ typedef enum
|
|||
*/
|
||||
|
||||
/**
|
||||
* Literal is a local declration (let, const, catch variable, etc.)
|
||||
* Literal is a local declaration (let, const, catch variable, etc.)
|
||||
*/
|
||||
#define SCANNER_LITERAL_IS_LOCAL (SCANNER_LITERAL_IS_LET | SCANNER_LITERAL_IS_CONST)
|
||||
|
||||
|
|
|
@ -2123,7 +2123,7 @@ scanner_is_context_needed (parser_context_t *context_p, /**< context */
|
|||
{
|
||||
/* The return value is true, if the variable is stored in the lexical environment
|
||||
* or all registers have already been used for function arguments. This can be
|
||||
* inprecise in the latter case, but this is a very rare corner case. A more
|
||||
* imprecise in the latter case, but this is a very rare corner case. A more
|
||||
* sophisticated check would require to decode the literal. */
|
||||
if ((data & SCANNER_STREAM_NO_REG) || scope_stack_reg_top >= PARSER_MAXIMUM_NUMBER_OF_REGISTERS)
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ re_insert_byte (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */
|
|||
} /* re_insert_byte */
|
||||
|
||||
/**
|
||||
* Get a single byte and icnrease bytecode position.
|
||||
* Get a single byte and increase bytecode position.
|
||||
*/
|
||||
uint8_t
|
||||
re_get_byte (const uint8_t **bc_p) /**< pointer to bytecode start */
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#define RE_VALUE_1BYTE_MAX 0xFE
|
||||
|
||||
/**
|
||||
* Marker that signals that the actual value is enocded in the following 4 bytes in the bytecode.
|
||||
* Marker that signals that the actual value is encoded in the following 4 bytes in the bytecode.
|
||||
*/
|
||||
#define RE_VALUE_4BYTE_MARKER 0xFF
|
||||
|
||||
|
|
|
@ -876,7 +876,7 @@ opfunc_async_create_and_await (vm_frame_ctx_t *frame_ctx_p, /**< frame context *
|
|||
} /* opfunc_async_create_and_await */
|
||||
|
||||
/**
|
||||
* PrivateMethodOrAccessorAdd abstact operation.
|
||||
* PrivateMethodOrAccessorAdd abstract operation.
|
||||
*
|
||||
* See also: ECMAScript v12, 7.3.29.
|
||||
*
|
||||
|
@ -1180,7 +1180,7 @@ opfunc_create_implicit_class_constructor (uint8_t opcode, /**< current cbc opcod
|
|||
} /* opfunc_create_implicit_class_constructor */
|
||||
|
||||
/**
|
||||
* Set the [[HomeObject]] attribute of the given functon object
|
||||
* Set the [[HomeObject]] attribute of the given function object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -1217,7 +1217,7 @@ opfunc_make_private_key (ecma_value_t descriptor) /**< descriptor */
|
|||
* Find a private property in the private elements internal property given the key
|
||||
*
|
||||
* @return pointer to the private property - if it is found,
|
||||
* NULL - othervise
|
||||
* NULL - otherwise
|
||||
*/
|
||||
static ecma_property_t *
|
||||
opfunc_find_private_key (ecma_object_t *class_object_p, /**< class environment */
|
||||
|
@ -1270,7 +1270,7 @@ opfunc_find_private_key (ecma_object_t *class_object_p, /**< class environment *
|
|||
} /* opfunc_find_private_key */
|
||||
|
||||
/**
|
||||
* PrivateElementFind abstact operation
|
||||
* PrivateElementFind abstract operation
|
||||
*
|
||||
* See also: ECMAScript v12, 7.3.27
|
||||
*
|
||||
|
@ -1350,7 +1350,7 @@ opfunc_private_in (ecma_value_t base, /**< base */
|
|||
} /* opfunc_private_in */
|
||||
|
||||
/**
|
||||
* PrivateFieldAdd abstact operation
|
||||
* PrivateFieldAdd abstract operation
|
||||
*
|
||||
* See also: ECMAScript v12, 7.3.28
|
||||
*
|
||||
|
@ -1382,7 +1382,7 @@ opfunc_private_field_add (ecma_value_t base, /**< base object */
|
|||
} /* opfunc_private_field_add */
|
||||
|
||||
/**
|
||||
* PrivateSet abstact operation
|
||||
* PrivateSet abstract operation
|
||||
*
|
||||
* See also: ECMAScript v12, 7.3.31
|
||||
*
|
||||
|
@ -1449,7 +1449,7 @@ opfunc_private_set (ecma_value_t base, /**< this object */
|
|||
} /* opfunc_private_set */
|
||||
|
||||
/**
|
||||
* PrivateGet abstact operation
|
||||
* PrivateGet abstract operation
|
||||
*
|
||||
* See also: ECMAScript v12, 7.3.30
|
||||
*
|
||||
|
|
|
@ -2976,7 +2976,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
|||
|
||||
if (JERRY_LIKELY (int_increase != 0))
|
||||
{
|
||||
/* Postfix operators require the unmodifed number value. */
|
||||
/* Postfix operators require the unmodified number value. */
|
||||
if (opcode_flags & VM_OC_POST_INCR_DECR_OPERATOR_FLAG)
|
||||
{
|
||||
POST_INCREASE_DECREASE_PUT_RESULT (result);
|
||||
|
@ -3015,7 +3015,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
|||
operation_type = ECMA_BIGINT_UNARY_DECREASE;
|
||||
}
|
||||
|
||||
/* Postfix operators require the unmodifed number value. */
|
||||
/* Postfix operators require the unmodified number value. */
|
||||
if (opcode_flags & VM_OC_POST_INCR_DECR_OPERATOR_FLAG)
|
||||
{
|
||||
POST_INCREASE_DECREASE_PUT_RESULT (result);
|
||||
|
@ -3048,7 +3048,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
|||
increase = ECMA_NUMBER_MINUS_ONE;
|
||||
}
|
||||
|
||||
/* Postfix operators require the unmodifed number value. */
|
||||
/* Postfix operators require the unmodified number value. */
|
||||
if (opcode_flags & VM_OC_POST_INCR_DECR_OPERATOR_FLAG)
|
||||
{
|
||||
POST_INCREASE_DECREASE_PUT_RESULT (result);
|
||||
|
|
|
@ -238,7 +238,7 @@ typedef enum
|
|||
VM_OC_CHECK_VAR, /**< check redeclared vars in the global scope */
|
||||
VM_OC_CHECK_LET, /**< check redeclared lets in the global scope */
|
||||
VM_OC_ASSIGN_LET_CONST, /**< assign values to let/const declarations */
|
||||
VM_OC_INIT_BINDING, /**< create and intialize a binding */
|
||||
VM_OC_INIT_BINDING, /**< create and initialize a binding */
|
||||
VM_OC_THROW_CONST_ERROR, /**< throw invalid assignment to const variable error */
|
||||
VM_OC_COPY_TO_GLOBAL, /**< copy value to global lex env */
|
||||
VM_OC_COPY_FROM_ARG, /**< copy value from arg lex env */
|
||||
|
@ -264,7 +264,7 @@ typedef enum
|
|||
VM_OC_RUN_STATIC_FIELD_INIT, /**< run the static class field initializer function */
|
||||
VM_OC_SET_NEXT_COMPUTED_FIELD, /**< set the next computed field of a class */
|
||||
VM_OC_PUSH_SUPER_CONSTRUCTOR, /**< getSuperConstructor operation */
|
||||
VM_OC_RESOLVE_LEXICAL_THIS, /**< resolve this_binding from from the lexical environment */
|
||||
VM_OC_RESOLVE_LEXICAL_THIS, /**< resolve this_binding from the lexical environment */
|
||||
VM_OC_SUPER_REFERENCE, /**< push super reference */
|
||||
VM_OC_SET_HOME_OBJECT, /**< set the [[HomeObject]] environment in an object literal */
|
||||
VM_OC_OBJECT_LITERAL_HOME_ENV, /**< create/destroy [[HomeObject]] environment of an object literal */
|
||||
|
@ -272,8 +272,8 @@ typedef enum
|
|||
|
||||
VM_OC_PUSH_SPREAD_ELEMENT, /**< push spread element */
|
||||
VM_OC_PUSH_REST_OBJECT, /**< push rest object */
|
||||
VM_OC_ITERATOR_CONTEXT_CREATE, /**< create iterator conext */
|
||||
VM_OC_ITERATOR_CONTEXT_END, /**< finalize iterator cotnext */
|
||||
VM_OC_ITERATOR_CONTEXT_CREATE, /**< create iterator context */
|
||||
VM_OC_ITERATOR_CONTEXT_END, /**< finalize iterator context */
|
||||
VM_OC_ITERATOR_STEP, /**< IteratorStep abstract operation */
|
||||
VM_OC_OBJ_INIT_CONTEXT_CREATE, /**< create object initializer context */
|
||||
VM_OC_OBJ_INIT_CONTEXT_END, /**< finalize object initializer context */
|
||||
|
@ -294,7 +294,7 @@ typedef enum
|
|||
VM_OC_STRING_CONCAT, /**< string concatenation */
|
||||
VM_OC_GET_TEMPLATE_OBJECT, /**< GetTemplateObject operation */
|
||||
VM_OC_PUSH_NEW_TARGET, /**< push new.target onto the stack */
|
||||
VM_OC_REQUIRE_OBJECT_COERCIBLE, /**< RequireObjectCoercible opretaion */
|
||||
VM_OC_REQUIRE_OBJECT_COERCIBLE, /**< RequireObjectCoercible operation */
|
||||
VM_OC_ASSIGN_SUPER, /**< assign super reference */
|
||||
VM_OC_SET__PROTO__, /**< set prototype when __proto__: form is used */
|
||||
VM_OC_PUSH_STATIC_FIELD_FUNC, /**< push static field initializer function */
|
||||
|
|
|
@ -856,7 +856,7 @@ public:
|
|||
/*!
|
||||
\param a An array obtained by \c GetArray().
|
||||
\note \c Array is always pass-by-value.
|
||||
\note the source array is moved into this value and the sourec array becomes empty.
|
||||
\note the source array is moved into this value and the source array becomes empty.
|
||||
*/
|
||||
GenericValue(Array a) RAPIDJSON_NOEXCEPT : data_(a.value_.data_) {
|
||||
a.value_.data_ = Data();
|
||||
|
@ -867,7 +867,7 @@ public:
|
|||
/*!
|
||||
\param o An object obtained by \c GetObject().
|
||||
\note \c Object is always pass-by-value.
|
||||
\note the source object is moved into this value and the sourec object becomes empty.
|
||||
\note the source object is moved into this value and the source object becomes empty.
|
||||
*/
|
||||
GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {
|
||||
o.value_.data_ = Data();
|
||||
|
@ -922,7 +922,7 @@ public:
|
|||
if (RAPIDJSON_LIKELY(this != &rhs)) {
|
||||
// Can't destroy "this" before assigning "rhs", otherwise "rhs"
|
||||
// could be used after free if it's an sub-Value of "this",
|
||||
// hence the temporary danse.
|
||||
// hence the temporary dance.
|
||||
GenericValue temp;
|
||||
temp.RawAssign(rhs);
|
||||
this->~GenericValue();
|
||||
|
@ -1820,7 +1820,7 @@ public:
|
|||
uint64_t GetUint64() const { RAPIDJSON_ASSERT(data_.f.flags & kUint64Flag); return data_.n.u64; }
|
||||
|
||||
//! Get the value as double type.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the converison is lossless.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the conversion is lossless.
|
||||
*/
|
||||
double GetDouble() const {
|
||||
RAPIDJSON_ASSERT(IsNumber());
|
||||
|
@ -1832,7 +1832,7 @@ public:
|
|||
}
|
||||
|
||||
//! Get the value as float type.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the converison is lossless.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the conversion is lossless.
|
||||
*/
|
||||
float GetFloat() const {
|
||||
return static_cast<float>(GetDouble());
|
||||
|
|
|
@ -452,7 +452,7 @@ struct UTF32 {
|
|||
}
|
||||
};
|
||||
|
||||
//! UTF-32 little endian enocoding.
|
||||
//! UTF-32 little endian encoding.
|
||||
template<typename CharType = unsigned>
|
||||
struct UTF32LE : UTF32<CharType> {
|
||||
template <typename InputByteStream>
|
||||
|
@ -609,7 +609,7 @@ enum UTFType {
|
|||
};
|
||||
|
||||
//! Dynamically select encoding according to stream's runtime-specified UTF encoding type.
|
||||
/*! \note This class can be used with AutoUTFInputtStream and AutoUTFOutputStream, which provides GetType().
|
||||
/*! \note This class can be used with AutoUTFInputStream and AutoUTFOutputStream, which provides GetType().
|
||||
*/
|
||||
template<typename CharType>
|
||||
struct AutoUTF {
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
//! Assignment operator.
|
||||
GenericPointer& operator=(const GenericPointer& rhs) {
|
||||
if (this != &rhs) {
|
||||
// Do not delete ownAllcator
|
||||
// Do not delete ownAllocator
|
||||
if (nameBuffer_)
|
||||
Allocator::Free(tokens_);
|
||||
|
||||
|
@ -525,7 +525,7 @@ public:
|
|||
|
||||
\note
|
||||
There are only 3 situations when a URI cannot be resolved:
|
||||
1. A value in the path is not an array nor object.
|
||||
1. A value in the path is neither an array nor object.
|
||||
2. An object value does not contain the token.
|
||||
3. A token is out of range of an array value.
|
||||
|
||||
|
@ -586,7 +586,7 @@ public:
|
|||
|
||||
\note
|
||||
There are only 3 situations when a value cannot be resolved:
|
||||
1. A value in the path is not an array nor object.
|
||||
1. A value in the path is neither an array nor object.
|
||||
2. An object value does not contain the token.
|
||||
3. A token is out of range of an array value.
|
||||
|
||||
|
|
|
@ -1002,7 +1002,7 @@ private:
|
|||
//!@endcond
|
||||
|
||||
for (;;) {
|
||||
// Scan and copy string before "\\\"" or < 0x20. This is an optional optimzation.
|
||||
// Scan and copy string before "\\\"" or < 0x20. This is an optional optimization.
|
||||
if (!(parseFlags & kParseValidateEncodingFlag))
|
||||
ScanCopyUnescapedString(is, os);
|
||||
|
||||
|
@ -2018,7 +2018,7 @@ private:
|
|||
case IterativeParsingObjectInitialState:
|
||||
case IterativeParsingArrayInitialState:
|
||||
{
|
||||
// Push the state(Element or MemeberValue) if we are nested in another array or value of member.
|
||||
// Push the state(Element or MemberValue) if we are nested in another array or value of member.
|
||||
// In this way we can get the correct state on ObjectFinish or ArrayFinish by frame pop.
|
||||
IterativeParsingState n = src;
|
||||
if (src == IterativeParsingArrayInitialState || src == IterativeParsingElementDelimiterState)
|
||||
|
|
|
@ -264,7 +264,7 @@ public:
|
|||
virtual void DestroySchemaValidator(ISchemaValidator* validator) = 0;
|
||||
virtual void* CreateHasher() = 0;
|
||||
virtual uint64_t GetHashCode(void* hasher) = 0;
|
||||
virtual void DestroryHasher(void* hasher) = 0;
|
||||
virtual void DestroyHasher(void* hasher) = 0;
|
||||
virtual void* MallocState(size_t size) = 0;
|
||||
virtual void FreeState(void* p) = 0;
|
||||
};
|
||||
|
@ -311,7 +311,7 @@ public:
|
|||
virtual void StartMissingDependentProperties() = 0;
|
||||
virtual void AddMissingDependentProperty(const SValue& targetName) = 0;
|
||||
virtual void EndMissingDependentProperties(const SValue& sourceName) = 0;
|
||||
virtual void AddDependencySchemaError(const SValue& souceName, ISchemaValidator* subvalidator) = 0;
|
||||
virtual void AddDependencySchemaError(const SValue& sourceName, ISchemaValidator* subvalidator) = 0;
|
||||
virtual bool EndDependencyErrors() = 0;
|
||||
|
||||
virtual void DisallowedValue(const ValidateErrorCode code) = 0;
|
||||
|
@ -468,7 +468,7 @@ struct SchemaValidationContext {
|
|||
|
||||
~SchemaValidationContext() {
|
||||
if (hasher)
|
||||
factory.DestroryHasher(hasher);
|
||||
factory.DestroyHasher(hasher);
|
||||
if (validators) {
|
||||
for (SizeType i = 0; i < validatorCount; i++) {
|
||||
if (validators[i]) {
|
||||
|
@ -2920,7 +2920,7 @@ public:
|
|||
return static_cast<HasherType*>(hasher)->GetHashCode();
|
||||
}
|
||||
|
||||
virtual void DestroryHasher(void* hasher) {
|
||||
virtual void DestroyHasher(void* hasher) {
|
||||
HasherType* h = static_cast<HasherType*>(hasher);
|
||||
h->~HasherType();
|
||||
StateAllocator::Free(h);
|
||||
|
|
|
@ -64,8 +64,8 @@ struct RenderContext
|
|||
Matrix* transform = nullptr;
|
||||
float roundness = 0.0f;
|
||||
bool fragmenting = false; //render context has been fragmented by filling
|
||||
bool reqFragment = false; //requirment to fragment the render context
|
||||
bool ownPropagator = true; //this rendering context shares the propergator
|
||||
bool reqFragment = false; //requirement to fragment the render context
|
||||
bool ownPropagator = true; //this rendering context shares the propagator
|
||||
|
||||
RenderContext()
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ struct ExpContent
|
|||
};
|
||||
|
||||
|
||||
//reserved expressions speicifiers
|
||||
//reserved expressions specifiers
|
||||
static const char* EXP_NAME = "name";
|
||||
static const char* EXP_CONTENT = "content";
|
||||
static const char* EXP_WIDTH = "width";
|
||||
|
@ -855,7 +855,7 @@ static jerry_value_t _key(const jerry_call_info_t* info, const jerry_value_t arg
|
|||
|
||||
static jerry_value_t _createPath(const jerry_call_info_t* info, const jerry_value_t args[], const jerry_length_t argsCnt)
|
||||
{
|
||||
//TODO: arg1: points, arg2: inTagents, arg3: outTangents, arg4: isClosed
|
||||
//TODO: arg1: points, arg2: inTangents, arg3: outTangents, arg4: isClosed
|
||||
auto arg1 = jerry_value_to_object(args[0]);
|
||||
auto pathset = jerry_object_get_native_ptr(arg1, nullptr);
|
||||
if (!pathset) {
|
||||
|
@ -876,7 +876,7 @@ static jerry_value_t _uniformPath(const jerry_call_info_t* info, const jerry_val
|
|||
auto pathset = static_cast<LottiePathSet*>(jerry_object_get_native_ptr(info->function, nullptr));
|
||||
|
||||
/* TODO: ThorVG prebuilds the path data for performance.
|
||||
It acutally need to constructs the Array<Point> for points, inTangents, outTangents and then return here... */
|
||||
It actually need to constructs the Array<Point> for points, inTangents, outTangents and then return here... */
|
||||
auto obj = jerry_object();
|
||||
jerry_object_set_native_ptr(obj, nullptr, pathset);
|
||||
return obj;
|
||||
|
@ -892,7 +892,7 @@ static jerry_value_t _isClosed(const jerry_call_info_t* info, const jerry_value_
|
|||
|
||||
static void _buildPath(jerry_value_t context, LottieExpression* exp)
|
||||
{
|
||||
//Trick for fast buliding path.
|
||||
//Trick for fast building path.
|
||||
auto points = jerry_function_external(_uniformPath);
|
||||
jerry_object_set_native_ptr(points, nullptr, exp->property);
|
||||
jerry_object_set_sz(context, "points", points);
|
||||
|
@ -1218,7 +1218,7 @@ jerry_value_t LottieExpressions::evaluate(float frameNo, LottieExpression* exp)
|
|||
auto eval = jerry_eval((jerry_char_t *) exp->code, strlen(exp->code), JERRY_PARSE_NO_OPTS);
|
||||
|
||||
if (jerry_value_is_exception(eval) || jerry_value_is_undefined(eval)) {
|
||||
exp->enabled = false; // The feature is experimental, it will be forcely turned off if it's incompatible.
|
||||
exp->enabled = false; // The feature is experimental, it will be forcefully turned off if it's incompatible.
|
||||
return jerry_undefined();
|
||||
}
|
||||
|
||||
|
|
|
@ -299,13 +299,13 @@ bool LottieLoader::override(const char* slot)
|
|||
|
||||
if (idx < 1) success = false;
|
||||
free(temp);
|
||||
rebuild = overriden = success;
|
||||
rebuild = overridden = success;
|
||||
//reset slots
|
||||
} else if (overriden) {
|
||||
} else if (overridden) {
|
||||
for (auto s = comp->slots.begin(); s < comp->slots.end(); ++s) {
|
||||
(*s)->reset();
|
||||
}
|
||||
overriden = false;
|
||||
overridden = false;
|
||||
rebuild = true;
|
||||
}
|
||||
return success;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue