Skip to content

Commit

Permalink
Merge pull request #114 from cloudflare/branch-12.7
Browse files Browse the repository at this point in the history
Google V8 - Branch 12.7
  • Loading branch information
buffer authored Jul 24, 2024
2 parents 37ae2c5 + e31698d commit 5108e66
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
10 changes: 6 additions & 4 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
V8_HOME = os.environ.get("V8_HOME", os.path.join(STPYV8_HOME, "v8"))

V8_GIT_URL = "https://chromium.googlesource.com/v8/v8.git"
V8_GIT_TAG_STABLE = "12.6.228.21"
V8_GIT_TAG_STABLE = "12.7.224.16"
V8_GIT_TAG_MASTER = "master"
V8_GIT_TAG = V8_GIT_TAG_STABLE
DEPOT_GIT_URL = "https://chromium.googlesource.com/chromium/tools/depot_tools.git"
Expand Down Expand Up @@ -117,7 +117,7 @@ def get_libboost_python_name():
library_dirs.add(os.path.join(os.environ["Python_ROOT_DIR"], "libs"))

libraries += ["winmm", "ws2_32", "Advapi32", "dbghelp", "v8_monolith"]
extra_compile_args += ["/O2", "/GL", "/MT", "/EHsc", "/Gy", "/Zi", "/std:c++20"]
extra_compile_args += ["/O2", "/GL", "/MT", "/EHsc", "/Gy", "/Zi", "/std:c++20", "/Zc:__cplusplus"]
extra_link_args += ["/DLL", "/OPT:REF", "/OPT:ICF", "/MACHINE:X64"]
macros += [
("HAVE_SNPRINTF", None),
Expand All @@ -134,10 +134,12 @@ def get_libboost_python_name():
STPYV8_BOOST_PYTHON.replace(".", ""),
]

extra_compile_args.append("-std=c++17")

if platform.system() in ("Linux",):
libraries.append("rt")
extra_compile_args.append("-std=c++2a")
else:
extra_compile_args.append("-std=c++20")
extra_link_args.append("-headerpad_max_install_names")


GN_ARGS = " ".join(f"{key}={value}" for key, value in gn_args.items())
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def run(self):
(ICU_DATA_PACKAGE_FOLDER, [ICU_DATA_V8_FILE_PATH]),
],
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
Expand All @@ -274,10 +274,12 @@ def run(self):
"Topic :: Utilities",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
long_description_content_type="text/markdown",
cmdclass=dict(
Expand Down
4 changes: 2 additions & 2 deletions src/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ std::shared_ptr<CScript> CEngine::InternalCompile(v8::Handle<v8::String> src,

if (line >= 0 && col >= 0)
{
v8::ScriptOrigin script_origin(m_isolate, name, line, col);
v8::ScriptOrigin script_origin(name, line, col);
script = v8::Script::Compile(context, source, &script_origin);
}
else
{
v8::ScriptOrigin script_origin(m_isolate, name);
v8::ScriptOrigin script_origin(name);
script = v8::Script::Compile(context, source, &script_origin);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void CPythonObject::SetupObjectTemplate(v8::Isolate *isolate, v8::Handle<v8::Obj

clazz->SetInternalFieldCount(1);
clazz->SetHandler(v8::NamedPropertyHandlerConfiguration(NamedGetter, NamedSetter, NamedQuery, NamedDeleter, NamedEnumerator));
clazz->SetIndexedPropertyHandler(IndexedGetter, IndexedSetter, IndexedQuery, IndexedDeleter, IndexedEnumerator);
clazz->SetHandler(v8::IndexedPropertyHandlerConfiguration(IndexedGetter, IndexedSetter, IndexedQuery, IndexedDeleter, IndexedEnumerator));
clazz->SetCallAsFunctionHandler(Caller);
}

Expand Down
6 changes: 5 additions & 1 deletion src/utf8/checked.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,15 @@ namespace utf8

// The iterator class
template <typename octet_iterator>
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
// class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
class iterator {
octet_iterator it;
octet_iterator range_start;
octet_iterator range_end;
public:
using iterator_category = std::bidirectional_iterator_tag;
using value_type = uint32_t;

iterator () {};
explicit iterator (const octet_iterator& octet_it,
const octet_iterator& range_start,
Expand Down
6 changes: 5 additions & 1 deletion src/utf8/unchecked.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,13 @@ namespace utf8

// The iterator class
template <typename octet_iterator>
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
// class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
class iterator {
octet_iterator it;
public:
using iterator_category = std::bidirectional_iterator_tag;
using value_type = uint32_t;

iterator () {};
explicit iterator (const octet_iterator& octet_it): it(octet_it) {}
// the default "big three" are OK
Expand Down

0 comments on commit 5108e66

Please sign in to comment.