Commit Graph

906 Commits

Author SHA1 Message Date
mikhail.naganov@gmail.com
9d440fdd36 Store API callback entry address prior to entering a callback.
Callback entry address is stored in VMState and is later retrieved by
profiler stack sampler. This makes possible relating API entry to JS
stack, and this is simpler than trying to unwind native stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 14:43:00 +00:00
mikhail.naganov@gmail.com
c2f12a7293 Reimplement logging of API callbacks entry points in an easier way.
Now they are logging during "LogCompiledFunctions" cycle. API functions
are detected by examining SFI's "function_data" field.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 09:19:24 +00:00
mikhail.naganov@gmail.com
a9d7c378d8 Add logging of callbacks in prof-lazy mode.
This is needed to show calls to DOM in CPU profiles. I can think
of a better approach like adding specific functions into V8 API
for explicitly providing callback names and modifying bindings codegen
appropriately. My plan is as follows:
 - submit this CL;
 - implement anything I need to process log data and display DOM
   calls in profiles;
 - think again about adding specific functions and modifying bindings
   codegen.

BUG=http://code.google.com/p/chromium/issues/detail?id=27613

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:15:46 +00:00
ager@chromium.org
3cf9ce4736 Fix crash in string replace with regexp. If the suffix of the subject
string is larger than 2047 chars we will encode the slice as two Smis
instead of one.  The calculation of the max size of the string builder
did not take this into account.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 18:48:04 +00:00
ager@chromium.org
ce20b5b461 Fixed bug in pixel array inline cache on x64. The value was not
zero-extended as it should be.  Therefore, the index into the pixel
array could influence the value on reads.

BUG=http://code.google.com/p/chromium/issues/detail?id=26337
Review URL: http://codereview.chromium.org/399067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 11:36:29 +00:00
erik.corry@gmail.com
701c00f8b4 Accelerate charCodeAt on ARM.
Review URL: http://codereview.chromium.org/402012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 10:20:24 +00:00
sgjesse@chromium.org
d55d3ce89a Add DebugMessageDispatchHandler
A callback on the debugger thread when a message is received. Allows the 
embedding application to wake up the main thread in order to handle the 
message. Useful when the embedding application is idle and sitting in a 
select() call.

Patch by Ryan Dahl <coldredlemur@gmail.com>

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 08:59:28 +00:00
lrn@chromium.org
1bc9a21e9a Sorry, this should have gone to http://codereview.chromium.org/391014
I added some tests and swapped the lhs and rhs of the && operator in v8natives.js as requested.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 13:54:05 +00:00
antonm@chromium.org
9a545949a4 Restore invariant (next of first deallocated must point to the head) before calling into weak
callbacks.

Otherwise if callback allocates a new handle, it could orphan some global handles (with disastorous
consequences if those global handles are cached).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 13:50:07 +00:00
sgjesse@chromium.org
63925e5013 Add missing case for shr in IA-32 disassembler
Review URL: http://codereview.chromium.org/397024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 10:24:27 +00:00
sgjesse@chromium.org
459e4c6b0c Changes to Intel shift functions
Change name of shifts picking the shift count from cl to sal_cl, shl_cl and shr_cl.

Add special encoding of shift by one for shr which was missing it.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 08:35:43 +00:00
yurys@chromium.org
9bafc32932 Step next should respect do/while condition block.
Condition block of do/while statements is a valid break location so it should have its own position. The block is represented by a regular Expression node so we cannot store the position in it, instead the position is stored in a separate field in DoWhileStatement AST node.

BUG=514
Review URL: http://codereview.chromium.org/385136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 21:59:31 +00:00
yurys@chromium.org
b6ce7ce8a3 Fix some presubmit errors.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/400001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 16:58:09 +00:00
yurys@chromium.org
0a384a708d Skip debugger frames when looking for calling context.
BUG=509

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 14:41:55 +00:00
erik.corry@gmail.com
cc3896dfac Fix bug 503: undefined <= undefined should return false on ARM.
Review URL: http://codereview.chromium.org/399001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 14:12:27 +00:00
erik.corry@gmail.com
48d8bbecd5 Fix bug 499 by splitting up long-running test to minimise the amount
of code that can't be tested on slow targets.
Review URL: http://codereview.chromium.org/385133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 13:06:27 +00:00
erik.corry@gmail.com
64941f1cf9 * Remove old snapshot implementation
Review URL: http://codereview.chromium.org/394007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 12:08:40 +00:00
yurys@chromium.org
5f3bdbe5a6 Remove trailing whitespace.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/384121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 15:05:50 +00:00
yurys@chromium.org
b67d8f125a Test that pause can be set in script and won't lead to crash when execution is resumed.
The test currently fails on v8 trunk if the new compiler is used. The issue seems to be fixed on bleeding_edge so there is no changes to src, just test.

Cromium bug: http://crbug.com/26686
Review URL: http://codereview.chromium.org/384120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 14:04:08 +00:00
fschneider@chromium.org
2e3e770ab9 Add a regression test that exposes a stack corruption problem.
See http://code.google.com/p/chromium/issues/detail?id=27227

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 13:58:48 +00:00
erik.corry@gmail.com
df4f52347b Allow a platform to indicate that some CPU features are always
available.  We use this to ensure that snapshots on MacOSX can
use SSE2 instructions.  Also clean up and assertify the
handling of things we can't do when we are generating a
snapshot.  Fix a bug in the new serialization tests where
they activated Snapshot::enable() too late after code had been
generated that assumed no snapshots.
Review URL: http://codereview.chromium.org/391051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 12:32:57 +00:00
yurys@chromium.org
cc0ce24331 Make accessors for hidden properties object not touch interceptors.
Interceptors cannot provide a meaningful result for hidden_symbol anyway and some of them crash on empty property name.


Related Chromium issue: http://code.google.com/p/chromium/issues/detail?id=27385

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 16:34:52 +00:00
christian.plesner.hansen@gmail.com
3773f96e26 Updated sputnik test expectations to match changes in tests.
Review URL: http://codereview.chromium.org/385068


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 13:01:03 +00:00
ager@chromium.org
f0e8525083 Remove passing test from ARM test expectations.
Review URL: http://codereview.chromium.org/386019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 11:31:46 +00:00
ager@chromium.org
6edd72849a Change expectations for LargeObjectSpace test on ARM. It should pass,
and if it doesn't we need to figure out why.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 10:23:05 +00:00
christian.plesner.hansen@gmail.com
5d4d5944dd Remove special-case for arguments.toString to match ES5
Patch by Jan de Mooij <jandemooij@gmail.com>
Review: http://codereview.chromium.org/273073

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 11:28:37 +00:00
sgjesse@chromium.org
3445dfe827 Split long running test
Split a long running test into two parts. The second part still takes most of the time and is skipped on ARM in debug mode.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 10:28:20 +00:00
lrn@chromium.org
d53f05e3e2 Fix warnings on Win64.
Set warning level to /W3 and change implicit conversions from size_t
to int. Most "fixes" are simply manifesting the implicit casts or using
a special strlen replacement that returns int.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:50:06 +00:00
ager@chromium.org
2252cc1bc9 Fix inline constructor code bailout.
Remove variable that is currently unused.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:00:09 +00:00
yurys@chromium.org
0c6dc2c5cb Remove trailing whitespace in test-debug.cc to make flexo happy.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/388005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 17:39:54 +00:00
yurys@chromium.org
cd9660f77c All hidden properties of an object are stored in a value of a regular property with empty name. This property may confuse user if returned among regular properties. It should not be exposed directly by ObjectMirror. Should we want an access to these properties from debugger we need to implement an explicit method for that.
Current patch filters the hidden_symbol from property names returned to ObjectMirror.

See http://crbug.com/26491

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 16:13:21 +00:00
sgjesse@chromium.org
0b0d4efdb4 Test mjsunit/string-indexof times out on ARM simulator
Removal of string slices made this test time out on the ARM simulator. Temporaly mark this as pass or timeout.

BUG=http://code.google.com/p/v8/issues/detail?id=500
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/390002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 15:50:23 +00:00
sgjesse@chromium.org
91cc4c7ebb Modify test using string slices
With slices string string type removed generating a large amount of sub-strings takes more time. Change a test to avoid timeout in debug mode.
Review URL: http://codereview.chromium.org/385006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 14:41:53 +00:00
sgjesse@chromium.org
851b9b2f73 Remove sliced string string type
As a first step to reduce the complexity of the string hierachy the sliced string type is removed. Whenever a sub-string is created it is allocated as a fresh flat string.
Review URL: http://codereview.chromium.org/385004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 13:23:05 +00:00
christian.plesner.hansen@gmail.com
7d47dde4cb Marked cyrillic as expected to fail.
Review URL: http://codereview.chromium.org/388002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 12:19:36 +00:00
christian.plesner.hansen@gmail.com
db357420ed Fixed breakage of test running when sputniktests not checked out.
Review URL: http://codereview.chromium.org/381002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 10:23:50 +00:00
erik.corry@gmail.com
b068a9f755 * Fix regexp benchmark regression where we were doing work to
make standard regexps like \s and . case independent.
* Make use of the fact that the subject string is ASCII only
when making character classes case independent.
* Avoid spending time making large ideogram or punctuation
ranges case independent when there is no case mapping anyway.
Review URL: http://codereview.chromium.org/378024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 10:01:23 +00:00
christian.plesner.hansen@gmail.com
0ca9beb316 Added test runner for sputnik tests.
Review URL: http://codereview.chromium.org/372053


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 09:31:57 +00:00
erik.corry@gmail.com
6a3921fc0e Keep natives source code in external strings instead of putting
it in regular flat strings that are part of the snapshot.
After this change we don't need libraries-empty.cc any more.  In
this change libraries-empty.cc is just a the same as libraries.cc
and the scons build builds it but does not use it.  We can move
in stages to a situation where it is not generated at all for all
the build systems that we have.
Review URL: http://codereview.chromium.org/360050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 13:48:33 +00:00
christian.plesner.hansen@gmail.com
321bed24f6 Fixed problem where popping a handle scope after calling an accessor
would clobber the register holding the result.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 11:35:47 +00:00
erik.corry@gmail.com
57c919e414 Fix bug 486, Cyrillic character ranges in case independent regexps.
http://code.google.com/p/v8/issues/detail?id=486
Review URL: http://codereview.chromium.org/361033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 11:15:20 +00:00
kmillikin@chromium.org
debb5f8b48 Change the special handling of typeof comparisons to strings for
regular expressions to be consistent with typeof in other contexts.
Typeof regular expressions should now be 'function' in all contexts.

In the JS natives, IS_FUNCTION, IS_OBJECT, and IS_REGEXP return the
same answers as before.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 16:08:48 +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
ager@chromium.org
f39fbb206e Fix case where we treat an unaliased call to eval as an aliased call
to eval.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 11:19:37 +00:00
lrn@chromium.org
273e860cc1 Changed keyword token recognition to be done inline in the identifier scanner.
Review URL: http://codereview.chromium.org/360048


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 10:11:38 +00:00
erik.corry@gmail.com
f36c32288e Sort tests to increase predictability of mozilla test runs
in the face of suspected python bugs.  Also remove some
unused code.
Review URL: http://codereview.chromium.org/365001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 16:55:24 +00:00
sgjesse@chromium.org
77a71c90c7 Fix issue 491: constantpool dump violates ARM debugger assertion for return point
The generation of the return sequence is now protected from having the constant pool emitted inside of it in both compilers.

BUG=http://code.google.com/p/v8/issues/detail?id=491
TEST=test/mjsunit/regress/regress-491.js
Review URL: http://codereview.chromium.org/362003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 14:45:50 +00:00
kmillikin@chromium.org
34dee0319c Remove the typeof state threaded through the code generator. It was
used to signal that an expression was the immediate subexpression of
typeof, or (?) in the arm of a conditional expression itself in the
typeof state.

It was inconsistently consulted.  It was not used for property loads,
but only for slot loads.  This means that we matched the Webkit JSC
(not Spidermonkey) behavior for:

typeof(true ? x : y)  // throws ReferenceError

and we matched the SpiderMonkey behavior (not JSC) for:

with ({}) { typeof(true ? x : y) }  // ==> "undefined"

Now we are expected to match the JSC behavior in all cases.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 13:56:41 +00:00
sgjesse@chromium.org
54ec6c031a Fix xssue 492: ARM debug crash: mozilla/ecma/FunctionObjects/15.3.1.1-3
When the number of parameters times 4 (kPointerSize) to a function cannot be encoded in 12 bits the return sequence gets one more instruction. Changed the assertion to check for this case.

BUG=http://code.google.com/p/v8/issues/detail?id=492
TEST=test/mjsunit/regress/regress-492.js
Review URL: http://codereview.chromium.org/354028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 10:04:22 +00:00