Commit Graph

88 Commits

Author SHA1 Message Date
Luke Wagner
a1a73dd94d Bug 551276 - a more type-safe way to zero memory (r=Waldo)
--HG--
extra : rebase_source : fc5564c34cde6490a1d3b48a16a451f7e50c052a
2010-03-10 15:34:12 -08:00
Mike Moening
0373a2437d bug 549010 - fixing and silencing MSVC warnings. r=brendan,igor 2010-03-04 20:44:09 -08:00
Luke Wagner
4f05b945eb Bug 458421 - dead stuff in spidermonkey (r=jorendorff) 2010-01-22 11:52:17 -08:00
Robert Sayre
b18f03ada4 Merge m-c to tm. 2009-12-17 04:26:12 -05:00
Andrew Paprocki
4d092aea98 bug 486779 - silencing SunPro CC compiler complains about js_MapKeywords. r=brendan 2009-12-14 10:08:55 +03:00
Dan Witte
89be48b3cc Bug 518621 - JS_ReportErrorNumber ignores exception type for user-generated messages. r=mrbkap 2009-12-15 14:20:48 -08:00
Jim Blandy
65ebe01f93 Bug 514559: Forbid octal literals or escape sequences in strict mode. r=mrbkap 2009-11-19 09:49:00 -08:00
Jim Blandy
76386acacd Bug 514585: Machinery for reporting ES5 strict mode errors. r=igor
2009-11-19: checkReportFlags adjusted to use js_GetTopStackFrame, to
satisfy static analysis checks. No effect on Sunspider.

At compile-time, we must consult the current JSTreeContext to decide
whether to issue an strict mode error; at run-time, we need to
check the strictness of the currently executing script.  Both cases
also check the context options.  The design is supposed to make it
easy to follow the principle that conditions treated as errors in
strict mode are a subset of those warned about by JSOPTION_STRICT.

This patch removes report flag handling from js_ExpandErrorArguments,
which is used for both compile-time and run-time errors.  At run-time,
the new checkReportFlags handles the checks.  At compile-time, we need
different checks depending on the situation, so the checks are done in
js_ReportStrictModeError, js_ReportCompileErrorNumber, and the new
ReportCompileErrorNumberVA.
2009-11-19 09:23:20 -08:00
Jim Blandy
534bfe84e0 Back out ad37dab7ea17: code to check the current frame's script's strictness flag fails the static checks. Using js_GetTopStackFrame introduces a perf regression. 2009-11-18 14:36:55 -08:00
Jim Blandy
bd0b14cc7e Bug 514585: Machinery for reporting ES5 strict mode errors. r=igor
At compile-time, we must consult the current JSTreeContext to decide
whether to issue an strict mode error; at run-time, we need to
check the strictness of the currently executing script.  Both cases
also check the context options.  The design is supposed to make it
easy to follow the principle that conditions treated as errors in
strict mode are a subset of those warned about by JSOPTION_STRICT.

This patch removes report flag handling from js_ExpandErrorArguments,
which is used for both compile-time and run-time errors.  At run-time,
the new checkReportFlags handles the checks.  At compile-time, we need
different checks depending on the situation, so the checks are done in
js_ReportStrictModeError, js_ReportCompileErrorNumber, and the new
ReportCompileErrorNumberVA.
2009-11-18 13:33:53 -08:00
Brendan Eich
797e4c7194 Fix old ES3 lexing bug where 3in scanned as 3 and in (523401, r=jorendorff). 2009-10-22 10:07:56 -07:00
Brendan Eich
bcdf73ef67 Remove now-bogus (uint16) casts when storing AST node line numbers (patch revised based on ed@siliconforks.com's patch in 500128, r=me). 2009-10-03 10:33:01 -07:00
David Mandelin
99fb23d064 Bug 511695: Fix JS warnings in MSVC8, r=brendan 2009-09-23 11:16:30 -07:00
Jason Orendorff
e941aa6935 Bug 510895 comment #3 - Indentation nit, follow-up to changeset eb6e2f20bbde. 2009-08-25 14:11:21 -07:00
Jason Orendorff
8d17eb83a0 Bug 510895 - Select getc/getc_unlocked/_getc_nolock in autoconf. r=jimb.
--HG--
extra : rebase_source : 828e017e94ffd5f742d0ead3d48c42e7ad38eace
2009-08-25 12:33:03 -05:00
Luke Wagner
3cf8a59c01 Bug 503952 - Use JSTempVector in scanner/parser; remove JSStringBuffer (r=brendan) 2009-08-14 16:10:59 -07:00
Robert Sayre
6a084d7111 Bug 507526 - use getc_unlocked in the scanner rather than getc. r=jorendorff 2009-08-04 10:30:26 -07:00
Andreas Gal
e7f2714ea1 When finalizing, deallocate memory in a separate thread (505612, r=bent,brendan,waldo). 2009-07-27 21:10:12 -07:00
David Mandelin
cfb0d1fd1b Bug 506821: clean up trailing whitespace, r=brendan 2009-07-27 18:40:12 -07:00
Brendan Eich
4e705018ab Optimize stringify edge case. r=sayrer/jorendorff. 2009-07-10 15:13:54 -04:00
Jason Orendorff
52fe5a97ba Bug 497618 - Change JSString macros to methods. r=Waldo. 2009-06-10 20:29:44 -05:00
Brendan Eich
e9db6fcb64 Bug 375250 - Reject (JSON is fixed now) E4X masquerading as JS source (r=igor/mrbkap). 2009-04-29 16:46:43 -07:00
Brendan Eich
0aadb94a7b Bug 489089 - JSON.parse is way slower than it needs to be (r=igor/sayrer). 2009-04-21 12:09:27 -07:00
Jim Blandy
875aee5e88 Bug 479258: Include "jsstdint.h" for <stdint.h> type use within SpiderMonkey. r=brendan 2009-03-18 11:38:16 -07:00
Jim Blandy
ede7e6d142 Bug 391488: Eliminate PTRDIFF macro; delete jssttddef.h. r=jimb
Delete jsstddef.h, since its only remaining purpose is to make certain
Win16-specific definitions; we don't support Win16 any more.  In
particular, we can just subtract pointers now, so the PTRDIFF macro is
unnecessary noise.

Most places get stddef.h via jstypes.h or some other header, so we can
just delete #inclusions of jstddef.h.  The exception is jskwgen.h, so
there we explicitly include <stddef.h> instead.
2009-02-18 09:14:51 -08:00
Blake Kaplan
79c0a0ed2b Bug 476940 - Report an error when a script tries to use duplicate flags on a regexp. r=brendan 2009-02-06 14:28:48 -08:00
Blake Kaplan
69a2bec66d Bug 475834 - Multiline comments with newlines in them should not decompose to nothing. r=brendan 2009-01-29 12:22:26 -08:00
Robert Sayre
8e4a6beb13 Bug 462778. Fix JSON top crash. r=brendan 2008-11-07 18:10:39 -05:00
Igor Bukanov
35f70f6096 bug 458679 - r=crowder 2008-10-10 15:16:27 +02:00
Taras Glek
dbf23956a4 bug 432917: Replace "must flow through label" comments with statically-checkable macro. r=igor 2008-09-08 10:51:10 -07:00
Jim Blandy
90bf6a2d1e Bug 97954: Give jsconfig.h a better name, and make room for the new js-config.h. r=bsmedberg
We'd like the SpiderMonkey configure script to generate a header file
named js-config.h to hold #definitions chosen at configure time that
affect the SpiderMonkey API, like JS_THREADSAFE.  However, that name
is very similar to that of an existing header file, jsconfig.h.  This
patch renames the existing header file, and updates all references to
it.

--HG--
rename : js/src/jsconfig.h => js/src/jsversion.h
2008-09-05 10:19:17 -07:00
Brendan Eich
eaf4254c15 Merge from mozilla-central. 2008-08-08 18:58:04 -07:00
David Anderson
60181b7fd2 Fixed some MSVC whinings, implemented rdtsc on win32 2008-07-29 19:19:51 -05:00
Igor Bukanov
dcdf0df942 bug 445391 - re-enable OJI for Firefox 3.1, the configure changes is from jst, r=jst,crowder, sr=benjamin 2008-07-29 19:53:03 +02:00
Brian Crowder
6b267118d5 Bug 430740 - BOM characters are stripped from javascript before execution
r=igor
2008-07-17 16:58:06 -04:00
Benjamin Smedberg
3fcc924cd2 Return to building spidermonkey as C++, because we believe we found the cause of the perf regression elsewhere (non-code).
--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarena.c => js/src/jsarena.cpp
rename : js/src/jsarray.c => js/src/jsarray.cpp
rename : js/src/jsatom.c => js/src/jsatom.cpp
rename : js/src/jsbool.c => js/src/jsbool.cpp
rename : js/src/jscntxt.c => js/src/jscntxt.cpp
rename : js/src/jscpucfg.c => js/src/jscpucfg.cpp
rename : js/src/jsdate.c => js/src/jsdate.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsdhash.c => js/src/jsdhash.cpp
rename : js/src/jsdtoa.c => js/src/jsdtoa.cpp
rename : js/src/jsemit.c => js/src/jsemit.cpp
rename : js/src/jsexn.c => js/src/jsexn.cpp
rename : js/src/jsfile.c => js/src/jsfile.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jshash.c => js/src/jshash.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsinvoke.c => js/src/jsinvoke.cpp
rename : js/src/jsiter.c => js/src/jsiter.cpp
rename : js/src/jskwgen.c => js/src/jskwgen.cpp
rename : js/src/jslock.c => js/src/jslock.cpp
rename : js/src/jslog2.c => js/src/jslog2.cpp
rename : js/src/jslong.c => js/src/jslong.cpp
rename : js/src/jsmath.c => js/src/jsmath.cpp
rename : js/src/jsnum.c => js/src/jsnum.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsprf.c => js/src/jsprf.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsscan.c => js/src/jsscan.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsscript.c => js/src/jsscript.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/jsutil.c => js/src/jsutil.cpp
rename : js/src/jsxdrapi.c => js/src/jsxdrapi.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
rename : js/src/prmjtime.c => js/src/prmjtime.cpp
2008-05-27 16:58:12 -04:00
Benjamin Smedberg
71997df754 Back out revision bd9c9cbf9ec8 (build spidermonkey as C++) for perftesting and profit.
--HG--
rename : js/src/js.cpp => js/src/js.c
rename : js/src/jsapi.cpp => js/src/jsapi.c
rename : js/src/jsarena.cpp => js/src/jsarena.c
rename : js/src/jsarray.cpp => js/src/jsarray.c
rename : js/src/jsatom.cpp => js/src/jsatom.c
rename : js/src/jsbool.cpp => js/src/jsbool.c
rename : js/src/jscntxt.cpp => js/src/jscntxt.c
rename : js/src/jscpucfg.cpp => js/src/jscpucfg.c
rename : js/src/jsdate.cpp => js/src/jsdate.c
rename : js/src/jsdbgapi.cpp => js/src/jsdbgapi.c
rename : js/src/jsdhash.cpp => js/src/jsdhash.c
rename : js/src/jsdtoa.cpp => js/src/jsdtoa.c
rename : js/src/jsemit.cpp => js/src/jsemit.c
rename : js/src/jsexn.cpp => js/src/jsexn.c
rename : js/src/jsfile.cpp => js/src/jsfile.c
rename : js/src/jsfun.cpp => js/src/jsfun.c
rename : js/src/jsgc.cpp => js/src/jsgc.c
rename : js/src/jshash.cpp => js/src/jshash.c
rename : js/src/jsinterp.cpp => js/src/jsinterp.c
rename : js/src/jsiter.cpp => js/src/jsiter.c
rename : js/src/jskwgen.cpp => js/src/jskwgen.c
rename : js/src/jslock.cpp => js/src/jslock.c
rename : js/src/jslog2.cpp => js/src/jslog2.c
rename : js/src/jslong.cpp => js/src/jslong.c
rename : js/src/jsmath.cpp => js/src/jsmath.c
rename : js/src/jsnum.cpp => js/src/jsnum.c
rename : js/src/jsobj.cpp => js/src/jsobj.c
rename : js/src/jsopcode.cpp => js/src/jsopcode.c
rename : js/src/jsparse.cpp => js/src/jsparse.c
rename : js/src/jsprf.cpp => js/src/jsprf.c
rename : js/src/jsregexp.cpp => js/src/jsregexp.c
rename : js/src/jsscan.cpp => js/src/jsscan.c
rename : js/src/jsscope.cpp => js/src/jsscope.c
rename : js/src/jsscript.cpp => js/src/jsscript.c
rename : js/src/jsstr.cpp => js/src/jsstr.c
rename : js/src/jsutil.cpp => js/src/jsutil.c
rename : js/src/jsxdrapi.cpp => js/src/jsxdrapi.c
rename : js/src/jsxml.cpp => js/src/jsxml.c
rename : js/src/prmjtime.cpp => js/src/prmjtime.c
2008-05-27 12:19:17 -04:00
edward.lee@engineering.uiuc.edu
03eba17305 Bug 387935, Always build JS as C++, r=benjamin
--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarena.c => js/src/jsarena.cpp
rename : js/src/jsarray.c => js/src/jsarray.cpp
rename : js/src/jsatom.c => js/src/jsatom.cpp
rename : js/src/jsbool.c => js/src/jsbool.cpp
rename : js/src/jscntxt.c => js/src/jscntxt.cpp
rename : js/src/jscpucfg.c => js/src/jscpucfg.cpp
rename : js/src/jsdate.c => js/src/jsdate.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsdhash.c => js/src/jsdhash.cpp
rename : js/src/jsdtoa.c => js/src/jsdtoa.cpp
rename : js/src/jsemit.c => js/src/jsemit.cpp
rename : js/src/jsexn.c => js/src/jsexn.cpp
rename : js/src/jsfile.c => js/src/jsfile.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jshash.c => js/src/jshash.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsiter.c => js/src/jsiter.cpp
rename : js/src/jskwgen.c => js/src/jskwgen.cpp
rename : js/src/jslock.c => js/src/jslock.cpp
rename : js/src/jslog2.c => js/src/jslog2.cpp
rename : js/src/jslong.c => js/src/jslong.cpp
rename : js/src/jsmath.c => js/src/jsmath.cpp
rename : js/src/jsnum.c => js/src/jsnum.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsprf.c => js/src/jsprf.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsscan.c => js/src/jsscan.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsscript.c => js/src/jsscript.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/jsutil.c => js/src/jsutil.cpp
rename : js/src/jsxdrapi.c => js/src/jsxdrapi.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
rename : js/src/prmjtime.c => js/src/prmjtime.cpp
2007-07-16 11:40:49 -07:00