Commit Graph

130 Commits

Author SHA1 Message Date
dslomov@chromium.org
7088aea3eb Revert "This implements per-isolate locking and unlocking, including tests"
This reverts commit 76c78febb70e75b18214f5fe45de95c7fb515386.

This change has broken test-thread-termination/TerminateMultipleV8Threads

TBR=vitalyr

Review URL: http://codereview.chromium.org/6903154

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 22:16:45 +00:00
dslomov@chromium.org
f4c120d615 This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

Review URL: http://codereview.chromium.org/6788023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 21:26:03 +00:00
ager@chromium.org
95c76ed464 Remove some dead code.
- virtual-frame*
- register-allocator*
- jump-target*
- most of codegen*
- AstOptimizer and fields on AST

There is a lot of additional cleanup that we should do but this gets
rid of a lot.

R=kmillikin@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6811012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 14:42:37 +00:00
mikhail.naganov@gmail.com
c9904976f9 Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...)
While trying to fix Mac and Windows versions for this change:
http://codereview.chromium.org/6771047/, I figured out, that we
already store an isolate in StackFrameIterator, so we can use it in
frame objects, instead of requiring it from caller.

I've changed iterators usage to the following scheme: whenever a
caller maintains an isolate pointer, it just passes it to stack
iterator, and no more worries about passing it to frame content
accessors.  If a caller uses current isolate, it can omit passing it
to iterator, in this case, an iterator will use the current isolate,
too.

There was a special case with LiveEdit, which creates
detached copies of frame objects.

R=vitalyr@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6794019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-05 09:01:47 +00:00
ager@chromium.org
92996f027f Cleanup of Isolate::Current() and FACTORY macro usage in execution.cc.
BUG=none
TEST=none

Patch from Peter Varga <pvarga@inf.u-szeged.hu>.

Review URL: http://codereview.chromium.org/6759029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 08:01:33 +00:00
vitalyr@chromium.org
7976ca2cbc Merge isolates to bleeding_edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832 Revert r7268: it borked the history.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3 Merge isolates to bleeding_edge.
Review URL: http://codereview.chromium.org/6685088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
antonm@chromium.org
749c5ea72e Make OutOfMemory exception thrown from JS call into FatalProcessOutOfMemory as well.
That unifies the behaviour with CALL_HEAP_FUNCTION macro.

BUG=v8:1165

Review URL: http://codereview.chromium.org/6528050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 17:21:59 +00:00
antonm@chromium.org
e96c24bf03 Properly treat exceptions thrown while compiling.
BUG=v8:1132
TEST=test/mjsunit/regress/regress-1132.js

Review URL: http://codereview.chromium.org/6487021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 14:26:56 +00:00
ager@chromium.org
06a684d353 Fix deoptimization from %_MathPow. Do not prepare the stack for a C
call and then bailout without performing the call.

In order to not duplicate code, convert both heap number and smi to a
double in an xmm register if possible. Then setup the stack and call
the C function.

BUG=http://code.google.com/p/v8/issues/detail?id=986

Review URL: http://codereview.chromium.org/5900001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 15:25:53 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
ager@chromium.org
a24d627598 Extract extensions to a separate directory.
Remove extensions from the external reference table. They should never
be part of the serialized code.

Create extensions/experimental subdirectory for experimental
extensions not officially supported by V8.

Review URL: http://codereview.chromium.org/5094003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-17 12:28:30 +00:00
erik.corry@gmail.com
a448c13cdb Add gc() calls to some tests to please valgrind.
Review URL: http://codereview.chromium.org/4116005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-28 08:43:47 +00:00
erik.corry@gmail.com
0dcaac1939 Make Failure inherit from MaybeObject instead of Object.
Review URL: http://codereview.chromium.org/3970005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-25 15:22:03 +00:00
vitalyr@chromium.org
91b9a92336 Addressing Mads' comments from http://codereview.chromium.org/3585010/show.
Review URL: http://codereview.chromium.org/3613009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-05 11:51:41 +00:00
ager@chromium.org
ca9023c0b2 Fix mismatched new[]/delete for external string resources only used
for testing.

Review URL: http://codereview.chromium.org/3165051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-23 06:30:00 +00:00
vitalyr@chromium.org
3cafa65462 Track ascii-ness of data in externalized strings.
If a two-byte string only contains ascii characters, then we can save
memory when flattening a cons string containing it. Similarly we can
use this in Array.prototype.join implementation. To track this a new
bit is added to instance type. This bit is used as a hint in generated
code and in runtime functions.

To enable testing a new V8 extension is added controlled by
--expose-externalize-string flag.

Review URL: http://codereview.chromium.org/2762008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 16:19:28 +00:00
ager@chromium.org
07db17ce1b Remove some remaining references to boilerplate functions.
Review URL: http://codereview.chromium.org/1605037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 12:39:07 +00:00
kasperl@chromium.org
b266a9ecdd Avoid messing with the stack overflow limits while interrupts
are postponed. This way, V8 will wait until interrupts are
re-enabled before artifically lowering the stack limit thereby 
forcing the interruption of the JavaScript executing thread.
Review URL: http://codereview.chromium.org/1638009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 07:36:49 +00:00
antonm@chromium.org
ea1b4f0eb1 Introduce builtin for Array.slice function.
Review URL: http://codereview.chromium.org/604059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 12:14:23 +00:00
peter.rybin@gmail.com
ec86bea132 Implement issue 554 Add "ProcessDebuggerRequests" call to Debug Agent API
Review URL: http://codereview.chromium.org/549057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 21:14:56 +00:00
kasperl@chromium.org
9c627d6ba3 The number of heap slots stored in a scope includes the
fixed contexts slots. Take this into account when using
the new, fast context creation path to avoid allocating
too many slots (wasteful).
Review URL: http://codereview.chromium.org/501148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 10:24:11 +00:00
yurys@chromium.org
e88df5b792 Ignore debug break events when bootstrapper is active. Collecting debug data when the context is not yet setup may lead to subtle errors like in the following Chromium bug: http://crbug.com/28933
Review URL: http://codereview.chromium.org/497006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-15 09:17:15 +00:00
sgjesse@chromium.org
41d6cae46d Fix issue 493: Infinite loop when debug break is set when entering function.apply.
In the generated code for function.apply there was a loop checking the stack limit for interruption. This loop would call into the runtime system to handle interuption and keep running until there was no interruption. However if the interuption was debug break the runtime system would never clear the interruption as debug break is prevented in builtins are prevented and the assumption here was that returning with the debug break flag set would move execution forward.

Renamed initial_jslimit and initial_climit to real_jslimit and real_climit. Renamed a few external references related to the stack limit as well.

Exposed the real stack limit to generated code to make the stack check when entering function.apply use the real stack limit and not the stack limit which is changed to signal interruption.

Added the real stack limit to the roots array.

BUG=http://code.google.com/p/v8/issues/detail?id=493
TEST=cctest/test-debug/DebugBreakFunctionApply
Review URL: http://codereview.chromium.org/345048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:59:40 +00:00
ager@chromium.org
b5a19c1036 Rework the way we handle the fact that the ARM simulator uses a
separate JS stack.

In exception handling, we need to be able to compare addresses into
the JavaScript portion of the stack with the address of a C++ handler
on the stack.  Since the stacks are separate on the simulator, we need
a JavaScript stack address corresponding to a C++ try catch handler in
order to perform valid address comparisons.

On the simulator, we now link the C++ try catch handlers indirectly
through the JS stack and use the JS stack indirection address for
comparisons.

      JS                    C++
                           
                           handler
 [C++ address]   <------    next_
                \
                 \
                  \---->   handler
 [C++ address]   <------    next_


On actual hardware the C++ try catch handlers continue to be directly
linked.

BUG=http://code.google.com/p/v8/issues/detail?id=271
Review URL: http://codereview.chromium.org/360004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:27:21 +00:00
lrn@chromium.org
292323b355 X64: Fix bugs affecting Win64.
Increase stack space on Win64 sample and cctest executables.

Review URL: http://codereview.chromium.org/264047


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 10:56:13 +00:00
lrn@chromium.org
aed6a37c10 X64: Convert smis to holding 32 bits of payload.
Review URL: http://codereview.chromium.org/196139


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 12:36:12 +00:00
erik.corry@gmail.com
f2de3fd6d2 Fix the stack limits setting API so it is usable.
Review URL: http://codereview.chromium.org/242074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 10:33:05 +00:00
erik.corry@gmail.com
ae882b44e7 * Fix memory leaks caused by thread local data being lost.
* Rename some instance variables and accessors to fit code style.
* Don't overwrite existing thread ID.
Review URL: http://codereview.chromium.org/251014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 12:25:21 +00:00
ager@chromium.org
d8af3528dd Fix the handling of termination exceptions thrown when creating error
objects in the runtime system.
Review URL: http://codereview.chromium.org/179062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 13:55:45 +00:00
erik.corry@gmail.com
a29d4e6762 * Make stack/preemption guard faster on ARM by putting stack
limit in the roots array.
Review URL: http://codereview.chromium.org/174517

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:27:32 +00:00
mike@belshe.com
6f3c50460a Update the Idle collector to do a full GC
after being idle for some time.

Remove the default argument from CollectAllGarbage.

Review URL: http://codereview.chromium.org/174302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 02:54:39 +00:00
ager@chromium.org
0efbd40baf Add support for forceful termination of JavaScript execution.
The termination is achieved by throwing an exception that is uncatchable by JavaScript exception handlers.
Review URL: http://codereview.chromium.org/174056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 15:14:11 +00:00
christian.plesner.hansen@gmail.com
04a6340227 RegExp tweaks
Fixed bug where regexps were not callable across contexts since the
callable test used object identity on the regexp constructor.  Changed
typeof RegExp from 'object' to 'function' for compatibility.

Review URL: http://codereview.chromium.org/171039


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 10:19:00 +00:00
kasperl@chromium.org
bcbef79a11 Convert global objects to global receivers before invoking
JavaScript functions on them.
Review URL: http://codereview.chromium.org/165122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 07:15:16 +00:00
yurys@chromium.org
cd16b5be95 Use JSFunction::IsBuiltin() for checking if a function is a builtin one
Review URL: http://codereview.chromium.org/160323

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 11:55:26 +00:00
yurys@chromium.org
161d38c614 Debugger should not stop in its own code and in code of built-in functions since it may confuse user.Debug break handler checks whether current function is a built-in or a debugger one and just resumes execution if it is.
CallCheckStackGuardState is no longer called in loop in the RegExp code as it hangs if debug break flag is not reset after calling Execution::HandleStackGuardInterrupt.
Review URL: http://codereview.chromium.org/160001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-24 06:14:23 +00:00
ager@chromium.org
7a80be473d Firefox and Safari both allow calling regular expression objects as
functions (as an alias for calling the exec method).  For
compatibility make call_regexp the default and remove the flag.

Review URL: http://codereview.chromium.org/155453

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 23:41:17 +00:00
iposva@chromium.org
f9dc709c72 - Add a "#error Unsupported target architecture." where needed. A chain of
platform dependent ifdefs is useless if it does not include an error like
  this. You will end up searching for the failure in all the wrong places.
Review URL: http://codereview.chromium.org/150026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 17:07:30 +00:00
sgjesse@chromium.org
e1787e78d6 Removed unused variable to fix Linux build.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/115917

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 08:50:05 +00:00
sgjesse@chromium.org
a019501be2 Change the handling of the debug break stack guard. The debug break is no longer ignored when hit inside "system" JavaScript. The reason for this is twofold:
* Running "system" JavaScript with the debug break flag active leads to slow running code while waiting for the break in non "system" JavaScript (one exception to this it is to try to avoid breaks in the clear mirror cache JavaScript code called when leaving the debugger).

* If this happens while processing RegExp running in native code an infinite loop is created as the stack guard handler for RegExp does not move execution forward

Fixed a GC bug in the interrupt handling for RegExp running in native code.

Added test of debug break while in debug message handler callback and debug break while executing a RegExp.
Review URL: http://codereview.chromium.org/115262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 08:42:02 +00:00
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

Review URL: http://codereview.chromium.org/115756


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
sgjesse@chromium.org
3e76ba9a78 Propagate information on whether a non function was called as constructor or not.The Arguments object passed to the callback now has IsConstructCall set accordingly.BUG=http://crbug.com/3285
Review URL: http://codereview.chromium.org/113634

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 19:33:44 +00:00
deanm@chromium.org
2b56660a8b Introduce two separate classes of processor detection:
- TARGET, the architecture we will generate code for.
  This is brought it from the build system.
- HOST, the architecture our C++ compiler is building for.
  This is detected automatically based on compiler defines.

This adds macros for 32 or 64 bit, and cleans up some
include conditionals, etc.

Review URL: http://codereview.chromium.org/99355


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 12:06:20 +00:00
lrn@chromium.org
ea56336518 Create build structure for X64.
Possible to attempt to build for X64.
Build will be unsuccessful, since all x64 source files are
missing and pointers are reinterpreted as integers everywhere.

Review URL: http://codereview.chromium.org/99186


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 13:11:48 +00:00
lrn@chromium.org
a4d756a1c8 Move backend specific files to separate directories.
Move ia32 and arm specific files to subdirectories to make it easier to add more backends.

Review URL: http://codereview.chromium.org/92068


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 12:06:38 +00:00
sgjesse@chromium.org
60f13875f1 Use CollectAllGarbage for the gc() extension.
Review URL: http://codereview.chromium.org/5666

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:00:12 +00:00
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

Review URL: http://codereview.chromium.org/77035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36:13 +00:00
erik.corry@gmail.com
aa81281b3d Reapply portability fixes, this time without 64 bit system bug.
Review URL: http://codereview.chromium.org/52010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 12:37:53 +00:00
erik.corry@gmail.com
80ce1b2500 Reverse latest build tweaks since they fail on some 64 bit systems
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 17:01:15 +00:00
erik.corry@gmail.com
77b963ca04 More compatibility changes.
Review URL: http://codereview.chromium.org/47004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 16:37:18 +00:00
sgjesse@chromium.org
17b498c957 A new stack guard break flag DEBUGCOMMAND has been introduced. This is used to signal debug break due to debugger commands available in the queue for processing. If a stack guard break happens with this flag and not the DEBUGBREAK flag the no debug break event is generated and execution is resumed automatically when all debugger commands in the queue has been processed.
This makes it possible to remote debuggers to just add commands to the queue without having to request a break as well. As soon as any JavaScript executes the debugger commands will be processed and the response send to the remote debugger.

Currently hide this behind a flag (--debugger-auto-break) as the current command line debugger in Chrome is not designed for this new behaviour, whereas the new Chrome developer tools will use it.
Review URL: http://codereview.chromium.org/42173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:26:21 +00:00
sgjesse@chromium.org
22d6605f2f All preemption requests are now ignored while in the debugger. This ensures that no change of V8 thread happenes while in the debugger. The only thing that happens is that a flag is set to indicate that preemption happened. When the debugger is left preemption is requested if it occourred while in the debugger.
Moved the debugger related global variables from Top to thread local in Debug.
Review URL: http://codereview.chromium.org/39124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 11:03:14 +00:00
iposva@chromium.org
0d11b5885a Fix white space issues.
Review URL: http://codereview.chromium.org/18806

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:23:01 +00:00
iposva@chromium.org
ff3433d0fd - Preserve bootstrapper state across thread switches (fixes issue 143).
- Make sure stack guards are properly setup even when preemption is active.
- Fix missing v8::Locker and v8::Unlocker use in d8.cc.
- Threads forked in d8 do get their own context setup.

Review URL: http://codereview.chromium.org/18581

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:09:46 +00:00
olehougaard
e13aed2da3 Do not cache functions until we know they are fully constructed. This is needed in case of a stack overflow during construction.
Review URL: http://codereview.chromium.org/17354

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 07:13:33 +00:00
lrn@chromium.org
3b968e0207 Preemption code for irregexp-native-ia32. Regexps can not only succeede or
fail, but also report a thrown exception.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 10:49:00 +00:00
olehougaard
30204a0c00 Added reporting compilation errors.
Review URL: http://codereview.chromium.org/13125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 08:35:52 +00:00
ager@chromium.org
15e98d12e6 Pull out revision 915 and 916 to get a green builder. I believe the
issue has been resolved and these changes can go back in along with
the fix tomorrow.

TBR=olehougaard
Review URL: http://codereview.chromium.org/12945

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 14:35:31 +00:00
olehougaard
cb6a3e2f0a Reporting uncaught errors at the boundary between C++ and JS instead of trying to guess whether they get caught at the time of the throw.
Review URL: http://codereview.chromium.org/12901

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 08:47:31 +00:00
lrn@chromium.org
d7e5f97b1e Made ARM/IA32 handling in Regexp symmetric (although without an ARM implementation yet).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 13:54:08 +00:00
ager@chromium.org
439f3e6708 Do not put failures in handles.
Assert in the Handle constructor that the object is not a failure.

I have run our own tests in debug mode and the WebKit layout tests in
debug mode and there are no regressions.
Review URL: http://codereview.chromium.org/9114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 16:23:56 +00:00
ager@chromium.org
8813d15d18 Revert revision 593. This was a cleanup change but it caused layout
test regressions.

Review URL: http://codereview.chromium.org/8827

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 07:30:10 +00:00
sgjesse@chromium.org
c204f48529 Revorked version of http://codereview.chromium.org/8101. The only change is
that the exception stored in the TryCatch is not cleared as that was the
cause of the regression.

So the actual difference to http://codereview.chromium.org/8101 is:
Index: src/top.h
===================================================================
--- src/top.h   (revision 576)
+++ src/top.h   (working copy)
@@ -154,10 +154,6 @@
     if (has_pending_exception()) {
       thread_local_.external_caught_exception_ =
           thread_local_.pending_external_caught_exception_;
-    } else {
-      if (thread_local_.try_catch_handler_ != NULL) {
-        thread_local_.try_catch_handler_->Reset();
-      }
     }
     thread_local_.pending_external_caught_exception_ = false;
   }
@@ -312,14 +308,14 @@
 };



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 20:50:26 +00:00
sgjesse@chromium.org
27154148cf Reverted r576 as it caused a regression.
TBR=kasperl
Review URL: http://codereview.chromium.org/7970

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 06:40:43 +00:00
sgjesse@chromium.org
39a5ffbd85 Cleanup of http://codereview.chromium.org/8101.
Changed the catcher_ field to a boolean value and renamed it. Modified the
propagation of the external caught exception to also clear the current
TryCatch if there is no exception as it might hold an exception which has
been bypassed by code in a finally block.

Minor formatting changes to a test.
Review URL: http://codereview.chromium.org/8102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 06:22:47 +00:00
sgjesse@chromium.org
f7367a9fe6 Posponed the setting of "external_caught_exception" to when leaving JavaScript
execution. This is achieved by storing a pointer to the C++ TryCatch when the
exception is thrown and checking that this is the handler active when leaving
JavaScript.
Review URL: http://codereview.chromium.org/8101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 12:54:13 +00:00
sgjesse@chromium.org
6a5e5bc50a Removed the print, load, quit and version extensions from the VM. Moved the print extension to the compiler test as it was used there. Changed the serializer tests to only use the gc extension.
This also gets rid of 8 static initializers.
Review URL: http://codereview.chromium.org/6233

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-03 08:30:22 +00:00
deanm@chromium.org
77196c5771 This is a new static flag system, designed to have all flags in a central place, and compiled into the binary without requiring static constructors for registration. All flags are moved out of the specific modules and into flags.defs, with different sections for debug, release, etc. The flag variables are always defined. For example, a debug flag in release mode still exists, but is read only and set to the default value.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-12 10:19:33 +00:00
christian.plesner.hansen@gmail.com
32cf7fd9a1 Replaced calls to functions that msvc consider deprecated. Used
Vector<...> in more places to be sure that buffers have a length
associated with them.

Review URL: http://codereview.chromium.org/1940

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 14:34:48 +00:00
christian.plesner.hansen@gmail.com
4d95ac7339 Added option for TryCatches to not capture the message object on
exceptions.

It turned out that the stack overflow fix from before had disabled
message storing in another test.  Previously, stack overflows would
actually cause a message object to start being created but cause
another exception which would not be reported and that's what stopped
the infinite regress.  This change resores that behavior.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-10 14:54:15 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
erik.corry@gmail.com
388c1094b7 * Split up code_space into old_data_space and code_space.
* Make old_data_space non-executable on OSs and hardware that support it.
* Rename old_space to old_pointer_space (can contain pointers, esp. to new space).
* Ensure that individual pages allocated for old_space are only executable when
they are for code objects.
* Ensure Space::Setup can cope with non-aligned memory.
* Make some methods on Spaces virtual.  Make a way to iterate over all spaces.
* Replace executability flag with Executability enum in order to make intent at
call site clearer.
* Fix serialization/deserialization to allocate write barrier memory for large
arrays.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-05 12:34:09 +00:00
kodandersson@gmail.com
e54463c83b Test that I can submit to new repository and fix lots of typos in comments.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@65 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-01 09:16:49 +00:00
kasper.lund
7276f14ca7 Changed all text files to have native svn:eol-style.
Added a few samples and support for building them. The samples include a simple shell that can be used to benchmark and test V8.

Changed V8::GetVersion to return the version as a string.

Added source for lazily loaded scripts to snapshots and made serialization non-destructive.

Improved ARM support by fixing the write barrier code to use aligned loads and stores and by removing premature locals optimization that relied on broken support for callee-saved registers (removed).

Refactored the code for marking live objects during garbage collection and the code for allocating objects in paged spaces. Introduced an abstraction for the map word of a heap-allocated object and changed the memory allocator to allocate executable memory only for spaces that may contain code objects.

Moved StringBuilder to utils.h and ScopedLock to platform.h, where they can be used by debugging and logging modules. Added thread-safe message queues for dealing with debugger events.

Fixed the source code reported by toString for certain builtin empty functions and made sure that the prototype property of a function is enumerable.

Improved performance of converting values to condition flags in generated code.

Merged disassembler-{arch} files.


git-svn-id: http://v8.googlecode.com/svn/trunk@8 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-30 08:49:36 +00:00
kasper.lund
44510671e9 Fixed bug in JSObject::GetPropertyAttributePostInterceptor where map transitions would count as properties.
Allowed aliased eval invocations by treating them as evals in the global context. This may change in the future.

Added support for accessing the last entered context through the API and renamed Context::Current to Context::GetCurrent and Context::GetSecurityContext to Context::GetCurrentSecurityContext.

Fixed bug in the debugger that would cause the debugger scripts to be recursively loaded and changed all disabling of interrupts to be block-structured.

Made snapshot data read-only to allow it to be more easily shared across multiple users of V8 when linked as a shared library.


git-svn-id: http://v8.googlecode.com/svn/trunk@6 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-25 07:37:58 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00