Commit Graph

958 Commits

Author SHA1 Message Date
erik.corry@gmail.com
cf3c1a8c18 Arrays created with new Array(n) are not assumed to be sparse unless the given
size is truly huge.  A test had to be modified slightly so as not to be too slow.
Review URL: http://codereview.chromium.org/40163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 12:45:47 +00:00
mikhail.naganov@gmail.com
0554042907 Fixed projects after adding oprofile-agent* sources.
Review URL: http://codereview.chromium.org/40159

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 11:35:44 +00:00
mikhail.naganov@gmail.com
c013397399 Adding support for reporting addresses of JIT compiled code to OProfile.
Please be warned that current gHardy versions have OProfile 0.9.3
which doesn't have JIT API. You need to install OProfile 0.9.4
with a 32-bit version of opagent library. Instructions are on the
internal Wiki page: http://wiki/Main/V8UsingOProfile

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 10:53:08 +00:00
kmillikin@chromium.org
86254f6ad9 Add a test for inserting a preexisting list element to a list, at the
point where the backing buffer will have to grow.
Review URL: http://codereview.chromium.org/39180

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 09:39:19 +00:00
kmillikin@chromium.org
e37f6087c6 In List::Add, correctly handle the case of adding a reference to a
preexisting list element to a list, and to not return anything (we
never used the return value).  Remove List::Insert, it is not
currently used or needed.  Change List::AddBlock to take a copy of
the element to be replicated rather than a reference.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 08:10:42 +00:00
kasperl@chromium.org
567d9a603e Tweak the context disposal GC heuristic: If the garbage collector
interface is exposed through the global gc() function, we avoid 
being clever about forcing GCs when contexts are disposed and leave 
it to the embedder to make informed decisions about when to force 
a collection.
Review URL: http://codereview.chromium.org/40154

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 07:44:13 +00:00
erik.corry@gmail.com
a85e72c1d1 Put 'this' in a handle in EnsureSize to avoid crash caused by GC at
unlucky moment.
Review URL: http://codereview.chromium.org/40108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 13:23:39 +00:00
lrn@chromium.org
21fb24e0b2 Issue 254 - now correctly updates lastIndexof when using the test method.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 12:29:37 +00:00
olehougaard
7bd50d046d Fixed issue 253. No longer assuming that the target of a property lookup is a JSObject.
Review URL: http://codereview.chromium.org/39126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 11:57:24 +00:00
kmillikin@chromium.org
9331d358c9 Add an insert function to our list utility class.
Review URL: http://codereview.chromium.org/40105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:34:36 +00:00
sgjesse@chromium.org
f87d1530e6 The SendAll method on Socket was a helper method that did not really belong in platform.
Review URL: http://codereview.chromium.org/40104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:33:00 +00:00
kmillikin@chromium.org
870b6c46fa Fix a few indentation issues.
Review URL: http://codereview.chromium.org/40102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:13:17 +00:00
lrn@chromium.org
4852bef23d Issue 246 - wait until regexp is parsed to detect whether it's simple.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 09:52:01 +00:00
sgjesse@chromium.org
6ef7ef657e Add remote debugging front end to developer shell.
D8 now supports demote debuggign of a V8 instance with the debugger agent enabled. Running D8 with the option --remote-debugger will try to connect to a V8 debugger agent and process the debugging protocol. The command line UI is the same as for the D8 in-process debugger as the same code is used for processing the debugger JSON. 
Review URL: http://codereview.chromium.org/40011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 09:42:51 +00:00
kmillikin@chromium.org
fa5bc7ea0b Streamline CodeGenerator::Comparison in the IA32 code generator. When
doing constant folding, handle only the cases that actually arise.
This avoids some complicated logic, some extra comparisons, and fixes
issue 247:

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 08:50:38 +00:00
ager@chromium.org
6e78598d77 Fix the 64-bit build. Implicit conversion from string constant to
char* gives a warning.  Using const char* instead.
Review URL: http://codereview.chromium.org/40100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 07:42:39 +00:00
iposva@chromium.org
be0c1e26e9 Add a meaningful name when disassembling code. This makes it easier
to match generated code to the originating source.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 06:14:34 +00:00
iposva@chromium.org
63d5fc4040 Properly add debug-agent.[cc|h] files.
Review URL: http://codereview.chromium.org/40014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 16:01:22 +00:00
kasperl@chromium.org
9f78714717 Disable the compilation caching for scripts to make it
possible to start generating code specific to a global
object. We should start caching scripts but make the
mechanism local to a specific global context inspired
by the way we handle eval-caching. 
Review URL: http://codereview.chromium.org/40007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 13:35:05 +00:00
sgjesse@chromium.org
92aa4ab36c Add V8 debugger agent.
The debugger agent listens on a TCP/IP port for a remote debugger connection. When such a connection is established the debuger JSON protocol is communicated between the agent the the remote debugger. The messages containing the JSON protocol has a RFC-822 like header with a Content-Length field and with the body containing the JSON in UTF-8 encoding.

The D8 shell has option --debugger-agent to start the debugger agent.
Review URL: http://codereview.chromium.org/27355

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 12:23:45 +00:00
mikhail.naganov@gmail.com
3db607a3c4 Dump more stack frames to perf log when executing a C++ function.
JavaScriptFrameIterator is templatized on the iterator type and renamed to JavaScriptFrameIteratorTemp.
The original JSFI is now a typedef for JavaScriptFrameIteratorTemp<StackFrameIterator>. Because of templatizing, JSFI code is moved to frames-inl.h

StackTraceFrameIterator moved to frames.*

Implemented SafeStackFrameIterator which wraps StackFrameIterator and have the same interface. It performs additional checks of stack addresses prior to delegating to StackFrameIterator. SafeSFI is used in an another specialization of JavaScriptFrameIteratorTemp template to perform safe JS frames iteration on sampler ticks.

I haven't took an advantage of having multiple stack frames in tickprocessor yet.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 11:56:44 +00:00
kmillikin@chromium.org
47b20ddf89 Before emitting code to merge frames, forget the sync flag (telling
that an element is mirrored in memory) for elements whose target is a
register.  This avoids generating some duplicate merge blocks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 11:51:59 +00:00
lrn@chromium.org
265715d90c Optimized regexp.test. No longer creates an intermediate string array.
Removed some handler code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 10:54:12 +00:00
lrn@chromium.org
55e57ec1b7 Validation of flattened regexps on ARM now doesn't expect a native code.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 09:11:09 +00:00
sgjesse@chromium.org
d6748c59ce Change svn:eol-style to native.
TBR=mikhail.naganov@gmail.com
Review URL: http://codereview.chromium.org/27349

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 21:09:25 +00:00
sgjesse@chromium.org
3d8a5f1a75 Unify the handling of the event and response JSON in developer shell debugger.
Formatting of both debugger events and debugger responses are now unified into one function. This is mainly in preparation for the upcomming remote debugging support where having it a one function simplify things.
Review URL: http://codereview.chromium.org/27330

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 19:02:27 +00:00
lrn@chromium.org
50e042dfcd All RegExp data are set on a single FixedArray instead of nesting them three deep.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 13:58:37 +00:00
kmillikin@chromium.org
4678719d24 Simplify the way that we compile slow-case switch statements. Compile
all the reachable tests first, and then all the reachable bodies.
Review URL: http://codereview.chromium.org/28296

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 11:30:17 +00:00
christian.plesner.hansen@gmail.com
a4d8eadc69 all-in-one
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 09:09:07 +00:00
ager@chromium.org
de5b4605b6 Check the return value of fwrite.
Newer versions of glib stdio mark fwrite() with war_unused_result.

Commiting for estade@chromium.org.

See http://codereview.chromium.org/27305


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-28 13:59:55 +00:00
erik.corry@gmail.com
367e9b5d08 Fix regression in regexp-caching.html
Review URL: http://codereview.chromium.org/27273

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 14:02:00 +00:00
kmillikin@chromium.org
634c4b94fd Mark a flaky ARM test as flaky.
Review URL: http://codereview.chromium.org/28257

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:49:47 +00:00
kmillikin@chromium.org
f4735247cf Merge from experimental code generator branch to bleeding edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:00:32 +00:00
kasperl@chromium.org
d77a0468cb Prepare push to trunk. Now working on version 1.0.4.
Review URL: http://codereview.chromium.org/31015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 11:55:57 +00:00
iposva@chromium.org
f5966c3815 Align code entry points to 32 bytes.
Review URL: http://codereview.chromium.org/27269

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 11:19:31 +00:00
erik.corry@gmail.com
01dae630a7 Add missing copyright boilerplate.
Review URL: http://codereview.chromium.org/27268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 10:16:31 +00:00
erik.corry@gmail.com
5b8c63f9d5 Avoids allocating a JSArray of capture information on each non-global
regular expression match.
Also moves all last-match information into one place where it can be
updated from C++ code (this will be used in another afsnit).
Review URL: http://codereview.chromium.org/28184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 10:04:34 +00:00
mikhail.naganov@gmail.com
0864b2d646 Two small changes regarding GC ticks.
1) Don't try to sample the stack if VM is in 'GC' state
2) Show GC ticks in profiler statistics

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 15:48:32 +00:00
sgjesse@chromium.org
0dee6cbab4 Fix lint errors.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/27208

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 14:30:30 +00:00
sgjesse@chromium.org
be011678f9 Make test-log-ia32.cc compile even if ENABLE_LOGGING_AND_PROFILING is not defined.
Review URL: http://codereview.chromium.org/28182

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 13:45:11 +00:00
sgjesse@chromium.org
7a83e2c0f6 Skip flaky (occasionally crashes) test on ARM until issue has been resolved.
BUG=240
Review URL: http://codereview.chromium.org/28183

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 13:32:44 +00:00
kasperl@chromium.org
c7c959632a Experimental (somewhat): Force GCs when disposing contexts, but
make sure not to do it repeatedly for bursts of context 
disposals.
Review URL: http://codereview.chromium.org/27201

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 12:40:50 +00:00
sgjesse@chromium.org
20a9e9b013 Change the D8 JavaScript debugger to fully use the JSON protocol.
The D8 debugger frontend now only processes JSON messages. Before the debugger events was passed as objects.

Changed the debugger events JSON generation to use the same serailizer as the responses to requests. This provides correct serialization of mirror objects in debugger events. Renamed ResponsePacket to ProtocolMessage as it is not only used for responses.
Review URL: http://codereview.chromium.org/27202

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 11:55:35 +00:00
iposva@chromium.org
c81043b259 Follow on to r1368: Remove unnecessary HandleScope in the StubCompilers.
Review URL: http://codereview.chromium.org/27156

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 08:05:03 +00:00
olehougaard
e3c0ae62af Go into slow case when encountering object initialization on the top level to optimize performance of code like
C.prototype.x = ...;
C.prototype.y = ...;
...
C.prototype.z = ...;
Review URL: http://codereview.chromium.org/27128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:54:22 +00:00
ager@chromium.org
411b7d18f6 Fix lint issues found by tools/presubmit.py.
TBR=mikhail.naganov
Review URL: http://codereview.chromium.org/28178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:05:53 +00:00
iposva@chromium.org
c093e94546 - Pass the knowledge whether the old GC is compacting to the GC prologue and epilogue. This allows us to skip frame cooking and uncooking when doing a mark-sweep GC.
- Add the ability for the code to refer to its code object by adding a handle to the code object in the MacroAssembler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:52:15 +00:00
iposva@chromium.org
548a8bc2cf Remove PCRE files from Xcode project.
Review URL: http://codereview.chromium.org/27134

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:23:49 +00:00
kasperl@chromium.org
d8c56a7fc4 Fix ARM build.
TBR=olehougaard@chromium.org
Review URL: http://codereview.chromium.org/28115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:13:57 +00:00
mikhail.naganov@gmail.com
632d4e4f3d Adding unit tests for profiler's stack tracer.
The testing is a bit tricky because we need to obtain a frame
pointer (EBP on IA-32) from inside of a function. This is especially
interesting in case of a compiled JavaScript function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:00:21 +00:00