#1679 Make the new regexp code build and port/add any loose dependencies

Open
opened 5 months ago by mattatobin · 1 comments

Since the re-focus of the plan for how to handle this has been accomplished we have reached a point where script assisted and directed laying down of the code cannot proceed any further. From here on out we need to do things according to manual porting and of course fixing up so that it actually works with our codebase and compiler range for target platforms.

To that end this issue will serve to get the code actually building even though it isn’t hooked up to anything.

@Moonchild has been working toward this end on the aborted branch. He has made some progress which I will reland here as well as some dependancies that will also serve future porting from m-c. Those bugs will use the Bugzilla form but tag this issue.

Anyone else who wants to jump in can do so. I suppose since deps need to be properly checked and the code is otherwise behind build option --enable-new-regexp we will just do this on master.

Since the re-focus of the plan for how to handle this has been accomplished we have reached a point where script assisted and directed laying down of the code cannot proceed any further. From here on out we need to do things according to manual porting and of course fixing up so that it actually works with our codebase and compiler range for target platforms. To that end this issue will serve to get the code actually building even though it isn't hooked up to anything. @Moonchild has been working toward this end on the aborted branch. He has made some progress which I will reland here as well as some dependancies that will also serve future porting from `m-c`. Those bugs will use the `Bugzilla` form but tag this issue. Anyone else who wants to jump in can do so. I suppose since deps need to be properly checked and the code is otherwise behind build option `--enable-new-regexp` we will just do this on `master`.
mattatobin added the
C: Javascript
label 5 months ago
Moonchild commented 5 months ago
Owner

OK, I’m out of my depth here. I don’t know enough about the intricacies of templates to solve the following problem:

0:32.51 regexp-parser.cc
0:32.51 c:\mozdev\PaleMoon\platform\js\src\regexp/regexp-parser.h(330): error C2784: ‘bool operator <(const void *,const SharedMem &)': could not deduce template argument for ‘const SharedMem &’ from ‘const v8::internal::ZoneVectorv8::uc16’
0:32.51 c:\mozdev\palemoon\platform\js\src\vm/SharedMem.h(220): note: see declaration of ‘operator <’
0:32.51 c:\mozdev\PaleMoon\platform\js\src\regexp/regexp-parser.h(330): error C2676: binary ‘<’: ‘const v8::internal::ZoneVectorv8::uc16’ does not define this operator or a conversion to a type acceptable to the predefined operator
0:32.51
0:32.53 In the directory /c/mozdev/obj-pm-x64-unstable/js/src/regexp
0:32.53 The following command failed to execute properly:
0:32.53 c:/mozdev/obj-pm-x64-unstable/_virtualenv/Scripts/python.exe -m mozbuild.action.cl c:/VS2015/VC/BIN/amd64/cl.EXE -Foregexp-parser.obj -c -DNDEBUG=1 -DTRIMMED=1 -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX=”” -DDLL_SUFFIX=”.dll” -DFFI_BUILDING -D_CRT_RAND_S -DNOMINMAX -DMOZ_HAS_MOZGLUE -Ic:/mozdev/PaleMoon/platform/js/src/regexp -Ic:/mozdev/obj-pm-x64-unstable/js/src/regexp -Ic:/mozdev/obj-pm-x64-unstable/js/src -Ic:/mozdev/PaleMoon/platform/js/src -Ic:/mozdev/obj-pm-x64-unstable/dist/include -Ic:/mozdev/obj-pm-x64-unstable/dist/include/nspr -MD -FI c:/mozdev/obj-pm-x64-unstable/js/src/js-confdefs.h -DMOZILLA_CLIENT -TP -nologo -utf-8 -wd4345 -wd4351 -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -Gw -wd4244 -wd4267 -wd4251 -we4553 -GR- -Zi -O2 -GTs -GS- -favor:AMD64 -Oy -fp:precise -wd4805 -wd4661 -we4067 -we4258 -we4275 -wd4146 -wd4577 -wd4312 -Fdgenerated.pdb c:/mozdev/PaleMoon/platform/js/src/regexp/regexp-parser.cc

The offending code is:

  struct RegExpCaptureNameLess {
    bool operator()(const RegExpCapture* lhs, const RegExpCapture* rhs) const {
      DCHECK_NOT_NULL(lhs);
      DCHECK_NOT_NULL(rhs);
      return *lhs->name() < *rhs->name();  <- THIS LINE
    }
  };

Both lhs and rhs are the same type. So I’d assume that the output of name() is of a defined type and the same type... ?
@g4jc any idea, perhaps?

OK, I'm out of my depth here. I don't know enough about the intricacies of templates to solve the following problem: > 0:32.51 regexp-parser.cc 0:32.51 c:\mozdev\PaleMoon\platform\js\src\regexp/regexp-parser.h(330): error C2784: 'bool operator <(const void *,const SharedMem<T> &)': could not deduce template argument for 'const SharedMem<T> &' from 'const v8::internal::ZoneVector<v8::uc16>' 0:32.51 c:\mozdev\palemoon\platform\js\src\vm/SharedMem.h(220): note: see declaration of 'operator <' 0:32.51 c:\mozdev\PaleMoon\platform\js\src\regexp/regexp-parser.h(330): error C2676: binary '<': 'const v8::internal::ZoneVector<v8::uc16>' does not define this operator or a conversion to a type acceptable to the predefined operator 0:32.51 0:32.53 In the directory /c/mozdev/obj-pm-x64-unstable/js/src/regexp 0:32.53 The following command failed to execute properly: 0:32.53 c:/mozdev/obj-pm-x64-unstable/_virtualenv/Scripts/python.exe -m mozbuild.action.cl c:/VS2015/VC/BIN/amd64/cl.EXE -Foregexp-parser.obj -c -DNDEBUG=1 -DTRIMMED=1 -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX="" -DDLL_SUFFIX=".dll" -DFFI_BUILDING -D_CRT_RAND_S -DNOMINMAX -DMOZ_HAS_MOZGLUE -Ic:/mozdev/PaleMoon/platform/js/src/regexp -Ic:/mozdev/obj-pm-x64-unstable/js/src/regexp -Ic:/mozdev/obj-pm-x64-unstable/js/src -Ic:/mozdev/PaleMoon/platform/js/src -Ic:/mozdev/obj-pm-x64-unstable/dist/include -Ic:/mozdev/obj-pm-x64-unstable/dist/include/nspr -MD -FI c:/mozdev/obj-pm-x64-unstable/js/src/js-confdefs.h -DMOZILLA_CLIENT -TP -nologo -utf-8 -wd4345 -wd4351 -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -FS -Gw -wd4244 -wd4267 -wd4251 -we4553 -GR- -Zi -O2 -GTs -GS- -favor:AMD64 -Oy -fp:precise -wd4805 -wd4661 -we4067 -we4258 -we4275 -wd4146 -wd4577 -wd4312 -Fdgenerated.pdb c:/mozdev/PaleMoon/platform/js/src/regexp/regexp-parser.cc The offending code is: ```C++ struct RegExpCaptureNameLess { bool operator()(const RegExpCapture* lhs, const RegExpCapture* rhs) const { DCHECK_NOT_NULL(lhs); DCHECK_NOT_NULL(rhs); return *lhs->name() < *rhs->name(); <- THIS LINE } }; ``` Both lhs and rhs are the same type. So I'd assume that the output of name() is of a defined type and the same type... ? @g4jc any idea, perhaps?
mattatobin added the
Bounty
label 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Blocks
#1675 Update to Mozilla's new V8 regexp parser
MoonchildProductions/UXP
Loading…
There is no content yet.