keuchel@chromium.org
80d1b898fb
Fix gcc-4.6 warnings.
...
BUG=v8:1806
Review URL: http://codereview.chromium.org/8386072
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:59:01 +00:00
lrn@chromium.org
65b9ab93af
Merged Scanner and JavaScriptScanner.
...
JavaScriptScanner had become the only concrete subclass of Scanner, so there
was no longer a need for the distinction.
Also fixed up comments.
Review URL: http://codereview.chromium.org/8384003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 07:47:15 +00:00
lrn@chromium.org
30465596e6
Make eval consider anything on the form eval(args...) a potential direct cal
...
Previously we omitted all cases where the global eval property was shadowed,
even if by a variable holding the same value. ES5 requires us to treat these
as direct calls.
We still throw if calling indirect eval with a detached global object.
BUG=v8:994
TEST=mjsunit/eval.js
Review URL: http://codereview.chromium.org/8343054
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 09:38:52 +00:00
mstarzinger@chromium.org
d0ce626477
Fix identity hash code function to respect flag.
...
The flag passed to JSObject::GetIdentityHash() was not respected so far
and an indentity hash code was generated even when the flag requested
not to do so. This could lead to a rare corner cases (for which a test
case was added) where a GC request would have been dropped.
R=rossberg@chromium.org
TEST=cctest/test-dictionary
Review URL: http://codereview.chromium.org/8390047
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:23:40 +00:00
mikhail.naganov@gmail.com
fa0d4ecf43
The detailed heap snapshot generator was slightly adjusted for tracking sliced strings.
...
BUG=v8:1779
TEST=cctest/test-heap-profiler/HeapSnapshotSlicedString
Review URL: http://codereview.chromium.org/8362028
Patch from Ilya Tikhonovsky <loislo@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 13:05:37 +00:00
keuchel@chromium.org
666c4be29f
Reapply r9673 "Scope tree serialization and ScopeIterator cleanup."
...
This also includes the two fixes from r9674 and r9675. Here's the diff
to the previous CL.
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -11133,17 +11133,26 @@ class ScopeIterator {
context_(Context::cast(frame->context())),
nested_scope_chain_(4) {
+ // Catch the case when the debugger stops in an internal function.
+ Handle<SharedFunctionInfo> shared_info(function_->shared());
+ if (shared_info->script() == isolate->heap()->undefined_value()) {
+ if (shared_info->scope_info()->HasContext()) Next();
+ return;
+ }
+
// Check whether we are in global code or function code. If there is a stack
// slot for .result then this function has been created for evaluating
// global code and it is not a real function.
// Checking for the existence of .result seems fragile, but the scope info
// saved with the code object does not otherwise have that information.
- int index = function_->shared()->scope_info()->
+ int index = shared_info->scope_info()->
StackSlotIndex(isolate_->heap()->result_symbol());
// Reparse the code and analyze the scopes.
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
- Handle<SharedFunctionInfo> shared_info(function_->shared());
Handle<Script> script(Script::cast(shared_info->script()));
Scope* scope;
if (index >= 0) {
Review URL: http://codereview.chromium.org/8344046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:26:59 +00:00
kmillikin@chromium.org
e3792a6830
Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
...
R=ulan@chromium.org ,vegorov@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8357010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:08:53 +00:00
erik.corry@gmail.com
8f9721bbbf
Shave 39% from snapshot size.
...
Review URL: http://codereview.chromium.org/8344079
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:27:10 +00:00
keuchel@chromium.org
17cc6d313f
Revert 9673, 9674 and 9675 because of failing webkit tests.
...
This reverts commits
r9673: "Scope tree serialization and ScopeIterator cleanup."
r9674: "Use OS::SNPrintF instead of snprintf."
r9675: "Use int instead of size_t, StrLength instead of strlen."
Review URL: http://codereview.chromium.org/8353003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:15:02 +00:00
keuchel@chromium.org
96a2c24a16
Use int instead of size_t, StrLength instead of strlen.
...
Review URL: http://codereview.chromium.org/8339013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 10:08:33 +00:00
keuchel@chromium.org
69afd18e56
Use OS::SNPrintF instead of snprintf.
...
Review URL: http://codereview.chromium.org/8339011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 09:48:13 +00:00
keuchel@chromium.org
4e5643a648
Scope tree serialization and ScopeIterator cleanup.
...
The intention is to store enough scope information for the debugger to
handle stack allocation of block scoped variables introduced by
http://codereview.chromium.org/7860045/ .
This CL is based on
http://codereview.chromium.org/7904008/ .
Review URL: http://codereview.chromium.org/7979001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 08:46:46 +00:00
erikcorry
dac0b853e1
Improve speed of Utf8Write by always flattening the string first and
...
detecting the ASCII case. Also rewrite Utf8Length to work on an
unflattened string. Bug: http://code.google.com/p/v8/issues/detail?id=1665
Review URL: http://codereview.chromium.org/8304021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:48:31 +00:00
lrn@chromium.org
2bbf3bbee7
Make native syntax an early error in the preparser.
...
Previously the preparser always accepted natives syntax and let the
real parser throw the syntax error. In ES5, it should be an early error,
so the preparser must catch the error.
The perparser library does not expose parsing for natives syntax, it's
only used internally.
Review URL: http://codereview.chromium.org/8306024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:45:52 +00:00
ricow@chromium.org
fe74726099
Remove timeout test expectation for OutOfMemoryNested
...
This has already been fixed, we not actually use the constraints.
Review URL: http://codereview.chromium.org/8276029
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 09:10:29 +00:00
rossberg@chromium.org
1abf3ed0a4
Introduce collective --harmony flag.
...
Shorten --harmony-block-scoping to --harmony-scoping.
R=keuchel@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8226017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 12:23:06 +00:00
erik.corry@gmail.com
338ab857b9
Remove a static initializer that could potentially slow down startup time.
...
BUG=1753
Review URL: http://codereview.chromium.org/8198005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-07 14:41:08 +00:00
kmillikin@chromium.org
1f12cc4099
Simplify calling generated code from the runtime.
...
Instead of expecting Object** arrays at the outermost level, expect
Handle<Object> arrays and reinterpret_cast them only just before invoking
the generated code.
R=rossberg@chromium.org ,fschneider@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8133020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 09:31:38 +00:00
lrn@chromium.org
ebc0f85e40
Revert "Added ability to lock strings to prevent their representation or encoding from changing."
...
This reverts r9424.
Review URL: http://codereview.chromium.org/8143018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:09:34 +00:00
mstarzinger@chromium.org
9f06a99592
Fix compilation error and add missing file to GYP.
...
R=ricow@chromium.org
Review URL: http://codereview.chromium.org/8136004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 16:32:34 +00:00
fschneider@chromium.org
976d5f3797
Clean list of external references from internal objects like the hole value.
...
Review URL: http://codereview.chromium.org/8114032
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 09:07:50 +00:00
mikhail.naganov@gmail.com
3e4b4a6a86
Fix incorrect function name inference in case of assignment / global assignment.
...
R=kmillikin@chromium.org
BUG=v8:1732
TEST=test-func-name-inference/GlobalAssignmentAndCall,AssignmentAndCall
Review URL: http://codereview.chromium.org/8112007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 19:18:05 +00:00
kmillikin@chromium.org
a4e0103708
Clean up the x86 assembler API.
...
The API is inconsistent about when a register must be coerced to an operand
and when it can be used as a register. Simplify usage by never requiring it
to be wrapped.
R=fschneider@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8086021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 11:44:39 +00:00
vegorov@chromium.org
3e9891c1d0
Enable code flushing for full (non-incremental) collections.
...
This will ensure that we will flush code when we hit memory limits.
R=erik.corry@gmail.com
BUG=v8:1609
Review URL: http://codereview.chromium.org/8060053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 13:51:47 +00:00
yangguo@chromium.org
589ce7561a
Fixing test case from r9469.
...
Review URL: http://codereview.chromium.org/8038046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 14:26:23 +00:00
yangguo@chromium.org
fd575f7177
Fixed deadlock in the debugger agent in Windows.
...
BUG=v8:1723
TEST=cctest test-debug/DebuggerAgent
Review URL: http://codereview.chromium.org/8069002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 13:27:20 +00:00
jkummerow@chromium.org
8e5db73e7d
Add /bigobj parameter to cctest to make MSVS happy.
...
TEST=MSVS 2008 compiles cctest without warnings/errors.
Review URL: http://codereview.chromium.org/8052031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 09:13:30 +00:00
ricow@chromium.org
7810ff70f6
Make sure that we can't access hidden properties by installing accessors on Object.prototype.
...
BUG:chromium:97784
TEST=cctest/test-api
Review URL: http://codereview.chromium.org/8041020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 16:54:50 +00:00
ulan@chromium.org
16ae2551ae
Search prototypes for accessor setters if interceptor returns empty value.
...
Extract the part of SetPropertyForResult that searches the prototype chain
for accessor setters into a separate function SetPropertyInPrototypes.
Call this function in SetPropertyPostInterceptor.
This should fix both optimized and unoptimized cases because
the cache stub for storing with interceptor calls the runtime system.
BUG=v8:1636
TEST=cctest/test-api.cc/EmptyInterceptorDoesNotShadowAccessors
Review URL: http://codereview.chromium.org/7991007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:54:57 +00:00
mikhail.naganov@gmail.com
c05354ecc4
Add v8::HeapGraphNode::GetHeapValue method.
...
This allows getting a heap object by a heap snapshot node for further
inspection. Very useful for objects from bindings that mostly have
getter-provided fields.
R=vegorov@google.com
BUG=webkit/61179
TEST=test-heap-profiler/GetHeapValue,GetHeapValueForDeletedObject
Review URL: http://codereview.chromium.org/8046006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:38:29 +00:00
lrn@chromium.org
172c27a6ba
Added ability to lock strings to prevent their representation or encoding from changing.
...
Use string locking to ensure consistent representation of source string during JSON parsing.
Review URL: http://codereview.chromium.org/7977001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:14:41 +00:00
mstarzinger@chromium.org
7414229602
Fix compilation of GrowAndShrinkNewSpace on Mac.
...
R=jkummerow@chromium.org
BUG=v8:1707
TEST=cctest/test-heap/GrowAndShrinkNewSpace
Review URL: http://codereview.chromium.org/7989009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 16:40:07 +00:00
mstarzinger@chromium.org
190d8d671d
Cleanup and enable GrowAndShrinkNewSpace test case.
...
R=svenpanne@chromium.org
BUG=v8:1707
TEST=cctest/test-heap/GrowAndShrinkNewSpace
Review URL: http://codereview.chromium.org/7995004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 14:50:20 +00:00
fschneider@chromium.org
fd71ed8d36
Temporarily mark a test as timing out until the problem is found.
...
Review URL: http://codereview.chromium.org/7989003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:19:19 +00:00
danno@chromium.org
f48c9f6557
Basic support for tracking smi-only arrays on ia32.
...
Activated by the flag --smi-only-arrays
Currently not crankshaft support, using flag on non-ia32 platforms will lead to write barrier misses and crashes.
BUG=none
TEST=elements_kind.js
Review URL: http://codereview.chromium.org/7901016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 11:30:04 +00:00
fschneider@chromium.org
ad5ed43c13
Fix broken Windows build.
...
Review URL: http://codereview.chromium.org/7983033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:42:50 +00:00
fschneider@chromium.org
fdaadb78d6
Landing for miket@chromium.org: Add an optional source length field to the Extension constructor.
...
Original code review: http://codereview.chromium.org/7889046/
Review URL: http://codereview.chromium.org/7978028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:28:09 +00:00
erik.corry@gmail.com
14087f430d
Disable some tests while we hunt for the reasons behind them.
...
Review URL: http://codereview.chromium.org/7978022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 07:25:33 +00:00
mstarzinger@chromium.org
bffbcefffb
Fix new space shrinking to compute correct capacity.
...
R=vegorov@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace
Review URL: http://codereview.chromium.org/7983001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 15:35:36 +00:00
mstarzinger@chromium.org
86832d5924
Fix new space shrinking to reset from-space.
...
R=lrn@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace
Review URL: http://codereview.chromium.org/7976003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:37:40 +00:00
vegorov@chromium.org
ac36cb4504
Merge experimental/gc branch to the bleeding_edge.
...
Review URL: http://codereview.chromium.org/7945009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
yangguo@chromium.org
3439ab60f7
Correcting a bogus assert outdated since r9295.
...
Review URL: http://codereview.chromium.org/7909002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 12:47:06 +00:00
jkummerow@chromium.org
fcc2e65aad
Change global const handling to silently ignore redeclarations
...
and make window.{Infinity,NaN,undefined} read-only as per ES5
BUG=89490
TEST=mjsunit/const-redecl.js, mjsunit/undeletable-functions.js, es5conform, sputnik
Review URL: http://codereview.chromium.org/7811015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 12:00:30 +00:00
yangguo@chromium.org
327eb48ce6
Enable slices of external strings (in the tentative implementation).
...
TEST=cctest test-strings/SliceFromExternal, mjsunit/string-slices.js
Review URL: http://codereview.chromium.org/7832002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 11:10:01 +00:00
mikhail.naganov@gmail.com
b706cfce94
Eliminate the need for code delete events in CPU profiler.
...
Events are still generated for tick processor on performance testing
server to work, as soon as scripts will be updated, it will be safe
to remove code delete events emitting code.
R=erik.corry@gmail.com
BUG=v8:1466
TEST=existing tests in test-profile-generator,test-cpu-profiler and mjsunit/tools
Review URL: http://codereview.chromium.org/7864017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 11:47:03 +00:00
kmillikin@chromium.org
63bec78428
Revert "MIPS: port Remove in-loop tracking for call ICs."
...
Committed incorrectly.
TBR=ricow@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7890026
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 08:08:16 +00:00
kmillikin@chromium.org
f9e2922b12
MIPS: port Remove in-loop tracking for call ICs.
...
port r9260 (af9cfd83).
Original commit message:
We passed this flag around in a lot of places and had differenc call
ICs based on it, but never did any real specialization based on its
value.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7886028
Patch from Paul Lind <plind44@gmail.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 08:04:47 +00:00
mikhail.naganov@gmail.com
f8e5c71e18
Rename SmartPointer to SmartArrayPointer.
...
As pointed out in: http://codereview.chromium.org/7754007/#msg5
"SmartPointer should have been named SmartArrayPointer as it expects an input
allocated using new[] and deallocates it using delete[]. Using it as a simple
scoped pointer for a single object is incorrect."
R=mnaganov@chromium.org
Review URL: http://codereview.chromium.org/7860011
Patch from Thiago Farina <tfarina@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-09 22:39:47 +00:00
ricow@chromium.org
b8cbe08fcc
Fix presubmit errors caused by updated depot tools
...
This is all blank line before/after linting errors.
Review URL: http://codereview.chromium.org/7754022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 19:57:14 +00:00
lrn@chromium.org
c1dc429c02
Fix bug in collector.
...
Small cleanups in preparser.
TEST=cctest/test-utils/SequenceCollectorRegression
Review URL: http://codereview.chromium.org/7754014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 13:44:11 +00:00