Commit Graph

487 Commits

Author SHA1 Message Date
sgjesse@chromium.org
dfc677a668 Update test for issue 528
The check for the number og GC's required is now 1 or 2 instead of two to get rig of failures on ARM.

Updated the test to keep the code used by the test in the compilation cache by compiling it in another context. This makes the remaining issue with the eval cache more explicit.
Review URL: http://codereview.chromium.org/449051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 09:37:28 +00:00
kbr@chromium.org
4af7bf510c Reduced workload in external array test and added it back in.
BUG=http://code.google.com/p/v8/issues/detail?id=534

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 22:21:16 +00:00
ager@chromium.org
bb69a555f5 Remove complex external array testing that takes too long.
We should put in a reduced version of this.

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

TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/450010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 11:00:45 +00:00
sgjesse@chromium.org
6d163d9fd0 Remove usage of JSArray in Script object
Storing a JSArray in the Script object could cause an indirect reference from the compilation cache to a global object to be created. Now the line ends are only stored as a FixedArrya and when that is needed in JavaScript a JSArray copy is created. Changed some of the JavaScript code to cache the line ends in a local variable for better performance.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=test/test-api/Bug528
Review URL: http://codereview.chromium.org/434117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 14:10:48 +00:00
sgjesse@chromium.org
c75ff5e8b5 Fix lint errors
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/445004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 08:19:25 +00:00
sgjesse@chromium.org
5764362d6f Add test to expose bug 528
BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Bug528
Review URL: http://codereview.chromium.org/443021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 07:57:45 +00:00
kbr@chromium.org
25c5637e34 Fixed lint error in last checkin.
Review URL: http://codereview.chromium.org/434100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 21:50:30 +00:00
kbr@chromium.org
c135f2de07 Fixed incorrect instruction usage in KeyedLoadIC for byte and word
external array types. Added regression test based on real-world
failing code and verified that it would have caught this error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 20:29:11 +00:00
ager@chromium.org
7a6ebbdd6d Do not crash if a V8 extension fails to compile or throws an exception
when the code is run.

Instead, return an empty context handle so the failure to create a
context can be handled.

BUG=http://crbug.com/28486
Review URL: http://codereview.chromium.org/442005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:46:56 +00:00
mikhail.naganov@gmail.com
2af151ee63 Include getters and setters callbacks invocations in CPU profiler log.
Logging getters and setters from DOM API is extremely useful for web
developers as setting (and getting!) several properties can cause
page relayouts which take significant time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:39:18 +00:00
erik.corry@gmail.com
10e183d353 Make heap serialization nondestructive.
Review URL: http://codereview.chromium.org/441017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 12:55:33 +00:00
sgjesse@chromium.org
8e296a79ef Fix compilation error in r3352
Compilation error caught on Windows. Strangely enough gcc did not complaint here.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/436022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 15:16:02 +00:00
sgjesse@chromium.org
eb4d261e24 Remove the different length string types
The different length string types was used to encode the string length and the hash in one field. This is now split into two fields one for length and one for hash. The hash field still encodes the array index of the string if it has one. If an array index is encoded in the hash field the string length is added to the top bits of the hash field to avoid a hash value of zero.

On 32-bit this causes an additional 4 bytes to be used for all string objects. On 64-bit this will be half on average dur to pointer alignment.
Review URL: http://codereview.chromium.org/436001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 14:10:06 +00:00
ager@chromium.org
6ce4b10608 Re-enable all declarations in fast top-level compiler.
Disable fast top-level compiler for now because of issues 525 and 526.

Add regression test for issue 525.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 12:23:29 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
christian.plesner.hansen@gmail.com
ee7bab33a8 Hate. Hate. Hate.
Review URL: http://codereview.chromium.org/360005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 09:19:30 +00:00
christian.plesner.hansen@gmail.com
a1b2f47600 Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor
ics.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 08:51:48 +00:00
christian.plesner.hansen@gmail.com
1bc9d4857e Made rethrow test not depend on stack overflow behavior.
Review URL: http://codereview.chromium.org/345046


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 09:52:06 +00:00
christian.plesner.hansen@gmail.com
850487401d Added TryCatch::ReThrow method.
Review URL: http://codereview.chromium.org/342078


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 08:53:34 +00:00
erik.corry@gmail.com
dbd7f20d2d Introduce a switch for the new snapshot code and switch
it on by default.  Includes bug fixes for new snapshots.
Review URL: http://codereview.chromium.org/342054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 10:23:12 +00:00
antonm@chromium.org
6da43b7e4d Add a test which verifies that weak reference callbacks cannot be invoked while scavenging.
BUG=25819

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 23:06:59 +00:00
sgjesse@chromium.org
be769f6a24 Reverting 3159, 3151 and 3150
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/343035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 13:17:11 +00:00
erik.corry@gmail.com
55212d2e1d ARM still not quite right with new serialization code.
Review URL: http://codereview.chromium.org/339043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 14:28:20 +00:00
sgjesse@chromium.org
6768703d24 Derive string size constants
* The maximum length of short and medium sized strings is now derived from other constants.
* Remove the redundant String part of their names.
Review URL: http://codereview.chromium.org/347002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 13:10:36 +00:00
erik.corry@gmail.com
97de363ef5 * Fix new snapshot code on ARM.
Review URL: http://codereview.chromium.org/344011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:37:54 +00:00