391
|
1 |
# HG changeset patch
|
|
2 |
# Parent a45e9e6825a2d7e7f4f64df34ccf9fa74fcac6cb
|
|
3 |
# User Landry Breuil <landry@openbsd.org>
|
|
4 |
Use YARR interpreter instead of PCRE on platforms where YARR JIT is not
|
|
5 |
supported
|
378
|
6 |
|
|
7 |
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
|
|
8 |
--- a/js/src/Makefile.in
|
|
9 |
+++ b/js/src/Makefile.in
|
386
|
10 |
@@ -356,25 +356,30 @@ CPPSRCS += checks.cc \
|
|
11 |
# END enclude sources for V8 dtoa
|
|
12 |
#############################################
|
|
13 |
|
|
14 |
# For architectures without YARR JIT, PCRE is faster than the YARR
|
|
15 |
# interpreter (bug 684559).
|
378
|
16 |
|
|
17 |
ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
|
|
18 |
|
|
19 |
-VPATH += $(srcdir)/yarr/pcre \
|
|
20 |
+VPATH += $(srcdir)/assembler \
|
391
|
21 |
+ $(srcdir)/assembler/wtf \
|
|
22 |
+ $(srcdir)/yarr \
|
378
|
23 |
$(NULL)
|
|
24 |
|
|
25 |
CPPSRCS += \
|
|
26 |
- pcre_compile.cpp \
|
|
27 |
- pcre_exec.cpp \
|
|
28 |
- pcre_tables.cpp \
|
|
29 |
- pcre_xclass.cpp \
|
|
30 |
- pcre_ucp_searchfuncs.cpp \
|
391
|
31 |
+ Assertions.cpp \
|
|
32 |
+ OSAllocatorOS2.cpp \
|
|
33 |
+ OSAllocatorPosix.cpp \
|
|
34 |
+ OSAllocatorWin.cpp \
|
|
35 |
+ PageBlock.cpp \
|
|
36 |
+ YarrInterpreter.cpp \
|
|
37 |
+ YarrPattern.cpp \
|
|
38 |
+ YarrSyntaxChecker.cpp \
|
378
|
39 |
$(NULL)
|
|
40 |
else
|
|
41 |
|
386
|
42 |
###############################################
|
|
43 |
# BEGIN include sources for the Nitro assembler
|
|
44 |
#
|
|
45 |
|
|
46 |
ENABLE_YARR_JIT = 1
|
|
47 |
@@ -916,20 +921,20 @@ endif
|
|
48 |
|
|
49 |
###############################################
|
|
50 |
# BEGIN kludges for the Nitro assembler
|
|
51 |
#
|
|
52 |
|
378
|
53 |
# Needed to "configure" it correctly. Unfortunately these
|
|
54 |
# flags wind up being applied to all code in js/src, not just
|
|
55 |
# the code in js/src/assembler.
|
|
56 |
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
|
|
57 |
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
|
|
58 |
|
386
|
59 |
ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_METHODJIT))
|
378
|
60 |
-CXXFLAGS += -DENABLE_JIT=1
|
|
61 |
+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
|
|
62 |
endif
|
|
63 |
|
|
64 |
INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
|
386
|
65 |
|
|
66 |
ifdef ENABLE_METHODJIT
|
|
67 |
# Build a standalone test program that exercises the assembler
|
|
68 |
# sources a bit.
|
|
69 |
TESTMAIN_OBJS = \
|
378
|
70 |
diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
|
|
71 |
--- a/js/src/yarr/wtfbridge.h
|
|
72 |
+++ b/js/src/yarr/wtfbridge.h
|
386
|
73 |
@@ -44,19 +44,17 @@
|
|
74 |
* WTF compatibility layer. This file provides various type and data
|
|
75 |
* definitions for use by Yarr.
|
|
76 |
*/
|
|
77 |
|
|
78 |
#include "jsstr.h"
|
378
|
79 |
#include "jsprvtd.h"
|
|
80 |
#include "vm/String.h"
|
|
81 |
#include "assembler/wtf/Platform.h"
|
|
82 |
-#if ENABLE_YARR_JIT
|
|
83 |
#include "assembler/jit/ExecutableAllocator.h"
|
|
84 |
-#endif
|
|
85 |
|
|
86 |
namespace JSC { namespace Yarr {
|
|
87 |
|
386
|
88 |
/*
|
|
89 |
* Basic type definitions.
|
|
90 |
*/
|
|
91 |
|
|
92 |
typedef jschar UChar;
|