Commit Graph

1836 Commits

Author SHA1 Message Date
lrn@chromium.org
13e548af1d X64: Implement CEntryStub and JSEntryTrampoline.
Still some supporting functions missing.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 09:48:15 +00:00
kmillikin@chromium.org
94a122296d Cleanup of ARM exception handlers. Remove the unused code and
parameter pointer slots.  Change it so that the handler address no
longer points into the middle of the handler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 09:00:07 +00:00
kmillikin@chromium.org
f6aa7ce3ee Change the IA32 stack handler layout so that the handler address does
not point into the middle of the handler.  Also remove top-of-stack
caching from MacroAssembler::PushTryHandler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 08:01:30 +00:00
erik.corry@gmail.com
6b2a49ff83 * Modify simulator and ARM code generator to avoid swi
instructions.  The intention is that the snapshots generated
by the simulator should be usable on the hardware.  Instead of
swi instructions we generate a branch to a swi instruction that
is not part of the snapshot.  The call/jump is patched up in
the same way as other external references when the snapshot
is deserialized.  This only works for EABI targets: on old ABI
targets we still emit some instructions not supported by the
simulator (fp coprocessor instructions).
Review URL: http://codereview.chromium.org/119036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 09:26:53 +00:00
kmillikin@chromium.org
4a96feeef3 Change IA32's CodeGenerator::GenerateFastCharCodeAt to eagerly
allocate and spill registers, so that the register reference counts
and virtual frame are unchanged in the main body.

This eliminates a few sites of magic branching or binding of
JumpTarget with arguments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 07:44:09 +00:00
sgjesse@chromium.org
dc9670bcb4 Change locationFromPosition() and locationFromLine() to use a binary search to locate line numbers from position numbers. Modify test debug-sourceinfo.js to include more tests, including error conditions.
Patch by Matt Hanselman, see http://codereview.chromium.org/118371.

BUG=213
TEST=test/mjsunit/debug-sourceinfo.js
Review URL: http://codereview.chromium.org/118425

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 07:03:21 +00:00
sgjesse@chromium.org
dc68e0f9bd Activate the debugger in the developer shell earlier.
This will support breaking in debugger statements in JavaScript files read from the command line.
Review URL: http://codereview.chromium.org/113998

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 06:53:15 +00:00
kmillikin@chromium.org
0bfd850a26 Simplify the IA32 exception handler block by removing the unused code
pointer and parameter pointer slots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 14:39:50 +00:00
mikhail.naganov@gmail.com
d7cccf6b8d Add log compression ability.
This is a trivial per-row compression:
- short aliases are introduced for events and code creation tags;
- in tick events, offsets are used instead of absolute addresses;
- removed 'code-allocation' event, as it seems not used.

The first two options are depend on the new flag: 'compress-log', which is off by default.

On benchmarks run w/o snapshot, this gives 45% log size reduction.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 13:39:48 +00:00
ager@chromium.org
e665c09177 Prepare push of V8 version 1.2.7 to trunk. Now working on version 1.2.8.
Review URL: http://codereview.chromium.org/118378

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 11:03:04 +00:00
sgjesse@chromium.org
d498361c5f Add more debugging information to scripts compiled through eval.
Scripts now have a compilation type which can be host, eval or JSON. Host scripts are compiled through the API, eval scripts are compiled through call to evan and JSON scripts are compiled as a result of calling JSON.parse.

For scripts scripts compiled through eval the JavaScript function in top of the stack and the pc offset into the code is stored in the script object. This makes it possible to calculate the source position of the eval call later when requested. This information can be obtained through the script mirror object and is part of the script mirror JSON serialization for the debugger protocol.

Moved the enumeration ScripType into class Script and remamed to Type. The new compilation type enumeration is also inside the class Script.

This information is now shown when using the scripts command in he developer shell debugger.
Review URL: http://codereview.chromium.org/119108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 10:47:49 +00:00
ager@chromium.org
24d22b567a Introduce an API to force the deletion of a property ignoring
interceptors and dont-delete attributes.

Minor change to the behavior of eval: throw exception when calling
eval in a context for which the global has been detached.  This
matches the behavior of both Firefox and Safari post navigation in the
browser.
Review URL: http://codereview.chromium.org/118374

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 09:46:09 +00:00
erik.corry@gmail.com
f04220d25a Fix compilation on FreeBSD. Thanks to Ryan Dahl for patch.
http://codereview.chromium.org/113897


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 08:51:35 +00:00
kasperl@chromium.org
9e35fb6582 Lower the number of generations in the script compilation
cache to 5 (down from 8). Generations 5, 6, and 7 are 
rarely hit in real browsing sessions (~2% in the best case)
so it seems better to lower the size to avoid carrying around 
too many compiled scripts in the cache.
Review URL: http://codereview.chromium.org/119301

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 08:03:58 +00:00
whesse@chromium.org
64bd87b8a8 Change handle creation to use Object*, to comply with strict aliasing rules.
Review URL: http://codereview.chromium.org/119177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 07:16:04 +00:00
kmillikin@chromium.org
42c7dc755c Fix x64 build.
TBR=whesse@chromium.org,lrn@chromium.org
Review URL: http://codereview.chromium.org/118310

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 17:14:06 +00:00
mikhail.naganov@gmail.com
18b4d8bfa7 Add an ability to explicitly specify path to d8 shell to linux-tick-processor.
Review URL: http://codereview.chromium.org/118306


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 15:49:37 +00:00
kmillikin@chromium.org
bd82b972fc Simplify the processing of deferred code in the code generator. Our
deferred code snippets are highly stylized.  They always make a call
to a stub or the runtime and then return.  This change takes advantage
of that.

Creating a deferred code object now captures a snapshot of the
registers in the virtual frame.  The registers are automatically saved
on entry to the deferred code and restored on exit.

The clients of deferred code must ensure that there is no change to
the registers in the virtual frame (eg, by allocating which can cause
spilling) or to the stack pointer.  That is currently the case.

As a separate change, I will add either code to verify this constraint
or else code to forbid any frame effect.

The deferred code itself does not use the virtual frame or register
allocator (or even the code generator).  It is raw macro assembler
code.
Review URL: http://codereview.chromium.org/118226

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 14:16:32 +00:00
antonm@chromium.org
1e55c82115 Revert r2110 as it introduces performance regressions.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 13:42:29 +00:00
antonm@chromium.org
b2f0dc3542 Don't do local lookup on global object as those (currently) are not JITed anyway.
Review URL: http://codereview.chromium.org/119048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 10:50:36 +00:00
kasperl@chromium.org
dfbc850ebc Revert revision 2108. This brings back the changes
submitted in revisions 2093, 2094, 2099, and 2106.
There's no evidence that supports that these changes
should be the cause of the unexplained performance
regressions on the intl2 and DHTML page cyclers. 


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 08:07:15 +00:00
kasperl@chromium.org
84c09c6de4 Experimental revert of revisions 2093, 2094, 2099, and
2106 to try to isolate a performance regression on the
page cyclers.

I'll roll the changes back in if this doesn't fix the
regression.

TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/118302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:57:30 +00:00
kasperl@chromium.org
be11c4e979 Patch by Craig Schlenter. See http://codereview.chromium.org/118153
Change stack alignment on linux to 16 bytes to keep gcc 4.4 happy. 
This fixes the mksnapshot segfault without requiring -fno-tree-vectorize
which just avoided the problem by not generating code with movdqa.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:20:30 +00:00
antonm@chromium.org
0a0ede0716 Fix the issue with layout tests.
The problem was I incorrectly treated NULL result as failure to fetch
a property with a getter.  However, if getter returns zero, it is
manifested as NULL pointer (see added test case).

Good news: that gives another boost as before this CL if getter returned
0, I did another slow lookup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 19:19:53 +00:00
kmillikin@chromium.org
f7bb967678 Clean up the AST pretty printer by adding some missing newlines and
indentation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 12:01:55 +00:00
lrn@chromium.org
b918e64dc3 X64: JSEntry Stub
Review URL: http://codereview.chromium.org/118115


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 11:54:14 +00:00
whesse@chromium.org
32ce7956ac Fix formatting of one line.
Review URL: http://codereview.chromium.org/119171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 11:20:03 +00:00
whesse@chromium.org
2852f8d5e2 Declare register names as static constants rather than external globals.
Review URL: http://codereview.chromium.org/119082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 11:09:17 +00:00
mikhail.naganov@gmail.com
ba09fb12aa Profiler cleanup: removed another piece that is only needed for DevTools profiler.
Review URL: http://codereview.chromium.org/118229


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 09:20:27 +00:00
sgjesse@chromium.org
d1f466cce3 Added more output on timeout failures to test runner.
Review URL: http://codereview.chromium.org/119112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 09:18:39 +00:00
antonm@chromium.org
250081d671 Store lookup index in ARM stubs as well (see r2093 and 2094 for more info).
Review URL: http://codereview.chromium.org/118163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 16:09:43 +00:00
whesse@chromium.org
34de62698c Add multiplication and division to x64 assembler. Add emit_modrm() function.
Review URL: http://codereview.chromium.org/119078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 13:30:31 +00:00
kmillikin@chromium.org
92c17c34de Rename misnamed test file.
Review URL: http://codereview.chromium.org/119081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:21:54 +00:00
kmillikin@chromium.org
84ef2d3ace Refactor IA32 shift operations to simplify moving the right operand
into the ecx register and to ensure that there is no frame effect
between the first entry to the deferred code and binding its exit.
Review URL: http://codereview.chromium.org/118157

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:20:56 +00:00
ager@chromium.org
63a51e01ba Fix flakyness in tests: make sure to garbage collect temporary test
external strings so that they are not disposed when running other
tests that rely on only one external string being disposed during its
run.

TBR=kasperl
Review URL: http://codereview.chromium.org/118158

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:09:52 +00:00
antonm@chromium.org
2e49a1c03d Follow up to r2093: forgotten files and changes.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:04:53 +00:00
antonm@chromium.org
06fdc01543 In case of holder with fast properties that allows to fetch the property
immediately if holder has this property or saves binary search on holder if
property doesn't belong to holder.  Of course, in the cases when named getter
returns nothing.

That gives ~20% for dom benchmark/Document Object String Get, speeds up overall
dom_perf (not dramatically) and overall score for peacekeeper.  Strange, but DOM
part of peacekeepr runs somewhat slower.
Review URL: http://codereview.chromium.org/118118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 11:25:34 +00:00
mikhail.naganov@gmail.com
703fcecaaf Make tickprocessor's ProfileView extensible and move out DevTools-only stuff.
Review URL: http://codereview.chromium.org/119076


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 11:21:23 +00:00
lrn@chromium.org
5e83c2cc9c X64: Added implementations of Set(..., Immediate) to macro assembler.
Removed duplicates comments in assembler-x64.cc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 10:30:50 +00:00
kmillikin@chromium.org
a41b41bf98 As a simplification, manually inline the function
DeferredInlineBinaryOperation::GenerateInlineCode and remove its
definition.  It was only called from one site and was the only
deferred code object that was split that way into fast-case inline and
slow-case stub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 20:11:26 +00:00
whesse@chromium.org
ea0644506d Add miscellaneous operations to x64 assembler.
Review URL: http://codereview.chromium.org/113997

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 13:40:52 +00:00
whesse@chromium.org
8c78e673ad Add shift operations to x64 assembler.
Review URL: http://codereview.chromium.org/118107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 11:43:26 +00:00
kmillikin@chromium.org
c70a511b70 Factor out the code for emitting the IA32 binary operations div and
mod so they do not share code with the other binary operations.  They
now preallocate their fixed registers (eax and edx).  There is now no
frame effect between entries to the deferred call to the stub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 11:18:41 +00:00
mikhail.naganov@gmail.com
0fcedde224 Fix determining of JS lower stack bottom used in profiler's JS stack tracer to work with Chromium.
My assumption that log initialization happens somewhere near the stack's bottom is true for V8's sample shell but isn't true for Chromium, causing many otherwise valid stack addresses to be thrown out. The solution proposed is to save stack pointer value for the outermost JS function in ThreadLocalTop similar to c_entry_fp.

Implemented only for IA-32. Currently I'm not dealing with profiling on ARM and x86-64 anyway.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 09:33:17 +00:00
lrn@chromium.org
734f1fd135 X64: Added jmp and call and nop(n) to X64 assembler.
Review URL: http://codereview.chromium.org/115920


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 07:21:05 +00:00
ager@chromium.org
ce988f32cc Add a couple of parenthesis to improve readability and please certain
GCC version.

BUG=364
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/118016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 19:17:48 +00:00
mikhail.naganov@gmail.com
f0b3d3062d Fix wait interval calculation in ProfLazyMode test.
Also, add a small delay to be sure that all ticks are logged prior to leaving CheckThatProfilerWorks function.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 15:33:02 +00:00
whesse@chromium.org
1bb3976a14 Change RelocInfo to write 64-bit data field on x64 architecture.
Review URL: http://codereview.chromium.org/115860

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 12:14:54 +00:00
sgjesse@chromium.org
2eebe59957 Prepare for push to trunk. We are now working on 1.2.7.
Review URL: http://codereview.chromium.org/113994

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 10:52:00 +00:00
mikhail.naganov@gmail.com
48b4679396 Use uint in ProfLazyMode test when measuring time delta.
While testing ProfLazyMode stability I encountered a situation when the cycle supposed to run for 200 ms started to run "infinitely" because delta between two int64_t values became negative.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 09:33:53 +00:00