aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/RuleList.h
diff options
context:
space:
mode:
Diffstat (limited to 'libevmasm/RuleList.h')
-rw-r--r--libevmasm/RuleList.h47
1 files changed, 40 insertions, 7 deletions
diff --git a/libevmasm/RuleList.h b/libevmasm/RuleList.h
index 0573856b..874a8929 100644
--- a/libevmasm/RuleList.h
+++ b/libevmasm/RuleList.h
@@ -44,12 +44,11 @@ template <class S> S modWorkaround(S const& _a, S const& _b)
return (S)(bigint(_a) % bigint(_b));
}
-/// @returns a list of simplification rules given certain match placeholders.
-/// A, B and C should represent constants, X and Y arbitrary expressions.
-/// The simplifications should never change the order of evaluation of
-/// arbitrary operations.
+// This part of simplificationRuleList below was split out to prevent
+// stack overflows in the JavaScript optimizer for emscripten builds
+// that affected certain browser versions.
template <class Pattern>
-std::vector<SimplificationRule<Pattern>> simplificationRuleList(
+std::vector<SimplificationRule<Pattern>> simplificationRuleListPart1(
Pattern A,
Pattern B,
Pattern C,
@@ -57,8 +56,7 @@ std::vector<SimplificationRule<Pattern>> simplificationRuleList(
Pattern Y
)
{
- std::vector<SimplificationRule<Pattern>> rules;
- rules += std::vector<SimplificationRule<Pattern>>{
+ return std::vector<SimplificationRule<Pattern>> {
// arithmetic on constants
{{Instruction::ADD, {A, B}}, [=]{ return A.d() + B.d(); }, false},
{{Instruction::MUL, {A, B}}, [=]{ return A.d() * B.d(); }, false},
@@ -162,6 +160,22 @@ std::vector<SimplificationRule<Pattern>> simplificationRuleList(
{{Instruction::OR, {X, {Instruction::NOT, {X}}}}, [=]{ return ~u256(0); }, true},
{{Instruction::OR, {{Instruction::NOT, {X}}, X}}, [=]{ return ~u256(0); }, true},
};
+}
+
+
+// This part of simplificationRuleList below was split out to prevent
+// stack overflows in the JavaScript optimizer for emscripten builds
+// that affected certain browser versions.
+template <class Pattern>
+std::vector<SimplificationRule<Pattern>> simplificationRuleListPart2(
+ Pattern A,
+ Pattern B,
+ Pattern,
+ Pattern X,
+ Pattern Y
+)
+{
+ std::vector<SimplificationRule<Pattern>> rules;
// Replace MOD X, <power-of-two> with AND X, <power-of-two> - 1
for (size_t i = 0; i < 256; ++i)
@@ -292,5 +306,24 @@ std::vector<SimplificationRule<Pattern>> simplificationRuleList(
return rules;
}
+/// @returns a list of simplification rules given certain match placeholders.
+/// A, B and C should represent constants, X and Y arbitrary expressions.
+/// The simplifications should never change the order of evaluation of
+/// arbitrary operations.
+template <class Pattern>
+std::vector<SimplificationRule<Pattern>> simplificationRuleList(
+ Pattern A,
+ Pattern B,
+ Pattern C,
+ Pattern X,
+ Pattern Y
+)
+{
+ std::vector<SimplificationRule<Pattern>> rules;
+ rules += simplificationRuleListPart1(A, B, C, X, Y);
+ rules += simplificationRuleListPart2(A, B, C, X, Y);
+ return rules;
+}
+
}
}
w44/cgit/cgit.cgi/freebsd-ports-gnome/commit/multimedia?id=a3ff316d8a412f651b3f735036e0302b77506a23'>Add a patch that allows xmms to play the next song in the playlist.cpiazza1999-11-111-0/+14 * Update to version 0.9.5.1.jim1999-11-064-18/+18 * Update to FXTV 1.02.roger1999-11-052-4/+4 * Upgrade to version 1.01, which has Hauppauge Infra Red Remote Control Supportroger1999-10-274-48/+4 * Bump glib12 's share library version to 3,vanilla1999-10-101-3/+1 * Use updated esound library.nakai1999-10-081-1/+1 * Fix BUILD_DEPENDS line, netpbm installs under ${X11BASE}.asami1999-09-211-1/+1 * Import of gxanim 0.45, a Gtk front-end to xanim.mph1999-09-216-0/+57 * Add audio cd and mikmod support in Xmms.cpiazza1999-09-202-3/+7 * Update to KDE-1.1.2se1999-09-186-6/+54 * The version number of libgif.so has changed to 5.steve1999-09-182-2/+2 * Add patch submitted by Randall, the FXTV authorroger1999-09-101-0/+25 * Rewrite virtual function pointer code so it can compile with EGCS on myroger1999-09-091-26/+92 * Expand the patch to work on drivers without the XUSSR channel set too.roger1999-09-091-4/+8 * Patch to allow FXTV to compile on older Bt848 drivers without the Australianroger1999-09-091-0/+15 * Update to include the URL for newer Bt848 driversroger1999-09-071-0/+11 * The tiff port now lives in ports/graphics/tiff.steve1999-09-071-1/+1 * Update FXTV to version 1.00roger1999-09-076-39/+7 * Update FXTV to version 1.00roger1999-09-071-4/+9 * FreeBSD.ORG -> FreeBSD.orgmharo1999-08-315-6/+6 * echo -> ${ECHO} or ${ECHO_MSG} and in some cases, move echo stuffmharo1999-08-281-12/+12 * Change Id->FreeBSD.obrien1999-08-251-1/+1 * Change Id->FreeBSD.obrien1999-08-2513-13/+13 * Change Id->FreeBSD.obrien1999-08-254-4/+4 * awk -> ${AWK}mharo1999-08-232-5/+5 * Cleanup fetching comments: {DISTFILES} already contains .tar.gz. Also pointobrien1999-08-151-3/+3 * Use empty MASTER_SITES= to indicate that there's nothing for thefenner1999-08-091-2/+2 * Add #include <X11/Xproto.h>roger1999-07-291-0/+10 * Make port depend on linux_base instead of linux_lib.marcel1999-07-212-4/+4 * No need for '-p', since ${MKDIR} == 'mkdir -p'.steve1999-07-051-2/+2 * Xmms: the X Multimedia System. XMMS is a multimedia player based oncpiazza1999-07-046-0/+73 * Commit #3/4 to enforce caps, no period.hoek1999-06-271-1/+1 * Commit #2/4 to enforce Caps, no period. I ran this oe ashoek1999-06-278-8/+8 * As threatened, enforce the "Capital, no period" rule. Ellipses arehoek1999-06-273-3/+3 * Turn off sound support except on the i386 port.steve1999-06-231-5/+7 * This port doesn't build when the system compiler is egcs.steve1999-06-231-2/+7 * We don't have sound support on the Alpha yet.steve1999-06-231-1/+3 * Update my email address, I've been slack.kris1999-06-071-2/+2 * Fix path for shareds objects.tg1999-06-071-1/+1 * Use FreeBSD-ELF shared objects for the new supported codecs.tg1999-05-314-34/+49 * Forget about ${PREFIX}/include/giflib.tg1999-05-272-6/+4 * Fix typo in function XUTILGetVisualBpp(), it causes fxtv to fail onroger1999-05-101-0/+11 * More WWW: additionsmharo1999-05-073-4/+4 * Upgrade KDE to Release 1.1.1.se1999-05-046-14/+36 * Wisten, to the SWwound, of a Whole new WOOhoek1999-05-031-3/+5 * Add homepage. Incidentally, this DESCR is a little long.hoek1999-04-271-0/+2 * Port now uses a .tar.bz2 distfilekris1999-04-032-2/+2 * Update to 2.80.1flathill1999-03-313-49/+53 * Fix MASTER_SITE_SUBDIR and add USE_BZIP2.se1999-03-252-4/+6 * Updated with new FXTV Homepage locationroger1999-03-161-6/+6 * Updated Randall's email address, the FXTV homepage and the Master Siteroger1999-03-161-4/+4 * Use INSTALL_DATA for installing libraries.kris1999-03-111-2/+2 * patch changes -ltiff34 to -ltiff in the fxtv makefileroger1999-02-121-0/+11 * Linux RealPlayer 5.0 from RealNetworks.kuriyama1999-02-125-0/+151 * Updated authors email addressroger1999-02-121-5/+5 * Updated URL to authors home pageroger1999-02-121-1/+1 * Remove extra argument to "configure" that had been committed by accident.se1999-02-092-6/+2 * Upgrade to KDE 1.1 RELEASE.se1999-02-096-10/+42 * Upgrade to KDE-1.1pre2 ...se1999-02-076-20/+36 * Upgrade to 0.48. Bug fixes, support for more cards in brooktree driver.markm1999-02-066-57/+5 * Adjust port Makefiles to new EXTRACT_* variable defaults. See log ofasami1999-02-032-12/+4 * Add bzip2 dependency. They were missing in some kde*11 Makefiles.asami1999-01-112-2/+4 * Allow vat & vic to run with tcl8.0.4.fenner1999-01-101-2/+10 * Make dependency lines point to right directories -- they were stillasami1999-01-082-4/+4 * Add 'ONLY_FOR_ARCHS=i386' to linux_lib dependent ports.simokawa1999-01-071-1/+2 * Upgrade to the first pre-release of KDE 1.1.se1999-01-076-50/+106 * Mark these broken while Stefan works on an upgrade.asami1999-01-062-2/+6 * use system CFLAGSache1999-01-051-4/+4 * remove -m486 option for alpha.simokawa1999-01-051-2/+1 * Change categories to "audio kde". It was (believe me or not) "x11".asami1998-12-012-4/+4 * Change libtiff shared lib to version 4.0 -- we've shipped 3.3 before, so 1.0asami1998-11-251-2/+2 * libtiff34->libtiff and include/tiff34/*.h -> include/*.hjseger1998-11-252-3/+3 * Remove extraneous x11 from CATEGORIES.steve1998-11-213-6/+6 * was using naked '-lXm' rather than `${MOTIFLIB}'.obrien1998-11-151-0/+11 * update to patched version that fix bug for 24-bit displaysobrien1998-11-152-3/+3 * Use bsd.port.{pre,post}.mk. Either use them to avoid having to defineasami1998-11-111-13/+13 * Unbreak.jseger1998-10-132-9/+16 * Unbreak for current.jseger1998-10-132-12/+2 * Unbreak for ELF.jseger1998-10-132-5/+4 * Mark BROKEN for ELF:jseger1998-10-131-1/+3 * Mark BROKEN for ELF:jseger1998-10-121-1/+3 * Mark BROKEN for ELF:jseger1998-10-121-1/+3 * Mark BROKEN for current. Can't find scsi.hjseger1998-10-112-2/+12 * Make sure to remove everything we install.steve1998-10-054-2/+5 * Move manpages to Makefile and use MAN* macros.steve1998-10-052-2/+2 * Elfifybrian1998-10-022-18/+14 * Mark all KDE ports BROKEN for ELF.jseger1998-09-302-2/+6 * Provide replacements for the NetBSD (a.out) .o modules from the Linux (ELF)markm1998-09-272-5/+15 * tk80 has been ELFized.asami1998-09-251-2/+2 * giflib is now converted to ELF so remove regexp support.steve1998-09-192-4/+4 * Roll back libXpm major to 4. Sorry, it wasn't a good idea to bump itasami1998-09-171-2/+2 * jpeg is now converted to ELF so change LIB_DEPENDS lines accordingly.asami1998-09-152-4/+4 * libXpm major is now 5. Also remove regexp support in preparation forasami1998-09-151-2/+2 * Convert to ELF.markm1998-09-152-20/+21 * Convet to ELF.markm1998-09-152-4/+17 * - Use a do-install: target instead of patching one into the sourcehoek1998-08-242-2/+23 * Well, we know there isn't a comprehensive instruction manual, buthoek1998-08-241-15/+16 * Use the MANx variables. This commit only covers ports thathoek1998-08-238-8/+16 * This commit brought to you by the Paddock Bowling Alley.hoek1998-08-191-1/+0 * Wow. Checkout the number of manpages that are in EZWGL. I think that'shoek1998-08-192-3/+0 * Replace qt dependencies with USE_QT.asami1998-08-122-8/+6 * Fix up dependencies for ports that moved into the x11-toolkits category.asami1998-08-084-10/+10 * Rename all USE_X11 to USE_X_PREFIX. Requires 1.279 (3.0-current) orasami1998-08-056-13/+13 * Change dependencies to accept Qt-1.33 if present,se1998-07-242-6/+6 * Upgrade to KDE Release 1.0se1998-07-206-90/+306 * Fix the configure script to not try to build a grabber which is notfenner1998-07-121-0/+10 * Change to UNBROKEN ...scrappy1998-07-092-6/+4 * Still marked BROKEN, but this gets me to the extract stage, and, removingscrappy1998-07-092-4/+12 * Still marked BROKEN, but at least you can retrieve the files now...will workscrappy1998-07-084-14/+16 * Allow environment variables to be passed to make's children (-e flag).dburr1998-07-061-1/+2 * Remove NO_CONFIGURE and NO_PATCH, they never meant anything.asami1998-06-271-2/+1 * Fix Luigi's recently committed submission:fenner1998-06-274-1671/+100 * These patches implement the following features in vic:jkh1998-06-242-0/+2041 * Import new port graphics/netshow, the Microsoft NetShow player.dburr1998-06-126-0/+60 * Upgrade fxtv to 0.47.dburr1998-06-076-42/+41 * Upgrade to 2.4.tg1998-05-252-4/+4 * Change JPEG shared library number to 9. This is to make sure that everyonejseger1998-05-052-4/+4 * Mark this port broken, it's left behind in the beta-4.1 upgrade andasami1998-04-292-2/+6 * Upgrade to 2.70.7.0.tg1998-04-283-88/+70 * Switch remaining ports to use jpeg lib version 8.0.jseger1998-04-162-4/+4 * Make fxtv work with CURRENT and STABLE. This is not the optimum solution,markm1998-03-241-0/+23 * Back out changes to use tcl81.tg1998-03-172-93/+93 * Add back PKGNAME (removed by the previous commit).asami1998-03-172-2/+4 * Use $(MASTER_SITE_KDE)se1998-03-072-8/+6 * Update to KDE Beta3se1998-03-058-70/+194 * Upgrade to use tcl8.1 and tk8.1.jseger1998-02-252-93/+93 * Add send() kernel bug workaround to vic too.fenner1998-02-201-0/+117 * Fix memory leaks.fenner1998-02-201-0/+96 * Take out "misc" for list of categories...it's for stuff that don'tasami1998-02-181-2/+2 * Initial import of ppm2fli.steve1998-02-186-0/+68 * Upgrade to spigot-1.7fenner1998-01-284-5/+21 * Be more selective about which ports to maintain. I no longer have timeasami1997-12-261-2/+2 * Add PKGNAME ("-Beta2-1" is not a valid version number). Change "Beta1"asami1997-12-262-8/+10 * The KDE multi-media tools: CD player, mixer, MIDI player.se1997-12-2410-0/+216 * Add BT848 grabber support.fenner1997-12-191-0/+725 * Update to 0.46. The changelog speaks:markm1997-12-195-14/+18 * Use new location for tiff34 headers.tg1997-12-012-3/+22 * Update to version 0.45.markm1997-10-122-3/+3 * Import of fxtv 0.44. Fxtv is a program that allows you to watch TV on yourmarkm1997-09-285-0/+52 * Make port work with tcl/tk 8.0fenner1997-09-11