Commit Graph

196 Commits

Author SHA1 Message Date
dslomov@chromium.org
963ccfdaea Extension state made per-siolate in genesis
BUG=http://code.google.com/p/v8/issues/detail?id=1821

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 22:48:55 +00:00
ricow@chromium.org
0442e08095 Print out line number and extension name when compilation of an extension fails. This fixes issue 305.
Review URL: http://codereview.chromium.org/8332029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:43:19 +00:00
kmillikin@chromium.org
56c763f023 Make the GC aware of JSReceiver pointers in LookupResults.
The LookupResult utility class is used in handlified code, but it can
contain a raw pointer to the lookup's holder object.  Create a per-thread
stack of live LookupResults and iterate all the live ones on GC.

R=vegorov@chromium.org,erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:18:55 +00:00
fschneider@chromium.org
313f9505b4 Make accessors for oddball objects return Oddball* instead of Object*.
Fix a use of the hole value and the undefined value before initialization when
initializing V8. Before we just read a NULL value from them.
Review URL: http://codereview.chromium.org/8130002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 09:21:48 +00:00
erik.corry@gmail.com
bbcafaa2d5 Make sure we don't flush the pregenerated stubs, since they need
to be always present, so that we can call them from other stubs
without trying to generate stubs while we are generating stubs.
Review URL: http://codereview.chromium.org/8052029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 10:32:12 +00:00
erik.corry@gmail.com
2f1f203bff Fix pc to code cache so it can cope with a pointer to the start of the code
object.  Rename it to be the inner pointer to code cache.
Review URL: http://codereview.chromium.org/7969013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:08:39 +00:00
erik.corry@gmail.com
ff5e1c9822 Fix asserts and GC unsafeness in stub generation, bug=1689.
Review URL: http://codereview.chromium.org/7920006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-16 13:06:51 +00:00
kmillikin@chromium.org
78ce35effd Use more style-guide-friendly names for some constants.
This is a renaming only change.

R=erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 16:29:57 +00:00
lrn@chromium.org
689f3cb314 Rename scanner.* to scanner-character-streams.*. and scanner-base.* to scanner.*
R=lrn@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 13:06:44 +00:00
fschneider@chromium.org
b20f952e71 Remove unused code for AstSentinels and related stuff.
TEST=compiles
Review URL: http://codereview.chromium.org/7792097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 12:59:05 +00:00
jkummerow@chromium.org
c50094bda3 Fix another handful of memory leaks
TEST=valgrind reports 0 bytes definitely lost for cctest/test-api/RunTwoIsolatesOnSingleThread

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:33:40 +00:00
jkummerow@chromium.org
e4d43b7306 Fix three ~Isolate() related memory leaks
BUG=93253
TEST=running valgrind on cctest/test-api/RunTwoIsolatesOnSingleThread reports fewer leaks than before

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:14:12 +00:00
jkummerow@chromium.org
9f9959182d Fix memory leaks in ~Zone and ~Isolate
TEST=chromium valgrind bots

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:48:54 +00:00
vitalyr@chromium.org
1dcb6e33cd Minimize malloc heap allocation on process startup.
R=vegorov@chromium.org
BUG=http://b/issue?id=5095592

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 15:18:18 +00:00
sgjesse@chromium.org
8a6108de95 Remove the ability to compile without logging and profiling
The preprocessor defines ENABLE_LOGGING_AND_PROFILING and ENABLE_VMSTATE_TRACKING has been removed as these where required to be turned on for Crankshaft to work. To re-enable reducing the binary size by leaving out heap and CPU profiler a new set of defines needs to be created.

R=ager@chromium.org

BUG=v8:1271
TEST=all

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 09:09:04 +00:00
vitalyr@chromium.org
bbaed5b82e Fix a few issues breaking cctest/test-lockers/Regress1433:
o The thread local state in an isolate has to be initialized before
  it's used.
o v8::Locker was incorrectly tracking whether it's the topmost one.
o Waking the profiler thread on shutdown should not leave the
  semaphore counter in an inconsitent state.

R=fschneider@chromium.org
BUG=v8:1522
TEST=cctest/test-lockers/Regress1433

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 15:49:39 +00:00
vitalyr@chromium.org
90c9f1b989 Suspend runtime profiler as soon as we exit JS.
Lots of web pages have really frequently firing timers that keep the
profiler thread spinning if we require a period of JS inactivity
before suspending the profiler. While it's possible to throttle it by
increasing the sleep delay and adjusting the duration of the required
inactive period, it seemed much simpler to just stop it immediately on
exiting JS.

Stopping the profiler this way effectively turned off two optimization
heuristics: 1) eager optimization (it's reset on waking up the
profiler and now the profiler wakes up much more frequently) and 2)
optimization throttling based on JS to non-JS state ratio (the ratio
is now 100%). I removed these two heuristics and found no performance
regressions so far.

R=ager@chromium.org
BUG=crbug.com/77625
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 14:56:08 +00:00
mikhail.naganov@gmail.com
f4bf8f8fee Remove obsolete aggregating and non-working producers heap profilers.
2000 LOC are gone!

R=sgjesse@chromium.org
BUG=1481

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 11:38:47 +00:00
mikhail.naganov@gmail.com
508b22c436 "Deiceolate" Thread classes.
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.

This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.

As a side effect, we have also fixed the DebuggerAgent test.

Thanks to Vitaly for help in fixing isolates handling!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
mikhail.naganov@gmail.com
47248cc5fe Revert accidental r8254..r8256
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
f05fd92994 remove isolate reference from threads
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:35:31 +00:00
vitalyr@chromium.org
2bc305cd9a Fix bug 1433: clear the global thread table when an isolate is disposed.
R=ager@chromium.org
BUG=v8:1433
TEST=test-lockers/Regress1433

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 18:33:03 +00:00
vitalyr@chromium.org
37eb9b3031 Kill some dead code: classic frame element and const lists.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 15:43:08 +00:00
sgjesse@chromium.org
e497896181 Fix building with profilingsupport=off
Using profilingsupport=off is not recommended as it will turn off crankshaft. With this change it will build though.

R=erik.corry@gmail.com

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 14:33:23 +00:00
dslomov@chromium.org
c5c57d722a Put 7942 "Per-isolate embedder-specific data" back
TBR=

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 23:26:38 +00:00
dslomov@chromium.org
3d5d169275 Revert "Per-isolate embedder-specific data"
This reverts commit 42f5dc01fb9adbf55242da9f6515e9a37132217b.

Checking if this helps webkit-tests

TBR=dslomov@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 22:35:41 +00:00
dslomov@chromium.org
469c55f058 Per-isolate embedder-specific data
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 16:20:45 +00:00
lrn@chromium.org
9307ce2fcf Fix incorrect coercion of other failures to Failure::Exception in ReThrow.
TEST=cctest/test-api/OutOfMemoryNested

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 12:22:19 +00:00
vitalyr@chromium.org
73c809bb0e Isolates cleanup: move top.cc to isolate.cc.
Review URL: http://codereview.chromium.org/6969042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 08:54:16 +00:00
dslomov@chromium.org
2500f14868 This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

Committed: http://code.google.com/p/v8/source/detail?r=7734

Committed: http://code.google.com/p/v8/source/detail?r=7784

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 18:55:31 +00:00
dslomov@chromium.org
6e4629a81c Revert "This implements per-isolate locking and unlocking, including tests"
This reverts commit 1aa40d0c278e195e9e69dcf8b29a212aa1817c0b.

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

Committed: http://code.google.com/p/v8/source/detail?r=7734

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 21:04:32 +00:00
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
vitalyr@chromium.org
a9ea3f98b0 ll_prof: Reduce profiling hooks overhead from >400% to 25%.
Switched to using binary low-level log instead of the textual log used
by the ticks processor. The binary log contains code-related events,
code object names, and their bodies. When writing to the log we ask
glibc to use a larger buffer. To avoid complex processing of the
snapshot log (which is still textual) the serializer emits final
snapshot position to code name mappings that can be quickly be read
without replaying the snapshot log. (This might be useful for the
ticks processor.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 16:06:25 +00:00
vegorov@chromium.org
08e7b94924 Fix compilation with debuggersupport=off.
Review URL: http://codereview.chromium.org/6901026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 13:53:19 +00:00
lrn@chromium.org
a932441a0c Cleanup of ScannerConstants, now named UnicodeCache.
The ScannerConstants class was originally static fields on the scanner class.
During creation of the stand-alone preparser and later isolates, it has been
moved into a separate class with a per-isolate instance.
It is used to hold caching unicode Predicate values.

This change renames the class to UnicodeCache, and passes a reference
to the instance down to methods that doesn't have an easy access to
an isolate (to avoid, e.g., having to do an Isolate::Current() for every
number parsed).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 08:27:38 +00:00
vitalyr@chromium.org
d932b5f768 Do not rely on uniqueness of pthread_t
Patch by Dmitry Lomov.

pthreads implementations are free to reuse pthread_t (thread id) after
the thread has died. This change gets rid of ThreadHandle class and
replaces it with v8-managed thread identifiers.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 23:46:22 +00:00
antonm@chromium.org
8122f974d8 Make exception thrown via v8 public API propagate to v8::TryCatch as JS thrown exceptions do.
Correctly process failures which can be returned by Object::GetProperty
when performing GetRealNamedProperty* queries.

Callback properties can produce exceptions so we need to wrap access to them
into exception checks.  However, despite of many other methods with exception
checks, property access doesn't mandatroy go via JavaScript and hence we
need to inject code to propagate exception to public API TryCatch handlers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 19:52:24 +00:00
vitalyr@chromium.org
179aef2b8f VM initialization refactoring.
This patch introduces global once per-process initialization and moves
the OS and CPU setup there. This makes CPU features isolate-independent.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-31 16:17:37 +00:00
lrn@chromium.org
385e4deff5 Make the preparser standalone library and process build in debug mode.
It should now be possible to build the preparser using 'scons preparser' in both release and debug modes.
Remove v8.h include from scanner-base.h and other files.
Remove NativeAllocationChecker and all of its kind.
Moved Isolate::PreallocatedStorage* to isolate.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 13:06:48 +00:00
sgjesse@chromium.org
2531480d10 Re-establish mips basic infrastructure.
This commit adds current working versions of assembler, macro-assembler,
disassembler, and simulator.

All other mips arch files are replaced with stubbed-out versions that
will build.

Arch independent files are updated as needed to support building and
running mips.

The only test is cctest/test-assembler-mips, and this passes on the
simulator and on mips hardware.

TEST=none
BUG=none

Patch by Paul Lind from MIPS.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 13:05:36 +00:00
vitalyr@chromium.org
b30e3388a9 Clean up Isolate usages in compilation cache.
Review URL: http://codereview.chromium.org/6688065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 10:22:57 +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