Commit Graph

192 Commits

Author SHA1 Message Date
kmillikin@chromium.org
2d7d89d831 Get rid of the notion of "parameter pointer" that no longer exists in
the implementation but still lives on in comments and identifier
names.

Where it was used, it has been changed to "caller's stack pointer".
Review URL: http://codereview.chromium.org/118500

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 15:08:25 +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
sgjesse@chromium.org
8ed81aca8a Improve debugger property lookup.
before performing debugger property lookup make sure the current context is set to the context active before the debugger was entered.

Make the use of the LookupResult GC safe in debugger property lookup.
Review URL: http://codereview.chromium.org/115855

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-28 11:30:54 +00:00
erik.corry@gmail.com
01f7c87f22 This patch much improves our tracking of whether function is
called from within a loop or not.  In the past we lost the
information if a call site went megamorphic before a lazily
compiled callee was called for the first time.  Now we track
that correctly (this is an issue that affects richards).
We still don't manage to track the in-loop state through a
constructor call, since constructor calls use LoadICs instead
of CallICs.  This issue affects delta-blue.  So in this patch
we assume that lazy compilations that don't happen through a
CallIC happen from inside a loop.  I have an idea to fix this
but this patch is big enough already.
With our improved tracking of in-loop state I have switched
off the inlining of in-object loads for code that is not in
a loop.  This benefits compile speed.  One issue is that
eagerly compiled code now doesn't get the in-object loads
inlined.  We need to eagerly compile less code to fix this.
Review URL: http://codereview.chromium.org/115744

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 18:29:02 +00:00
yurys@chromium.org
6e29fadb72 When inspecting a function with a native getter return result of execution of the getter function in the client context. This is useful for debugging DOM elements.
Review URL: http://codereview.chromium.org/113821

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 15:07:21 +00:00
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
sgjesse@chromium.org
3e76ba9a78 Propagate information on whether a non function was called as constructor or not.The Arguments object passed to the callback now has IsConstructCall set accordingly.BUG=http://crbug.com/3285
Review URL: http://codereview.chromium.org/113634

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 19:33:44 +00:00
lrn@chromium.org
0920be9524 X64: Disabled RSet in 64-bit mode.
Made a few more places use intptr_t instead of int for pointer arithmetic.
Ensure that objects have a declared size that matches heap object alignment.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 08:05:12 +00:00
erik.corry@gmail.com
421b501fdb Add 2 asserts in search-replace implementation.
Review URL: http://codereview.chromium.org/115507

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 09:11:30 +00:00
lrn@chromium.org
2ff3901cf7 Fix for issue 349: Make initial boundary check for BM text search.
There was a case where the BMH algorithm bailed out exactly at the end of the string, and the BM algorithm that takes over wasn't expecting this.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 09:01:03 +00:00
sgjesse@chromium.org
5a82d8e3d4 Remove unused parameter.
Review URL: http://codereview.chromium.org/113523

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 13:16:48 +00:00
sgjesse@chromium.org
94879a93b0 Add a script cache to the debugger
When loaded scripts are requested this cache is filled with all the script objects in the heap. Hereafter its content is kept in sync with the active scripts in the heap through the notifications of new scripts compiled and by using weak handles to get notified when a script is collected.

Through the tracking of collected scripts the debugger event OnScriptCollected have been added to notify a debugger that a script previously returned through the scripts command is no longer in use.

Make the ComputeIntegerHash globally available.

Moved clearing of the mirror cache to when debugger is really left. Previously recursive invocations of the debugger cause the mirror cache to be cleared causing handles to become either stale or reference other objects.
Review URL: http://codereview.chromium.org/115462

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 13:14:37 +00:00
ager@chromium.org
57da353113 Consistently use CompilationZoneScope instead of ZoneScope to ensure
that the FrameElement constants list gets cleared.
Review URL: http://codereview.chromium.org/115352

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 13:17:28 +00:00
lrn@chromium.org
142fe3431a X64: General fixes - added inline definitions and changed some places to intptr_t.
Review URL: http://codereview.chromium.org/113199


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 10:33:40 +00:00
erik.corry@gmail.com
a3b2c7cf55 Fix intermittent crashes caused by unexpected GCs in
HasLocalProperty (bug introduced in r1882 et al.)
Review URL: http://codereview.chromium.org/115106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-08 12:39:37 +00:00
erik.corry@gmail.com
275a27d6bd Fix Chromium bug 1717 by emulating JSCs somewhat strange hidden
prototypes on some built in types.
Review URL: http://codereview.chromium.org/109004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-06 12:54:57 +00:00
yurys@chromium.org
beb5161b84 Add function inferred name to FunctionMirror and its json representation.
Review URL: http://codereview.chromium.org/109026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 18:12:03 +00:00
erik.corry@gmail.com
ad23017469 When strings can change from an ASCII representation to a
UC16 representation we need to be careful about flat strings.
Flat strings can be sliced or cons strings that have a flat
string under them, so when we ask a flat cons or a slice whether
it is ASCII or not we should ask the underlying string about
its representation.  This should fix
http://code.google.com/p/chromium/issues/detail?id=10971
Review URL: http://codereview.chromium.org/100249

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 11:16:29 +00:00
lrn@chromium.org
83d1d02df7 Made sort on non-arrays also affect elements on the prototype, for JSC compatability.
Made sort on non-objects with inherited elements JSC compatible.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 10:06:55 +00:00
lrn@chromium.org
889eac7f13 Fix Issue 326. Handle sorting of non-array objects correctly.
Change handling of sorting to be the same for all JS-arrays.
Collect undefined values as well while removing holes.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 11:16:59 +00:00
christian.plesner.hansen@gmail.com
4a909a7a62 - When cloning maps to set the 'lazy loading' bit remember to clone
the properties as well.  This fixes some failing tests.
- Moved json parsing into native code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:45:29 +00:00
christian.plesner.hansen@gmail.com
d26e6dd0b4 force-set
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:11 +00:00
feng@chromium.org
19c95ff39a Fix style issues caught by presubmit script.
TBR = erikcorry

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 17:44:39 +00:00
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36:13 +00:00
sgjesse@chromium.org
f5eb2cbe65 Remove unused runtime function.
The CompileScript runtime function is not used by any builtins any more.
Review URL: http://codereview.chromium.org/80003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 12:15:27 +00:00
ager@chromium.org
59d4539f38 If an external string enters the symbol table, make sure to set the
resource to NULL when removing it from the symbol table.  This makes
sure that the debugger can recognize the external string as being
"deleted".  Now, whenever an external resource is deleted, the
resource pointer is set to NULL.

This is really a workaround of a debugger problem.  We need to make
sure that the debugger only finds scripts in the heap that are
actually live.
Review URL: http://codereview.chromium.org/69029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 09:17:04 +00:00
iposva@chromium.org
e05c2e3693 Start addressing massive arrays on the stack. There is hardly ever
a reason to stack allocate large chunks of stack space.
- Runtime_GetCFrames used to allocate a frame size of 52040 bytes.
- PreallocatedMemoryThread::Run used to allocate 32784 bytes.
- Fixed StringStream overflow conditions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 21:01:05 +00:00
erik.corry@gmail.com
4d18959446 Avoid a call to the runtime system when doing binary fp ops on ARM
(at the moment only if we do not need to allocate a heap number).
Find a few more oportunities to avoid heap number allocation on IA32.
Add some infrastructure to test coverage of generated ARM code in our
tests.
Review URL: http://codereview.chromium.org/67163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 09:30:23 +00:00
mikhail.naganov@gmail.com
3c2a7bdf21 Add name inference for anonymous functions to facilitate debugging and profiling of JS code.
Currently function name inference is wired with AST optimization pass to avoid introducing another pass over AST. A better solution would be to rewrite AST visitors so they can be naturally combined together in a single pass, as their current implementation doesn't allow it.

For examples of cases where function names can be inferred, see the tests file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 00:51:59 +00:00
mikhail.naganov@gmail.com
d3c4a658f9 Fix issue 289: check external source strings validity in Runtime_DebugGetLoadedScripts
Review URL: http://codereview.chromium.org/56002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 11:22:52 +00:00
lrn@chromium.org
bd8816efb0 Moved String.prototype.match implementation to C++.
Some extra runtime assertions added.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:14:10 +00:00
ager@chromium.org
d4e6613760 Fix bug in context stores, where the store was ignored if there was a
read-only property in the prototype chain.  Stores should only be
ignored if there is a read-only property on the object itself.
Review URL: http://codereview.chromium.org/42508

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:27:43 +00:00
erik.corry@gmail.com
aa81281b3d Reapply portability fixes, this time without 64 bit system bug.
Review URL: http://codereview.chromium.org/52010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 12:37:53 +00:00
olehougaard
a8c50151fc Reapply revisions 1432, 1433, 1469 and 1472 while fixing issue 279.
Review URL: http://codereview.chromium.org/48006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 07:27:47 +00:00
erik.corry@gmail.com
80ce1b2500 Reverse latest build tweaks since they fail on some 64 bit systems
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 17:01:15 +00:00
erik.corry@gmail.com
77b963ca04 More compatibility changes.
Review URL: http://codereview.chromium.org/47004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 16:37:18 +00:00
ager@chromium.org
2fcad0aec1 Revert change 1509 that flush ICs when adding setters on an object or
when setting a __proto__ to an object that holds a setter.

This seems to cause a major page load regression, so we need to tune
the clearing.
Review URL: http://codereview.chromium.org/50011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 15:06:00 +00:00
lrn@chromium.org
c918bec9df Reuse output array instead of creating a new one for each call in Date.parse
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 09:40:38 +00:00
erik.corry@gmail.com
b37b9af182 Spolling.
Review URL: http://codereview.chromium.org/42327

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 09:12:24 +00:00
lrn@chromium.org
89f466659c Flatten strings before parsing them as Date strings, and work on Vector of chars instead.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 13:27:21 +00:00
sgjesse@chromium.org
37d7dcd20c Add thread information to the debugger.
Each thread running V8 code is assigned an id in thread local storage the first time V8 code is run in it. The thread information returned to the debugger contains the number of threads, the id of each of these threads and which one is the current thread.

Added a threads command to the developer shell debugger for showing information on threads.
Review URL: http://codereview.chromium.org/48009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 11:40:47 +00:00
erik.corry@gmail.com
223ea84e56 Lint...
Review URL: http://codereview.chromium.org/42276

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 10:46:53 +00:00
erik.corry@gmail.com
608a99a90c Remove all uses of StringShape variables, since that has proven
to be error-prone and of little benefit in terms of performance.
Review URL: http://codereview.chromium.org/45010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 09:33:06 +00:00
lrn@chromium.org
014f0fd841 ReplaceRegExpWithString: Avoid extending handle scope by adding scope inside loop.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 09:49:14 +00:00
erik.corry@gmail.com
99063fe0f8 Fix GC related crash bug in search-replace.
Review URL: http://codereview.chromium.org/42214

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 22:28:26 +00:00
erik.corry@gmail.com
3aa57f7f65 Revert 1432, 1433, 1469 and 1472 due to a bug with literal objects.
Review URL: http://codereview.chromium.org/46088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 16:18:20 +00:00
christian.plesner.hansen@gmail.com
8dffcb9efa Flush ICs when adding setters to an object or setting a __proto__ to
an object that holds a setter.  If there are no store ics then no
flushing is done.  The implementation has been tweaked so that no ICs
are cleared during normal context creation.
This may cost us some performance but I'm submitting it as it is and
if there are problems we can either decide to be smarter about when,
what and/or how we clear, or back this change out altogether.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:43:07 +00:00
lrn@chromium.org
e2af4529c3 String.replace implemented in C++.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 10:22:38 +00:00
erik.corry@gmail.com
912c8eb03a * Reapply revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge, reverted in 1429.
* Fix of $1 accessor on sliced strings.
* Fix of lastParen method when last parenthesis did not match.
Review URL: http://codereview.chromium.org/43075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 14:00:55 +00:00
olehougaard
860508f3e2 Optimizing generation of nested literals for both object and array literals.
Review URL: http://codereview.chromium.org/40295

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:59:00 +00:00