Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
V
V8
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
V8
Commits
f3ea8f46
Commit
f3ea8f46
authored
Sep 28, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Encoder
parent
4ad6b5b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
227 additions
and
195 deletions
+227
-195
BUILD.gn
BUILD.gn
+1
-0
builtins-definitions.h
src/builtins/builtins-definitions.h
+198
-195
builtins-encoder.cc
src/builtins/builtins-encoder.cc
+19
-0
bootstrapper.cc
src/init/bootstrapper.cc
+9
-0
No files found.
BUILD.gn
View file @
f3ea8f46
...
@@ -4314,6 +4314,7 @@ v8_source_set("v8_base_without_compiler") {
...
@@ -4314,6 +4314,7 @@ v8_source_set("v8_base_without_compiler") {
"src/builtins/builtins-internal.cc"
,
"src/builtins/builtins-internal.cc"
,
"src/builtins/builtins-intl.cc"
,
"src/builtins/builtins-intl.cc"
,
"src/builtins/builtins-json.cc"
,
"src/builtins/builtins-json.cc"
,
"src/builtins/builtins-encoder.cc"
,
"src/builtins/builtins-number.cc"
,
"src/builtins/builtins-number.cc"
,
"src/builtins/builtins-object.cc"
,
"src/builtins/builtins-object.cc"
,
"src/builtins/builtins-reflect.cc"
,
"src/builtins/builtins-reflect.cc"
,
...
...
src/builtins/builtins-definitions.h
View file @
f3ea8f46
This diff is collapsed.
Click to expand it.
src/builtins/builtins-encoder.cc
0 → 100644
View file @
f3ea8f46
#include <stdio.h>
#include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils-inl.h"
namespace
v8
{
namespace
internal
{
BUILTIN
(
Encode
)
{
HandleScope
scope
(
isolate
);
printf
(
"Encoding...
\n
"
);
return
*
isolate
->
factory
()
->
ToBoolean
(
true
);
}
}
// internal
}
// v8
src/init/bootstrapper.cc
View file @
f3ea8f46
...
@@ -2786,6 +2786,15 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
...
@@ -2786,6 +2786,15 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallToStringTag
(
isolate_
,
json_object
,
"JSON"
);
InstallToStringTag
(
isolate_
,
json_object
,
"JSON"
);
}
}
{
Handle
<
JSObject
>
encoder
=
factory
->
NewJSObject
(
isolate_
->
object_function
(),
AllocationType
::
kOld
);
JSObject
::
AddProperty
(
isolate_
,
global
,
"ENCODER"
,
encoder
,
DONT_ENUM
);
SimpleInstallFunction
(
isolate_
,
encoder
,
"encode"
,
Builtin
::
kEncode
,
0
,
true
);
InstallToStringTag
(
isolate_
,
encoder
,
"ENCODER"
);
}
{
// -- M a t h
{
// -- M a t h
Handle
<
JSObject
>
math
=
Handle
<
JSObject
>
math
=
factory
->
NewJSObject
(
isolate_
->
object_function
(),
AllocationType
::
kOld
);
factory
->
NewJSObject
(
isolate_
->
object_function
(),
AllocationType
::
kOld
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment