adamk@chromium.org
9139e1a864
This patch implements optimized objectInfo structure which manages the set of observers associated with an object and the changeRecord types which they accept.
...
Observation in the normal case (Object.observe, default accept types, one observer) now allocates fewer objects and unobservation no longer needs to scan and splice an InternalArray -- making the combined speed of observe/unobserve about 200% faster.
This patch implements the following optimizations:
-objectInfo is initially created without any connected objects or arrays. The first observer is referenced directly by objectInfo, and when a second observer is added, changeObservers converts to a mapping of callbackPriority->observer, which allows for constant time registration/de-registration.
-observer.accept and objectInfo.performing are conceptually the same data-structure. This is now directly represented as an abstract "TypeMap" which can later be optimized to be a smi in common cases, (e.g: https://codereview.chromium.org/19269007/ ).
-objectInfo observers are only represented by an object with an accept typeMap if the set of accept types is non-default
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/19541010
Patch from Rafael Weinstein <rafaelw@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 18:13:54 +00:00
hpayer@chromium.org
f0f3ddc5c7
Check that AllocationMementos never get scavengend.
...
BUG=
R=mstarzinger@chromium.org , mvstanton@chromium.org
Review URL: https://codereview.chromium.org/24052003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 17:29:39 +00:00
yangguo@chromium.org
534434e616
a small fix: DependentCode contains check against related dependency group
...
BUG=
R=ulan@chromium.org , yangguo@chromium.org
Review URL: https://codereview.chromium.org/23648009
Patch from Weiliang Lin <weiliang.lin2@gmail.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 16:41:46 +00:00
mstarzinger@chromium.org
1c91d00bf7
Remove V8_WARN_UNUSED_RESULT for simple getters.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/23629031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 15:03:17 +00:00
mstarzinger@chromium.org
448d98e19d
Use raw-to-handle trampoline in [Get/Set]HiddenPropertiesHashTable.
...
R=danno@chromium.org
Review URL: https://codereview.chromium.org/23629040
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 14:33:06 +00:00
dcarney@chromium.org
47e86b889e
Get rid of most uses of 'Temporary macro' HEAP
...
R=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23708030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 14:30:36 +00:00
dcarney@chromium.org
ce687e4bed
thread isolate for DebugMessage
...
R=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23904012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 14:26:07 +00:00
rodolph.perfetta@gmail.com
2846d9f394
ARM: replace RegExpCEntryStub with DirectCEntryStub.
...
RegExpCEntryStub is therefore removed.
BUG=none
TEST=none
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/23468015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 13:50:26 +00:00
bmeurer@chromium.org
7bb320087b
Fix clang C++11 compiler warning.
...
TBR=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/23658034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 13:39:53 +00:00
olivf@chromium.org
3483c257d2
Revert TranscendentalCacheStub changes in r16615.
...
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/23889013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 13:28:21 +00:00
olivf@chromium.org
f1b908d566
Move ToInt conversions to the MacroAssembler for x64
...
+ Prevent truncating TaggedToI from bailing out.
(This is a port of r16464)
BUG=
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/23938003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 12:37:30 +00:00
bmeurer@chromium.org
7f0f84c0a5
Fix MSVC compiler warning after commit r16612.
...
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/23534052
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:33:14 +00:00
svenpanne@chromium.org
527152aa5c
Initialize forgotten Isolate member.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/23769008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:32:15 +00:00
bmeurer@chromium.org
eb381b9444
Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context.
...
The RandomNumberGenerator is a pseudorandom number generator
with 48-bit state. It is properly seeded using either
(1) the --random-seed if specified, or
(2) the entropy_source function if configured, or
(3) /dev/urandom if available, or
(4) falls back to Time and TimeTicks based seeding.
Each Isolate now contains a RandomNumberGenerator, which replaces
the previous private_random_seed.
Every native context still has its own random_seed. But this random
seed is now properly initialized during bootstrapping,
instead of on-demand initialization. This will allow us to cleanup
and speedup the HRandom implementation quite a lot (this is delayed
for a followup CL)!
Also stop messing with the system rand()/random(), which should
not be done from a library anyway! We probably re-seeded the
libc rand()/random() after the application (i.e. Chrome) already
seeded it (with better entropy than what we used).
Another followup CL will replace the use of the per-isolate
random number generator for the address randomization and
thereby get rid of the Isolate::UncheckedCurrent() usage in
the platform code.
TEST=cctest/test-random-number-generator,cctest/test-random
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/23548024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:13:55 +00:00
loislo@chromium.org
f6b7ec4da0
HeapProfiler: very slow ~4min "take snapshot time" for 80MB gmail heap.
...
The reason of that is a number of cons strings in the app.
The app constructs a json string and as a result v8 heap has
a very long chain of cons strings.
Profiler counts all these strings as plain String objects and
assign the content of the strings as node names.
It required O(n^2) time and O(n^2) memory.
Solution: I introduced two new types, kConsString and kSliced string.
They do not use the content of the string for names. So the problem disappeared.
The heap profiler usability problem will be solved on Blink side.
BUG=285770
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/23460027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:12:35 +00:00
titzer@chromium.org
8b280df422
Remove unused method HType::IsTagged().
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/24087004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:11:26 +00:00
yangguo@chromium.org
5a5f863f13
Fix concurrent osr.
...
InstallOptimizedCode aquires ownership on the compilation info and deletes
it on return, tearing down the attached zone. The OptimizingCompiler
object is a zone object allocated in just that zone, so it also gets
deleted. Effectively, InstallOptimizedCode cleans up when it's done, so
the OptimizingCompiler object it receives is invalidated afterwards.
R=titzer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23769007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 11:09:22 +00:00
svenpanne@chromium.org
4ef84b9240
Add a ResourceConstraint for the embedder to specify that V8 is running on a memory constrained device.
...
This enables us to specialize certain operations such that we limit memory
usage on low-memory devices, without reducing performance on devices which
are not memory constrained.
BUG=chromium:280984
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/23464022
Patch from Ross McIlroy <rmcilroy@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 10:57:00 +00:00
svenpanne@chromium.org
d9bc6f7078
Move Maybe template into v8.h so it can be used by SetResourceConstraints
...
BUG=
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/23767009
Patch from Ross McIlroy <rmcilroy@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 10:53:33 +00:00
dcarney@chromium.org
dcc93c9144
restore persistent dtor
...
R=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23581010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 09:24:53 +00:00
svenpanne@chromium.org
d571a91e4a
Remove HandleScope default ctor.
...
BUG=chromium:236173
R=bmeurer@chromium.org , svenpanne@chromium.org
Review URL: https://codereview.chromium.org/23530045
Patch from Marja Hölttä <marja@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 06:43:23 +00:00
bmeurer@chromium.org
24a0cabddc
Use PAGE_NOACCESS for guard pages in Windows.
...
Up until now we used PAGE_GUARD for guard pages in Windows, which
will raise a STATUS_GUARD_PAGE_VIOLATION exception on first access
and grant regular access afterwards. This behavior is required to
implement automatic stack checking, or more generally to implement
applications that monitor the growth of large dynamic data structures.
However, this is not what we want for our guard pages, which are
used as a security mechanism. What we really want is PAGE_NOACCESS
here, which is the Windows-equivalent of PROT_NONE that we use on
all other platforms.
R=cdn@chromium.org
Review URL: https://codereview.chromium.org/23458022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 05:54:15 +00:00
mstarzinger@chromium.org
9f56581fac
Enable escape analysis for Hydrogen.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/23458036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 17:12:59 +00:00
olivf@chromium.org
12b250bf04
Extend assembler and codegen with more fpu arithmetic
...
BUG=
R=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/21509003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 16:57:35 +00:00
titzer@chromium.org
49d9555a97
Generate a custom OSR entrypoint for OSR compiles on all platforms, and transition to optimized code using the special entrypoint, instead of through the deoptimizer. Do not install the OSR compiled code as _the_ optimized code for a function.
...
Remove OSR-related stuff from deoptimizer.
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/21340002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 16:34:40 +00:00
yangguo@chromium.org
01e913e874
Correctly stringify mixed encoding indirect strings.
...
R=verwaest@chromium.org
BUG=287476
Review URL: https://codereview.chromium.org/23480051
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 16:15:40 +00:00
dcarney@chromium.org
33fbaaf772
put js accessor ics behind a flags until fixed
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23816009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 15:03:03 +00:00
palfia@homejinni.com
e5eaef56d2
MIPS: thread isolate for HConstant::handle.
...
Port r16587 (45fc067)
BUG=
Review URL: https://codereview.chromium.org/23444041
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 15:02:41 +00:00
mstarzinger@chromium.org
1a26455d22
Handlify JSObject::EnsureCanContainHeapObjectElements method.
...
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/23818005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 14:29:47 +00:00
dslomov@chromium.org
a649a3a254
Prepare push to trunk. Now working on version 3.21.13.
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/23684035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 11:50:28 +00:00
dcarney@chromium.org
3d855d4707
remove commented out code in v8.h
...
TBR=dslomov@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23676007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 10:26:25 +00:00
dcarney@chromium.org
8fa8ca8b1a
temporarily remove persistent destructor to allow trunk push
...
TBR=dslomov@chromium.org
BUG=
Review URL: https://codereview.chromium.org/24023004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 10:10:26 +00:00
mstarzinger@chromium.org
ba48f3bd8c
Consider out-of-bounds accesses as escaping uses.
...
R=titzer@chromium.org
TEST=mjsunit/compiler/escape-analysis
Review URL: https://codereview.chromium.org/23892007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 09:53:58 +00:00
dcarney@chromium.org
66c8b527e8
new persistent semantics
...
adds copying and autodispose as traits
R=marja@chromium.org , mstarzinger@chromium.org , svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23401003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 09:25:23 +00:00
dcarney@chromium.org
7983023682
thread isolate for HConstant::handle
...
R=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/24027004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:57:23 +00:00
dcarney@chromium.org
c20f87a654
add uncached Function::New
...
TBR=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/24071002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:52:52 +00:00
dcarney@chromium.org
5b0a281604
revert 16584 for breaking build
...
TBR=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23680014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:16:24 +00:00
dcarney@chromium.org
ddc5d437bb
add uncached Function::New
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/23561007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:08:34 +00:00
bmeurer@chromium.org
d4d66a712e
Replace uses of MUST_USE_RESULT by V8_WARN_UNUSED_RESULT in ElapsedTimer.
...
R=bmeurer@chromium.org
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Review URL: https://codereview.chromium.org/23523034
Patch from Thiago Farina <tfarina@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 05:44:54 +00:00
machenbach@chromium.org
119b59ac5d
Increase test timeout on slow architectures.
...
BUG=
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/24037002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-08 19:50:55 +00:00
prybin@chromium.org
48cae75df8
Debug: parameterize 'step over' action with a frame where the step must be performed
...
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/23533015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-08 19:05:29 +00:00
palfia@homejinni.com
070d18f9ca
MIPS: store ics for js api accessors.
...
Port r16571 (9266312)
BUG=
Review URL: https://codereview.chromium.org/23780003
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 17:21:27 +00:00
jkummerow@chromium.org
daee0d83db
Fix bitwise negation on x64
...
BUG=chromium:285355
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/24037003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 15:21:38 +00:00
mstarzinger@chromium.org
d4e60458a9
Disable recently added failing InitializeAndDisposeOnce test.
...
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/23542010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 13:52:59 +00:00
svenpanne@chromium.org
e43e483143
Some thread data simplifications.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/24036002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 13:18:26 +00:00
rodolph.perfetta@gmail.com
82f0649c76
ARM: Improve integer multiplication.
...
TEST=test/mjsunit/lithium/MulI.js
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/23452022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 13:12:46 +00:00
verwaest@chromium.org
e25e6ab25d
Let BuildStore/BuildLoad distinguish between keyed/named load/stores.
...
R=bmeurer@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23537024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 13:06:39 +00:00
bmeurer@chromium.org
b256475512
It should break out while loop once page_has_scan_on_scavenge_flag is found, there is no need check all of the items in the list.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/23597017
Patch from Bangfu Tao <bangfu.tao@samsung.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 12:25:46 +00:00
svenpanne@chromium.org
f5f47208b1
Fixed 2 space leaks in CreateMemmoveFunction, finally making valgrind happy.
...
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/23714007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 11:41:02 +00:00
verwaest@chromium.org
18f6577bad
Properly filter types using the initial map from HAllocate.
...
R=mstarzinger@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23615012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 11:32:46 +00:00