Commit Graph

8768 Commits

Author SHA1 Message Date
yangguo@chromium.org
2b5e6bae60 Fix --hydrogen-stats.
Timing happens in a scope.  Since crankshaft has been chopped up into three methods, this approach is wrong.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11411065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 14:20:57 +00:00
mstarzinger@chromium.org
f9bc4d3bf2 Fix clang build: remove unused static function
The last call to GetOwnPropertyImplementation() was removed in r12990.

Review URL: https://codereview.chromium.org/11411038
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 09:46:58 +00:00
rossberg@chromium.org
3e8047ec88 Fix sequence point bug.
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11308090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 09:43:56 +00:00
yangguo@chromium.org
515c556150 Prepare push to trunk. Now working on version 3.15.5.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11316047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 14:41:06 +00:00
yangguo@chromium.org
d2a6e7b40d Fix test failures.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11414030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 14:24:19 +00:00
svenpanne@chromium.org
2f5c768534 Drastically reduce the number of created strings in d8.
This also reduces the number of TLS accesses, so it is a double-win. We have
230k less TLS accesses while running Octane now, so we are down to 23% now
compared to the start of these TLS-related CLs.

Introduced a tiny helper function for throwing on the way.

Review URL: https://codereview.chromium.org/11417029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 13:30:43 +00:00
rossberg@chromium.org
8d79ff46d0 Clean-up refactoring to eliminate GetLocalElementKind.
Eliminates substantial amounts of fragile code duplication and special casing.

Also fixes "a".propertyIsEnumerable(0) to correctly return true.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11420011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 13:28:34 +00:00
mstarzinger@chromium.org
3d1582c474 Fix Array.prototype.join evaluation order.
R=yangguo@chromium.org
BUG=v8:2263
TEST=mjsunit/regress/regress-2263

Review URL: https://codereview.chromium.org/11280025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 12:45:23 +00:00
yangguo@chromium.org
af6f7742e0 Fix test failures.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11299033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 11:58:21 +00:00
yangguo@chromium.org
63f109aaa5 Introduce helper functions to test parallel recompilation.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11419012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 10:57:50 +00:00
jkummerow@chromium.org
7f824867f6 Perform CPU sampling by CPU sampling thread only iff processing thread is not running.
- perform CPU profiler sampling in the sampler thread as we used to;
- skip sampling in the sampling thread if processing thread is running;
- only install SIGPROF handler when CPU profiling is enabled.

BUG=v8:2364

Review URL: https://codereview.chromium.org/11231002
Patch from Sergey Rogulenko <rogulenko@google.com> and Andrey Kosyakov <caseq@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 10:38:10 +00:00
rossberg@chromium.org
2e76922c79 Object.observe: Use [[DefineOwnProperty]] to create properties of changeRecord.
Note: The test here requires https://codereview.chromium.org/11364237/ to land in order to pass because Object.freeze calls Object.getOwnPropertyNames().

BUG=v8:2411

Review URL: https://codereview.chromium.org/11377171
Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 09:35:27 +00:00
rossberg@chromium.org
af824eab8f When using an Object as a set in Object.getOwnPropertyNames, null out the proto
Also apply the same fix elsewhere in v8natives.js

BUG=v8:2410

Review URL: https://codereview.chromium.org/11364237
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 09:32:39 +00:00
jkummerow@chromium.org
d9ba8ed8a1 Fix register confusion in non-VFP3 BinaryOpStubs on ARM
Review URL: https://codereview.chromium.org/11413014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 08:54:01 +00:00
svenpanne@chromium.org
d5f589808d Removed a bunch of GetExistingThreadLocal calls by threading the Isolate.
For Octane, the number of calls go down from 7341629 to 1947880, i.e. they are
reduced by more than 73%. TLS access is not especially cheap, so this exercise
seems worthwhile.

Review URL: https://codereview.chromium.org/11412007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 08:38:11 +00:00
mstarzinger@chromium.org
5dec1423a4 Implement progress bar for large objects.
This implements incremental scanning of large objects using a progress
bar in the page header of such objects. Note that this requires forward
white to gray transitions in the write barrier and hence is disabled by
default for now.

R=ulan@chromium.org,hpayer@chromium.org

Review URL: https://codereview.chromium.org/11362246

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 17:57:40 +00:00
verwaest@chromium.org
4ce6de208d Return the length as smi.
Review URL: https://chromiumcodereview.appspot.com/11419011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 16:16:09 +00:00
mvstanton@chromium.org
1d966af2e9 Fix assert failure in array slice
R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11412005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 15:41:12 +00:00
verwaest@chromium.org
97c54506c5 Fix shifting from holey arrays.
Review URL: https://chromiumcodereview.appspot.com/11417007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 15:27:06 +00:00
verwaest@chromium.org
8535c6484d Set length only after retrieving the element succeeded
Review URL: https://chromiumcodereview.appspot.com/11417006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 14:30:01 +00:00
verwaest@chromium.org
111630350c Heap explorer: Show representation of strings.
* src/profile-generator.cc (V8HeapExplorer::GetSystemEntryName): For
  maps of strings, return a name that encodes the representation
  strategy used for the strings.
  (V8HeapExplorer::ExtractReferences): For strings, visit the maps as
  well, so that the user can see what representation is used for their
  strings.

See http://wingolog.org/pub/string-representations.png for an example of what it looks like.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11344021
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 13:35:05 +00:00
yangguo@chromium.org
3699616609 Rename SeqAsciiString
This is a straight rename:

NewRawAsciiString -> NewRawOneByteString
SeqAscii -> SeqOneByte

SeqOneByteString cannot yet take non-ascii data.

R=yangguo@chromium.org,
BUG=

Review URL: https://chromiumcodereview.appspot.com/11411005
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 13:31:27 +00:00
ulan@chromium.org
5df210bd35 MIPS: Add rotate-right instruction to hydrogen and use it instead of bitwise operations of the form ((x >>> i) | (x << (32 - i))).
Port r12855 (be965042)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11293140
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 12:41:35 +00:00
verwaest@chromium.org
a08194c83a Support all fast elements kinds in the major array operations.
Currently missing support for unshift.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11377132

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 12:19:14 +00:00
rossberg@chromium.org
4fb992a872 Object.observe: Handle oldValue for elements with accessors properly.
Extended ElementAccessor interface to allow querying PropertyType and
AccessorPair. Also added respective functionality to JSObject.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11358234

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 11:31:40 +00:00
yangguo@chromium.org
7fc1751821 Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11360251
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 10:29:11 +00:00
danno@chromium.org
4d23256cf9 MIPS: Add code again to allow reclaiming old unexecuted functions.
Port r12898 (69ff6e50)

Original commit message:
When code objects in the heap for FUNCTIONs and OPTIMIZED_FUNCTIONs are marked by the GC, their prologue is patched with a call to a stub that removes the patch. This allows the collector to quickly identify code objects that haven't been executed since the last full collection (they are the ones that sill contain the patch). The functionality is currently disabled, but can be activated by specifying the "--age-code".

BUG=
TEST=

Review URL: https://codereview.chromium.org/11358252
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 10:12:28 +00:00
mstarzinger@chromium.org
d6a31725b9 Add missing initialization for low survival rate period.
R=verwaest@chromium.org
BUG=v8:2403

Review URL: https://codereview.chromium.org/11419002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 09:25:40 +00:00
yangguo@chromium.org
2333f53128 Fix clang build after r12956
That change added a test which called the handlified version of JSObject::SetElement and didn't check the return value, but that method has a MUST_USE_RESULT annotation. This change removes the annotation for consistency with other handlified static methods (like SetProperty).

Review URL: https://chromiumcodereview.appspot.com/11359212
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 20:03:53 +00:00
rossberg@chromium.org
5e7b796479 Object.observe: Move notification of JSArray length changes to JSArray::SetElementsLength
The previous implementation in Accessors::ArraySetLength failed when array length was set through StoreIC_ArrayLength. But that stub and the accessor both delegate to JSArray::SetElementsLength, so moving the code there allows notifications to be sent in both cases.

Review URL: https://codereview.chromium.org/11275292
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 16:51:21 +00:00
jkummerow@chromium.org
1c086d1202 Lattice-based representation inference, powered by left/right specific type feedback for BinaryOps and comparisons
Review URL: https://chromiumcodereview.appspot.com/10837165

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 15:59:45 +00:00
verwaest@chromium.org
deae08bd23 Consolidate polymorphic calls due to elements transitions.
Review URL: https://chromiumcodereview.appspot.com/11359104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 12:10:51 +00:00
ulan@chromium.org
a590fff76b Output max incremental step delay in trace_gc_nvp.
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11377134

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 11:44:56 +00:00
ulan@chromium.org
74492ab2d4 Emit VMLA for multiply-add on ARM
Review URL: https://chromiumcodereview.appspot.com/11293061
Patch from Hans Wennborg <hans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 11:01:18 +00:00
yangguo@chromium.org
4783d3c31b Remove 'type' and 'arguments' properties from Error object.
R=svenpanne@chromium.org
BUG=v8:2397

Review URL: https://chromiumcodereview.appspot.com/11358214

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 09:14:47 +00:00
svenpanne@chromium.org
8a210a78c6 Unbreak MIPS part a bit.
Review URL: https://codereview.chromium.org/11293250

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 07:33:16 +00:00
danno@chromium.org
77c97eefbb Add atomics implementation for ThreadSanitizer v2 (https://sites.google.com/a/chromium.org/dev/developers/testing/threadsanitizer-tsan-v2)
BUG=128314

Review URL: https://chromiumcodereview.appspot.com/10965035
Patch from Alexander Potapenko <glider@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 21:38:00 +00:00
peter.rybin@gmail.com
bb53dc6890 Issue 2368: LiveEdit crashes when new object/array literal is added
Review URL: https://codereview.chromium.org/11191039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 19:13:27 +00:00
rossberg@chromium.org
92db2105e4 Object.deliverChangeRecords should remove the observer from activeObservers
To preserve ordering guarantees during end-of-turn delivery, Object.deliverChangeRecords needs to remove the delivered-to observer from the list of active observers.

The added test demonstrates this behavior.

Review URL: https://codereview.chromium.org/11410046
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 15:53:28 +00:00
rossberg@chromium.org
36c3d01589 Object.unobserve(obj, callback) now throws a TypeError when callback is not a function.
Review URL: https://codereview.chromium.org/11293248
Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 15:50:59 +00:00
rossberg@chromium.org
dcb6abd460 Restructure JSObject::SetElement for performance.
Wins back ~1500 points on Octane/Gameboy that we lost with
https://codereview.chromium.org/11365111 (CL 12900), presumably
by lowering register pressure and/or handlification overhead.
Hopefully benefits other regressions as well.

R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11275283

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 15:47:46 +00:00
yangguo@chromium.org
45007d96f4 Prepare push to trunk. Now working on version 3.15.4.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11369213

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 13:54:49 +00:00
svenpanne@chromium.org
673924413f Re-land rev. 12849 and 12868 (Heavy cleanup of the external pointer API + related fix).
Review URL: https://codereview.chromium.org/11365224

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 12:27:03 +00:00
mmassi@chromium.org
ce682a2489 Allow property indexes to refer to slots inside the object header.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11365221

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 11:07:04 +00:00
mvstanton@chromium.org
50bd6e9092 Revert change r12912 (http://code.google.com/p/v8/source/detail?r=12912) due to x64 perf issue
R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11312206

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 10:53:34 +00:00
yangguo@chromium.org
827f8919f4 Reverting r12937.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11293246

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 10:36:20 +00:00
yangguo@chromium.org
578a2c74bd Fix details in message formatting.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11360220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 09:01:43 +00:00
yangguo@chromium.org
c6b35d0310 Correctly handle uncaught exception objects.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11365200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 17:32:30 +00:00
ulan@chromium.org
acd3013d9d Speed up native error check.
BUG=148757
TEST=largeObj test from the bug is 2x faster.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11377100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 15:33:31 +00:00
yangguo@chromium.org
ce884e13e3 Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11361171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 14:57:59 +00:00
yangguo@chromium.org
693ee09cf3 Correctly check for stack overflow even when interrupt is pending.
BUG=v8:214

Review URL: https://chromiumcodereview.appspot.com/11362007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 14:56:25 +00:00
yangguo@chromium.org
4c27298d27 Collect stack trace on stack overflow.
BUG=v8:2394

Review URL: https://chromiumcodereview.appspot.com/11275186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 14:54:29 +00:00
mvstanton@chromium.org
69846ce69d Prepare push to trunk. Now working on version 3.15.3.
R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11366195

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 14:43:21 +00:00
svenpanne@chromium.org
073dfc0a6f Fixed Code::FindCodeAgeSequence logic, removing a dead method on the way.
Review URL: https://codereview.chromium.org/11364177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 13:27:36 +00:00
jkummerow@chromium.org
e8320f4f78 Function::GetScriptOrigin should supply sourceURL when script name is not available.
GetScriptOrigin is used for DevTools instrumentation.

If inspected call-site is inside "eval" then returned script name is "undefined". To fix this problem we can use the "nameOrSourceURL" method of script-wrapper.

This is a re-upload of https://codereview.appspot.com/6811090/ for the purpose of landing.

BUG=159413

Review URL: https://codereview.chromium.org/11312185
Patch from Eugene Klyuchnikov <eustas@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 12:34:18 +00:00
rossberg@chromium.org
92e783bc28 Minor cleanup and optimisation of element methods.
R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11365175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 11:08:34 +00:00
yangguo@chromium.org
4cca6c6081 Make formatting error message side-effect-free.
BUG=v8:2398

Review URL: https://chromiumcodereview.appspot.com/11359130

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 10:33:20 +00:00
yangguo@chromium.org
ef1b3d3a76 Fix length check in JSON.stringify.
R=verwaest@chromium.org
BUG=160010

Review URL: https://chromiumcodereview.appspot.com/11410031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 10:20:07 +00:00
hpayer@chromium.org
ea9b1306fe Refactoring incremental marking
BUG=

Review URL: https://codereview.chromium.org/11358177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 10:12:35 +00:00
rossberg@chromium.org
0e7306cc92 Implement Object.getNotifier() and remove Object.notify()
Updated all tests to use getNotifier or actual object mutation instead of notify, and added tests for new behavior of getNotifier.

Review URL: https://codereview.chromium.org/11369154
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 16:14:42 +00:00
svenpanne@chromium.org
237684fa45 Refactoring: Make emit_debug_code flag handling architecture-independent.
Review URL: https://codereview.chromium.org/11312165

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 13:43:48 +00:00
svenpanne@chromium.org
a28bc2fd97 Refactoring: Make predictable code flag handling architecture-independent.
Review URL: https://codereview.chromium.org/11359127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 13:10:10 +00:00
danno@chromium.org
92c6fe5c91 Disable code aging due to bugs.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/11361182

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 13:04:51 +00:00
rossberg@chromium.org
af7bfe0e27 Minimal implementation and tests of observable array methods
Bail out of any special-casing in array methods.
Further optimization is possible, but can be left for later.

Review URL: https://codereview.chromium.org/11369151
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 12:28:22 +00:00
svenpanne@chromium.org
130c4041c7 Keep the number of descriptors below DescriptorArray::kMaxNumberOfDescriptors even for accessors
Review URL: https://codereview.chromium.org/11362182

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 11:30:05 +00:00
rossberg@chromium.org
b72e5811e7 Object.observe: notify when element addition causes array growth
Review URL: https://codereview.chromium.org/11369135
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 10:57:54 +00:00
rossberg@chromium.org
127b944ab5 Fix InternalObjectHashTable to properly update table ref in observationState
The previous fix wasn't broad enough: it only fixed the reference for a single Context.

Review URL: https://codereview.chromium.org/11361172
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 10:51:35 +00:00
mvstanton@chromium.org
803d8eada1 Some improvements in register usage in lithium compilation of LoadKeyed/StoreKeyed operations.
BUG=

Review URL: https://codereview.chromium.org/11365084

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 10:21:07 +00:00
svenpanne@chromium.org
09666b60b8 Rollback of r12868, r12849 on bleeding_edge.
Fixed visibility attribute for GetPointerFromInternalField

Heavy cleanup of the external pointer API.

Review URL: https://codereview.chromium.org/11359125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 10:07:54 +00:00
mstarzinger@chromium.org
2d69a2b12e ES6: Add support for Set and Map clear method
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts, section
15.14.5.3 and 15.14.5.2

BUG=v8:2400

Review URL: https://codereview.chromium.org/11409002
Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 09:01:29 +00:00
yangguo@chromium.org
64da47559c Turn message property of the error object into a data property.
R=svenpanne@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11368142

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 08:22:02 +00:00
svenpanne@chromium.org
e4cbac8dfd Fixed assertion.
The name in question is not necessarily a symbol, so we have to use Equals instead of ==.

BUG=http://www.playescapegoat.com/

Review URL: https://codereview.chromium.org/11368141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 07:26:05 +00:00
danno@chromium.org
cc1d08bf33 Active code aging by default.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11293178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 17:31:45 +00:00
rossberg@chromium.org
2af4744889 Handle Object.observe notifications for setting Array.length
Also handles notification of deleted properties when an array
is truncated by setting length.

Review URL: https://codereview.chromium.org/11338048
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 16:12:12 +00:00
mstarzinger@chromium.org
a65e166aa7 Implement MarkIndependent(Isolate*) and MarkPartiallyDependent(Isolate*)
BUG=
TEST=cctest/test-api/IndependentWeakHandle

Review URL: https://codereview.chromium.org/11369131
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 15:01:26 +00:00
mstarzinger@chromium.org
36d128d7b8 Reshuffle an if() condition to not depend on an uninitialized value.
Node::class_id_ contains garbage for newly allocated (FREE) nodes. This patch
changes the code to first test the node state_, then (for non-FREE nodes),
class_id_, and not the other way around.

This does not affect the branch taken (i.e. the current code is correct),
but makes Valgrind and MSan happy.

Review URL: https://codereview.chromium.org/11362158
Patch from Evgeniy Stepanov <eugenis@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 14:40:55 +00:00
rossberg@chromium.org
c203f05474 Delivery logic for Object.observe
This CL has two parts: the first is the logic itself, whereby each observer callback is assigned
a "priority" number the first time it's passed as an observer to Object.observe(), and that
priority is used to determine the order of delivery.

The second part invokes the above logic as part of the API, when the JS stack winds down to
zero.

Added several tests via the API, as the delivery logic isn't testable from a JS test
(it runs after such a test would exit).

Review URL: https://codereview.chromium.org/11266011
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 13:44:59 +00:00
rossberg@chromium.org
8eb704257f Object.observe: Fixed missing case for turning off ICs.
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11358122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 13:15:54 +00:00
rossberg@chromium.org
fbc6e0d883 Object.observe: generate change records for indexed properties.
Details:
- Extend ElementAccessors with GetAttributes method.
- Add HasLocalElement, Get[Local]ElementAttribute methods to JSReceiver/JSObject.
- Otherwise, mirror implementation for named properties.

Cannot correctly handle the cases yet where an accessor is redefined or deleted.

Also fixed handling of object info table.

(Based on CL https://codereview.chromium.org/11362115/)

R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11365111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:58:08 +00:00
danno@chromium.org
0f0da437e2 Fix intptr_t/int32_t casting problem on Win64.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11369133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:53:15 +00:00
danno@chromium.org
bd4e114b8e Add code again to allow reclaiming old unexecuted functions.
When code objects in the heap for FUNCTIONs and OPTIMIZED_FUNCTIONs are marked by the GC, their prologue is patched with a call to a stub that removes the patch. This allows the collector to quickly identify code objects that haven't been executed since the last full collection (they are the ones that sill contain the patch). The functionality is currently disabled, but can be activated by specifying the "--age-code".

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/10837037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:18:11 +00:00
yangguo@chromium.org
943c10bb87 Rename kAsciiStringTag to kOneByteStringTag
This is just a rename. After commit, I'll begin with the semantic changes.
Until those are complete, kOneByteStringTag will have the same meaning as
kAsciiStringTag.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11293168
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:14:29 +00:00
mstarzinger@chromium.org
a31889e2de Fix slack tracking when instance prototype changes.
This fixes a corner case when the instance prototype of a function is
changed while inobject slack tracking is still in progress. This caused
the intial map to be unrelated for functions with the same shared info
and hence the shared construct stub is no longer generic enough to work
for all those functions.

R=danno@chromium.org
BUG=chromium:157019
TEST=mjsunit/regress/regress-crbug-157019

Review URL: https://codereview.chromium.org/11293059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 11:56:44 +00:00
danno@chromium.org
bbcfa17134 Use movw/movt on ARM to load constant roots
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11307012
Patch from Jay Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 10:32:39 +00:00
mstarzinger@chromium.org
8e7ae24b40 Fix disabling of code flusher while marking.
This fixes a corner case when the code flusher is disabled while
incremental marking is running. The list of candidates needs to be
evicted to prevent list fragments without a head floating around.

R=ulan@chromium.org
BUG=chromium:159140

Review URL: https://codereview.chromium.org/11366136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 10:26:50 +00:00
mstarzinger@chromium.org
e9efaf6c87 Revert r12889 due to Webkit test failures.
Pass the SIGPROF signal on to previously registered signal handler.

Regressions: Unexpected crashes (2)
  inspector/profiler/cpu-profiler-profiling-without-inspector.html
  inspector/profiler/cpu-profiler-profiling.html

R=danno@chromium.org

Review URL: https://codereview.chromium.org/11377052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 09:19:23 +00:00
danno@chromium.org
63ada1da1b Move vldr in DoLoadKeyedFastDoubleElement before the hole check
This reschedules instructions to better absorb VFP load latency.
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11363086
Patch from Rajeev Krithivasan <rkrithiv@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 21:38:46 +00:00
danno@chromium.org
17194b087e Pass the SIGPROF signal on to previously registered signal handler.
This enables the google-perftools SIGPROF signal handler to continue to work properly.

BUG=none

Review URL: https://codereview.chromium.org/11195045
Patch from William Chan <willchan@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 17:23:02 +00:00
rossberg@chromium.org
e059e64c98 Object.observe: include oldValue in change records,
plus more accurate distinction of different change types.

Required handlifying more code.

Also fixed a handlification bug in JSProxy::GetElementAttributeWithHandler.

R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11362115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 14:14:50 +00:00
ulan@chromium.org
101d64c1a6 Simplify some of the startup code for SubStringStub::Generate.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11098043
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 13:22:03 +00:00
danno@chromium.org
d079e3f937 Fix another casting problem in Win64
TBR=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11363121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 10:31:45 +00:00
danno@chromium.org
a7a63219fe Fix size_t/int casting problem on Win64 build
TBR=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11364121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 09:59:50 +00:00
danno@chromium.org
0fc9527abe Decouple allocation and creation of deopt tables
This makes it possible to calculate the future address of a deopt entry before it is possible to generate the deopt table.

Review URL: https://codereview.chromium.org/11275145

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 08:49:17 +00:00
mvstanton@chromium.org
85ac311a6e MIPS: Consolidated all the key store/load classes in the Hydrogen and Lithium space into just two: HLoadKeyed/HLoadKeyedGeneric and HStoreKeyed/HStoreKeyedGeneric LLoadKeyed/LLoadKeyedGeneric and LStoreKeyed/LStoreKeyedGeneric
Port r12839 (b8b7faa3)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11369110
Patch from palfia <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 08:37:58 +00:00
mstarzinger@chromium.org
e405ff84b4 ES6: Adding support for size to Set and Map
Section 15.14.5.10 and 15.16.5.7 in the October 26, 2012 ES6 draft,
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts

This adds a getter for "size" to Set.prototype and Map.prototype which reflects
the number of elements in the Set and Map respectively.

BUG=v8:2395

Review URL: https://codereview.chromium.org/11360089
Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 18:14:45 +00:00
mstarzinger@chromium.org
762c36b6fb Allow collection of DOM objects in minor GC cycles.
A design document: https://docs.google.com/a/google.com/document/d/16DeHrzkm3cO9XCPT1aK3Y5qgUxXB3RFmueqQWYmN2rI/edit

Performance & memory results: https://docs.google.com/a/google.com/document/d/1h0-EsHu7T0sSMuZm5eE0r1e8sCAzY3weLvsDUpOSngE/edit

The WebKit side patch: https://bugs.webkit.org/show_bug.cgi?id=98725

At present no one is using the V8 APIs this patch is going to add. After this patch is landed, the WebKit side patch will use it.

BUG=

Review URL: https://codereview.chromium.org/11085015
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 17:32:15 +00:00
mstarzinger@chromium.org
c54fc70f13 Store Object.observe state per-isolate rather than per-context
This requires adding a new JSObject to the strong root list and populating it from
object-observe.js. The main other change is that we now directly use ObjectHashTable
from JS rather than using WeakMap, since using the latter would end up leaking whichever
Context initialized that observation state.

Added a test via the API showing that different contexts all end up working on the same state.

Review URL: https://codereview.chromium.org/11274014
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 16:47:15 +00:00
rossberg@chromium.org
b80cbd7922 Object.observe: generate change records for named properties.
In more detail:
- Set observation bit for observed objects (and make NormalizedMapCache respect it).
- Mutation of observed objects is always delegated from ICs to runtime.
- Introduce JS runtime function for notifying generated changes.
- Invoke this function in the appropriate places (including some local refactoring).
- Inclusion of oldValue field is not yet implemented, nor element properties.

Also, shortened flag to --harmony-observation.

R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11347037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 12:32:36 +00:00
rossberg@chromium.org
beaccd74cb Object.observe: implement map bit and functions to access it.
R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11276028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 12:30:22 +00:00
verwaest@chromium.org
83378890eb Prepare push to trunk. Now working on version 3.15.2.
R=danno@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11362112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 12:10:54 +00:00
mstarzinger@chromium.org
03ba764f3e Put incremental code flushing behind a flag.
This is used to disable incremental code flushing by default for now
until we can stabilize it and make it ready for production.

R=verwaest@chromium.org
BUG=chromium:159140

Review URL: https://codereview.chromium.org/11367105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 11:54:05 +00:00
yangguo@chromium.org
85bda7bc09 Fix stack overflow for mac build.
R=ulan@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11358096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 18:39:59 +00:00
verwaest@chromium.org
f95d9502c3 Removed duplicate line.
Review URL: https://chromiumcodereview.appspot.com/11359055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 15:37:04 +00:00
yangguo@chromium.org
71688ba750 Reduce stack frame size in JSON.stringify.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11366087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 15:01:51 +00:00
verwaest@chromium.org
384ab895e8 Remove superfluous setting of bitfield3.
Review URL: https://chromiumcodereview.appspot.com/11367093

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 14:43:11 +00:00
svenpanne@chromium.org
6f9a75a449 Removed useless Canonicalize implementations subsumed by dead code elimination.
Review URL: https://codereview.chromium.org/11362085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 14:38:00 +00:00
svenpanne@chromium.org
50f6e07e67 Nano-refactoring: Simplify initialization
Review URL: https://codereview.chromium.org/11368078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 14:37:28 +00:00
ulan@chromium.org
f106c9c9f7 Add rotate-right instruction to hydrogen and use it instead of bitwise operations
of the form ((x >>> i) | (x << (32 - i))).

This CL is based on https://chromiumcodereview.appspot.com/10984057/
by Jay Conrod <dconrod@codeaurora.org>.

R=danno@chromium.org,mstarzinger@chromium.org,dconrod@codeaurora.org

Review URL: https://chromiumcodereview.appspot.com/11033005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 13:28:10 +00:00
mstarzinger@chromium.org
b77e629f1a Implement IsIndependent(Isolate*)
BUG=
TEST=cctest/test-api/IndependentWeakHandle

Committed: https://code.google.com/p/v8/source/detail?r=12852

Review URL: https://codereview.chromium.org/11368053
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 13:20:45 +00:00
yangguo@chromium.org
e452c10702 Add fast path for FastProperty objects in JSON.stringify.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11363078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 12:59:35 +00:00
mstarzinger@chromium.org
ea00c51e24 Implement IsIndependent(Isolate*)
BUG=
TEST=cctest/test-api/IndependentWeakHandle

Review URL: https://codereview.chromium.org/11368053
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 12:35:51 +00:00
yangguo@chromium.org
e26012e771 Fix JSON.stringify wrt harmony proxies.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11312063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:53:56 +00:00
yangguo@chromium.org
17fab1dfa1 Improve handle allocation in JSON.parse.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11358065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:50:36 +00:00
svenpanne@chromium.org
f3807ca17b Heavy cleanup of the external pointer API.
Added highly efficient Object::SetAlignedPointerInInternalField and
Object::GetAlignedPointerFromInternalField functions for 2-byte-aligned
pointers. Their non-aligned counterparts Object::GetPointerFromInternalField and
Object::SetPointerInInternalField are now deprecated utility functions.

External is now a true Value again, with New/Value/Cast using a JSObject with an
internal field containing a Foreign. External::Wrap, and External::Unwrap are now
deprecated utility functions.

Added Context::GetEmbedderData and Context::SetEmbedderData. Deprecated
Context::GetData and Context::SetData, these are now only wrappers to access
internal field 0.

Added highly efficient Context::SetAlignedPointerInEmbedderData and
Context::GetAlignedPointerFromEmbedderData functions for 2-byte-aligned
pointers.

Review URL: https://codereview.chromium.org/11190050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:25:32 +00:00
svenpanne@chromium.org
24bb0668e6 Simplified HCheckMaps handling a bit.
This is a refactoring-only CL which simplifies the way we emit combinations of
Smi+map checks.

Review URL: https://codereview.chromium.org/11343011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:06:24 +00:00
svenpanne@chromium.org
9de1d40d28 Improve handling of property loads on the proto chain.
Previously Crankshaft emitted a generic load for these, now we emit a load of a
named field, guarded by a proto chain check.

LCheckPrototypeMaps now returns the holder, which is for free, because it
already had to check its map as the last step, anyway. This is in sync with what
StubCompiler::CheckPrototype does.

Review URL: https://codereview.chromium.org/11338030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 08:53:54 +00:00
yangguo@chromium.org
e8d91b424c Handle edge cases in basic JSON.stringify.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11315009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 14:46:57 +00:00
yangguo@chromium.org
64793b3f0d Correctly visit all external strings.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11340010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 12:45:00 +00:00
verwaest@chromium.org
14abf05bd5 Ensure reducing the length of an array doesn't make it go holey.
Also only transition and/or change anything to the backing store if we are
actually going to delete anything.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11358011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 10:24:56 +00:00
mvstanton@chromium.org
a85fd03caa Consolidated all the key store/load classes in the Hydrogen and Lithium
space into just two:
HLoadKeyed/HLoadKeyedGeneric and HStoreKeyed/HStoreKeyedGeneric
LLoadKeyed/LLoadKeyedGeneric and LStoreKeyed/LStoreKeyedGeneric
BUG=

Review URL: https://codereview.chromium.org/11238016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 09:18:53 +00:00
danno@chromium.org
75cec19872 Prepare push to trunk. Now working on version 3.15.1.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11367003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-31 09:58:22 +00:00
yangguo@chromium.org
fe7ec01096 Fix handling arrays with holes in JSON.stringify.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11273112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-30 15:29:34 +00:00
danno@chromium.org
5da0bbf390 Loosen aligned code target requirement on ARM
Fixes crashes when V8 is built as Thumb code.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11343014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 16:27:54 +00:00
danno@chromium.org
60267da6d9 MIPS: Cleanup handling of shifts: SHR can deoptimize only when its a shift by 0, all other shift never deoptimize.
Port r12373 (9fdde2ad)

Original commit message:
Fix DoDeferredNumberTagU to keep the value in xmm1 instead of xmm0 on x64.

xmm0 is not saved across runtime call on x64 because MacroAssembler::EnterExitFrameEpilogue preserves only allocatable XMM registers unlike on ia32 where it preserves all registers.

Cleanup handling of shifts: SHR can deoptimize only when its a shift by 0, all other shift never deoptimize.

Fix type inference for i-to-t change instruction. On X64 this ensures that write-barrier is generated correctly.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10876054
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 15:10:21 +00:00
yangguo@chromium.org
8ed2e560ea Treat leading zeros in JSON.parse correctly.
R=verwaest@chromium.org
BUG=158185

Review URL: https://chromiumcodereview.appspot.com/11273075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 12:01:29 +00:00
ulan@chromium.org
42c7166e75 Fix performance regression introduced by r12812.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11301014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 11:45:57 +00:00
danno@chromium.org
e96d49047b Remove redundant jump to deoptimization (the jump already exists in DoCheckMapCommon)
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11265044
Patch from Rajeev Krithivasan <rkrithiv@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 11:45:40 +00:00
mstarzinger@chromium.org
e363cd3425 Fix ugly typo in GenerateNewNonStrictFast.
R=svenpanne@chromium.org
BUG=chromium:157520
TEST=mjsunit/regress/regress-crbug-157520

Review URL: https://codereview.chromium.org/11300008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-26 10:55:25 +00:00
mstarzinger@chromium.org
014f00fa51 Fix code flusher to process weak function links.
This fixes a corner case where weak function links of the code flushing
candidates list were destroyed by scavenges that happened during
incremental marking. Now those weak function links are updated while
scavenging happens.

R=ulan@chromium.org
TEST=cctest/test-heap/TestCodeFlushingIncrementalScavenge

Review URL: https://codereview.chromium.org/11271006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-26 09:44:34 +00:00
mstarzinger@chromium.org
c0461d999c Update ReceiverObjectNeedsWriteBarrier to include HFastLiteral
This will prevent unnecessary write barriers for literals.
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11143005
Patch from Derek J Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:45:24 +00:00
mstarzinger@chromium.org
e119459af2 Set kChangesNewSpacePromotion for HStringAdd
TEST=none
BUG=none

Review URL: https://codereview.chromium.org/11143006
Patch from Derek J Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:23:39 +00:00
rossberg@chromium.org
aa5e1c3483 Set up Proxy methods the proper way.
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11274047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:13:44 +00:00
rossberg@chromium.org
ae93cf665d Initial JS stub implementation of Object.observe. Adds support for .object/.unobserve/.notify/.deliverChangeRecords. No delivery mechanism is implemented for end-of-microtask.
Review URL: https://codereview.chromium.org/11225058
Patch from Rafael Weinstein <rafaelw@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 14:56:44 +00:00
rossberg@chromium.org
cd9029a502 Initial JS stub implementation of Object.observe. Adds support for .object/.unobserve/.notify/.deliverChangeRecords. No delivery mechanism is implemented for end-of-microtask.
Review URL: https://codereview.chromium.org/11225058
Patch from Rafael Weinstein <rafaelw@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 14:53:26 +00:00
mstarzinger@chromium.org
8133d85955 Fix test failures in r12813.
R=yangguo@chromium.org
BUG=v8:1490

Review URL: https://codereview.chromium.org/11264035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 13:54:10 +00:00
yangguo@chromium.org
58c82e93b3 Catch stack overflow in JSON.parse.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11275039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:36:40 +00:00
mstarzinger@chromium.org
ebb44f0d30 Expose gc(true) to JavaScript, which triggers a scavenger GC.
With the --expose_gc option, gc() is exposed to JavaScript. Currently gc() triggers a full GC.

To enable JavaScript to test the behavior of a scavenger GC, this patch exposes gc(true). If the first argument is true, gc(...) triggers a scavenger GC. Otherwise, gc(...) triggers a full GC.

BUG=
Test=Manually confirmed that gc() and gc(false) trigger a full GC and that gc(true) triggers a scavenger GC.

Review URL: https://codereview.chromium.org/11232065
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:23:03 +00:00
yangguo@chromium.org
e40b33d39e Correctly check for stack limit in JSON.stringify.
Changes include:
 - inline functions in a way as not to waste stack space.
 - reset StackReserveSize to the value prior to r12808.
 - check stack overflow dynamically.

R=ulan@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11271021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:18:24 +00:00
mstarzinger@chromium.org
b55988625d Get rid of obsolete unchecked accessors.
R=yangguo@chromium.org
BUG=v8:1490

Review URL: https://codereview.chromium.org/11271020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 11:52:37 +00:00
ulan@chromium.org
889de3b780 Fix memory leak in RegExpStack.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11275037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 11:10:13 +00:00
danno@chromium.org
0f8992395c Fast-forward to version 3.15.0
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11271019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 10:53:35 +00:00
mstarzinger@chromium.org
2baf7eb8e2 Fix typo in V8::MarkIndependent()
BUG=

Review URL: https://codereview.chromium.org/11238064
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 10:07:26 +00:00
ulan@chromium.org
4183f03848 Fix memory leak in DeoptimizerData.
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11269035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 09:35:55 +00:00
yangguo@chromium.org
b2d41f8fe8 Fix stack overflow in JSON.stringify.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11265011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-24 15:49:59 +00:00
yangguo@chromium.org
295dee36bb Use correct timezone information on Solaris
`timezone` variable contains the difference, in seconds, between UTC and
local standard time (see `man 3 localtime` on Solaris).

Call to `tzset` is required to apply contents of `TZ` variable to
`timezone` variable.

BUG=v8:2064

Review URL: https://chromiumcodereview.appspot.com/10967066
Patch from Maciej Małecki <me@mmalecki.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 13:04:05 +00:00
yangguo@chromium.org
169185088e Fix Windows 64 build.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11238060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 12:00:42 +00:00
yangguo@chromium.org
657cd22463 Fix Windows build.
R=mstarzinger@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11232058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 09:39:19 +00:00
yangguo@chromium.org
748f8bf7e1 Optimize inner-loop in JSON.stringify.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11234031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 09:05:56 +00:00
mstarzinger@chromium.org
cee59bf522 Enable incremental code flushing.
This enables code flushing even with incremental marking enabled and
fully shares the function link field in JSFunctions between candidates
for code flushing and the optimized functions list. If a candidate for
code flushing gets optimized, it will be evicted from the candidates
list.

R=ulan@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11140025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 08:25:04 +00:00
verwaest@chromium.org
362e8cb02a Pretenure JSON graph if the input string is larger than 100*1024 chars.
Review URL: https://chromiumcodereview.appspot.com/11238031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 08:06:28 +00:00
alexeif@chromium.org
b882786349 Add a type conversion to fix Windows build after r12793
TBR=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11227034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 18:25:10 +00:00
mstarzinger@chromium.org
37759f4d64 Implement committed physical memory stats for Linux.
The patch introduces CommittedPhysicalMemory function to
the Heap class that reports committed *physical* memory acquired
for the heap from the OS.
It is important because some OSes may defer actual committment on e.g.
first access to the region.
So reporting just plain committed size led to various weird artifacts
like showing V8 allocated memory higher than the whole process
private size.

BUG=v8:2191

Review URL: https://codereview.chromium.org/11066118
Patch from Alexei Filippov <alph@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 16:33:10 +00:00
ulan@chromium.org
3c864d3e79 Fix warnings about tautological compares by recent Clang versions.
This fixes the following Clang warnings:

../../v8/src/ia32/assembler-ia32.cc:1504:24: warning: comparison of constant 16 with expression of type 'v8::internal::Condition' is always true [-Wtautological-constant-out-of-range-compare]
  ASSERT(0 <= cc && cc < 16);
  ~~~~~~~~~~~~~~~~~~~~~^~~~~

../../v8/src/ia32/assembler-ia32.cc:1536:27: warning: comparison of constant 16 with expression of type 'v8::internal::Condition' is always true [-Wtautological-constant-out-of-range-compare]
  ASSERT((0 <= cc) && (cc < 16));
  ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

BUG=crbug.com/151927

Review URL: https://chromiumcodereview.appspot.com/11225030
Patch from Hans Wennborg <hans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 15:59:58 +00:00
ulan@chromium.org
d247c5e6c7 Change constant pool marker to be the unconditional, permanently undefined instruction.
The previously-used instruction isn't guaranteed to always be undefined,
and the encoding used was conditional (failing the condition on an
undefined instruction is itself undefined and not guaranteed to
fault!). I would have like to use a more clever encoding (see bug 2963),
but we need the extra bits to encode the size of the constant pool.

BUG=security
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11242002
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 15:25:17 +00:00
yangguo@chromium.org
e50ee08ad6 Reland JSON.stringify reimplementation.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11189112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 14:22:58 +00:00
rossberg@chromium.org
f923250daf Prepare push to trunk. Now working on version 3.14.6.
R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11189113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 13:09:01 +00:00
mstarzinger@chromium.org
34d98a804d Fix deletion of hidden property with inline-stored hash.
R=yangguo@chromium.org
BUG=chromium:157124
TEST=cctest/test-api/Regress157124

Review URL: https://codereview.chromium.org/11233033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 12:50:51 +00:00
danno@chromium.org
f07b229104 MIPS: Use movw/movt instead of constant pool on ARMv7.
Port r12755 (5d62d66e)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11232036
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 11:15:09 +00:00
yangguo@chromium.org
e41250a390 Revert r12760 (JSON.stringify).
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11225026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 11:11:22 +00:00
yangguo@chromium.org
3c5e899378 Fix two-char hash to use correct fallback for zero hashes.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11228004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 10:38:40 +00:00
ulan@chromium.org
18ff15ca8c Speed up function deoptimization by avoiding quadratic pass over optimized function list.
R=danno@chromium.org
BUG=155270

Review URL: https://chromiumcodereview.appspot.com/11189091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 09:48:56 +00:00
verwaest@chromium.org
d33cda9338 Micro-optimizing the json parser
Review URL: https://chromiumcodereview.appspot.com/11237002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 15:37:28 +00:00
verwaest@chromium.org
4f40326fae Fast path for searching through simple transitions
Review URL: https://chromiumcodereview.appspot.com/11189089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 15:03:27 +00:00
yangguo@chromium.org
06f7d1c92c Improve ClampDoubleToUint8 on ia32/x64.
It's measured faster when:
a) clamp never happens;
b) clamp random happens ([-128,384], pseudo random).

Review URL: https://chromiumcodereview.appspot.com/11190049
Patch from Zheng Liu <zheng.z.liu@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 13:20:22 +00:00
verwaest@chromium.org
c9e86f4b69 Remove scratch register requirement from LoadInstanceDescriptors on arm and mips.
Review URL: https://chromiumcodereview.appspot.com/11193022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 12:39:59 +00:00
yangguo@chromium.org
8148f972e8 Stress GC less by allocating exponentially growing string chunks in JSON.stringify.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11232002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 12:39:43 +00:00
yangguo@chromium.org
f910052543 Always invoke the default Array.sort functions from builtin functions, part 2.
R=vegorov@chromium.org
BUG=v8:2372

Review URL: https://chromiumcodereview.appspot.com/11175007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 12:30:18 +00:00
danno@chromium.org
063609280e Add a faster API for creating v8::Integer objects
In WebKit, we have a small integer cache because calling v8::Integer::New is
slow. This patch adds a faster API for creating integers that requires the
caller to supply the v8::Isolate, saving us the work of looking up the isolate
in thread-local storage.

BUG=

Review URL: https://codereview.chromium.org/11212004
Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 11:15:04 +00:00
verwaest@chromium.org
a0c9856bce Get the target field index when transitioning.
Review URL: https://chromiumcodereview.appspot.com/11194080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 10:48:18 +00:00
danno@chromium.org
ace5bf3f94 Fix ARM dissambler test problems with movw/movt.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11198061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 10:44:56 +00:00
yangguo@chromium.org
5fa8f2f485 Pass pending exception to the message listener.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11014017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 08:45:24 +00:00
verwaest@chromium.org
fa53250dd2 Fixed json regression
BUG=v8:2374

Review URL: https://chromiumcodereview.appspot.com/11186059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 08:23:45 +00:00
verwaest@chromium.org
7bc94a92c5 Fixed error introduced in r12761.
BUG=2373

Review URL: https://chromiumcodereview.appspot.com/11198068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 18:43:19 +00:00
verwaest@chromium.org
7ce3a4021d Static cast char* diff to int.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11200004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 15:57:45 +00:00
verwaest@chromium.org
d04a1fff1f Keep track of the first non-ascii word/char to avoid redoing the work.
Review URL: https://chromiumcodereview.appspot.com/11194053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 15:08:11 +00:00
verwaest@chromium.org
852de2e1ab Adding a fast path for parsing index keys.
Reduces overhead on http://code.google.com/p/chromium/issues/detail?id=156379 from 360ms down to 255ms.

Review URL: https://chromiumcodereview.appspot.com/11189039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 14:44:40 +00:00
yangguo@chromium.org
7a653c1675 Reimplement a simpler version of JSON.stringify.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11186025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 14:42:26 +00:00
danno@chromium.org
4431e0c54e Put more constants in movw/movt instructions
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11185052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 14:37:04 +00:00
yangguo@chromium.org
a7f3edb818 Make sure the fast case of ScanJsonString bails out to the slow case correctly.
R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11185050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 13:15:05 +00:00
danno@chromium.org
43e248d2e5 Use movw/movt instead of constant pool on ARMv7.
Some ARM architectures load 32-bit immediate constants more efficiently using movw/movt pairs rather than constant pool loads. This patch allows the assembler to generate one or the other load form at runtime depending on what is faster.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11037023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:21:42 +00:00
danno@chromium.org
9d43ff71b8 Avoid unnecessary code target changes during code compaction.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11198032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:01:36 +00:00
verwaest@chromium.org
a38af4256c Fix typo in fast path for scanning json strings.
Review URL: https://chromiumcodereview.appspot.com/11191055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 11:47:06 +00:00
fschneider@chromium.org
971e834a8d Always invoke the default Array.sort functions from builtin functions.
TEST=mjsunit/regress/regress-builtin-array-op.js
BUG=v8:2372
Review URL: https://chromiumcodereview.appspot.com/10559005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 11:18:08 +00:00
svenpanne@chromium.org
9dc2c5b83d Add an API for enumerating persistent handles
This API lets the embedder enumerate handles that have class ids. WebKit will
use this feature during garbage collection to compute object groups for DOM
nodes. Previously, we kept a list of DOM nodes on the WebKit side, but that
list is redundant with the global handles list in V8.

Review URL: https://codereview.chromium.org/11190011
Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 06:52:37 +00:00
danno@chromium.org
966b08440c MIPS: Fix compilation under clang.
Clang is a little more picky than gcc on unused variable
warnings, which become errors with -Werror. Clean up
these cases for mips.

BUG=
TEST=

Review URL: https://codereview.chromium.org/11175005
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 14:20:43 +00:00
verwaest@chromium.org
b61933ba10 Eagerly follow transitions to existing maps while json parsing.
Review URL: https://chromiumcodereview.appspot.com/11184006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 14:09:42 +00:00
verwaest@chromium.org
72424b3987 Move DescriptorArray into the map.
Review URL: https://chromiumcodereview.appspot.com/11188031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 13:04:49 +00:00
jkummerow@chromium.org
62223bd2c0 Revert recent CPU profiler changes because they broke --prof.
This reverts r12649 and r12650.

BUG=v8:2364

Review URL: https://codereview.chromium.org/11193020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 12:24:31 +00:00
svenpanne@chromium.org
bcb383e055 Improved printing of HLoadElements instruction.
TBR=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11177004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 11:41:07 +00:00
danno@chromium.org
4a2a4b8647 MIPS: Fix ARM bug introduced in r12604 that caused crashes on ARM on crypto-md5 from SunSpider.
Port r12623 (22002351)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10979066
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:45:17 +00:00
danno@chromium.org
1fe673a60d MIPS: Fix issue 2346 (order of operations in keyed store on arrays) and turn get-own-property-descriptor.js test into a regression test.
Port r12604 (ae837167)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10987086
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:29:58 +00:00
mstarzinger@chromium.org
479b4d61a6 MIPS: Make the speed of incremental marking depend also on the rate at which we are hitting expensive write barrier operations, not just on the rate of allocation.
Port r12618 (c621b025)

BUG=
TEST=

Review URL: https://codereview.chromium.org/10977070
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:24:13 +00:00
ulan@chromium.org
9f2e52ac12 Fix MIPS build broken by r12735 'Allow unaligned accesses for ARMv7'.
R=mstarzinger@chromium.org,palfia@homejinni.com

Review URL: https://chromiumcodereview.appspot.com/11167004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:23:15 +00:00
mstarzinger@chromium.org
e2da94b804 MIPS: Fix compilation failure on ARM in r12685.
Port r12686 (bdda5c81)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11143029
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:16:36 +00:00
ulan@chromium.org
a86e897924 Simulate and disasm NOP on ARM
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11116011
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 15:42:09 +00:00
mstarzinger@chromium.org
02490829dd Fix bug in deletion of indexed properties
The delete operator always return true in case of indexed property. It
should return false if an indexed property can't be deleted (eg.
DontDelete attribute is set or a string object is the holder).

Contributed by Peter Varga <pvarga@inf.u-szeged.hu>

BUG=none
TEST=mjsunit/delete-non-configurable

Review URL: https://codereview.chromium.org/11094021
Patch from Peter Varga <pvarga@inf.u-szeged.hu>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 15:23:22 +00:00
ulan@chromium.org
86eedc26b5 Allow unaligned accesses for ARMv7.
R=mstarzinger@chromium.org,jfb@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11087047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 15:19:36 +00:00
mstarzinger@chromium.org
d9e3d35c07 Switch code flushing to use different JSFunction field.
This is another preparation for incremental code flushing. Instead of
linking candidates using the code entry field, we use the next pointer
that is also used to link optimized functions together. Since we only
support flushing of unoptimized code, this field can be shared.

R=ulan@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11141023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 14:43:57 +00:00
svenpanne@chromium.org
57116621eb Fixed VERIFY_HEAP without DEBUG.
Review URL: https://codereview.chromium.org/11155007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 12:36:58 +00:00
svenpanne@chromium.org
1fef757b4e Prepare push to trunk. Now working on version 3.14.5.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11137016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 11:49:59 +00:00
yurys@chromium.org
eee93ec99b Allow evals for debugger even if they are prohibited in the debugee context.
BUG=154733
Review URL: https://codereview.chromium.org/11111015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 10:15:25 +00:00
mstarzinger@chromium.org
3d0d211764 Ensure code flushing is disabled in incremental marking.
This fixes some test failures since r12714 which shared the code for
code flushing between full and incremental marking and is only a quick
fix until we can enable incremental code flushing.

R=jkummerow@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11137014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 09:25:30 +00:00
verwaest@chromium.org
7c28995e5d Invalidate the enum cache when converting a transition across which the descriptors are shared.
Review URL: https://chromiumcodereview.appspot.com/11145017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 08:38:51 +00:00
svenpanne@chromium.org
5a0176222b Consistently make the bounds check for AccessArgumentsAt explicit.
This has the advantage that AccessArgumentsAt itself can't deopt anymore and the
bounds check is visible for the elimination phase. Furthermore, things are
simply more consistent now, a good thing in itself. :-)

Review URL: https://codereview.chromium.org/11106012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 07:25:20 +00:00
svenpanne@chromium.org
6cf48ce3d7 Fixed heap verification guards.
TBR=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11147016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 06:34:22 +00:00
danno@chromium.org
bf83c5fe32 Use immediate add when possible in space allocator
Save one instruction in allocating new space by using an immediate add if
possible to calculate the new top of heap.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11091068
Patch from Anthony Berent <aberent@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 14:06:03 +00:00
ulan@chromium.org
c969afe137 Reland r12342: Flush monomorphic ICs on context disposal instead of context exit.
The crashes that caused r12342 to be reverted are fixed in r12563.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11092081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 13:49:12 +00:00
mstarzinger@chromium.org
bf85da7441 Move code flushing support into shared visitor.
This is a first step towards incremental code flushing. The code
flushing support is now shared between full and incremental marking.
The code flusher itself is not yet activated in incremental mode and
will require some additional adaptations.

R=ulan@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11028016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 12:41:29 +00:00
mvstanton@chromium.org
b3c0ed8245 Enable --verify-heap in release mode
R=mstarzinger@chromium.org
BUG=v8:2120

Review URL: https://codereview.chromium.org/11118018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:41:14 +00:00
svenpanne@chromium.org
1f3bdabd80 Ensure that we do not accidentally emit debug code.
The call sites are more concise, the naming is better and at least one
case of superfluous code in release mode was removed.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11108011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:09:14 +00:00
danno@chromium.org
0457a3be0a DoNumberTagD performance improvement
Allocate heap entry untagged and tag at end to avoid having to subtract off
the tag offset before storing the value.

BUG=

Review URL: https://codereview.chromium.org/11028115
Patch from Anthony Berent <aberent@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 10:58:25 +00:00
ulan@chromium.org
ede725d2f7 Fix vstr.cc S, [mem] to emit vstr instead of vldr.
BUG=emits wrong instruction
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11118015
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 09:27:12 +00:00
verwaest@chromium.org
9ecabf526c Make EnumCacheBridge immutable.
Review URL: https://chromiumcodereview.appspot.com/11048051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 08:16:49 +00:00
svenpanne@chromium.org
48d92f6167 MIPS: Consistently use named getters for Lithium operands on ARM.
Port r12527 (24ed881a)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11109003
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 07:05:00 +00:00
jkummerow@chromium.org
c756e14b0b Prepare push to trunk. Now working on version 3.14.4.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/11094073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 15:35:24 +00:00
verwaest@chromium.org
b75705f07b Don't clear EnumLength but rather copy the enum cache. Added regression test for crashes from chromecrash.
Review URL: https://chromiumcodereview.appspot.com/11103036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 15:33:34 +00:00
jkummerow@chromium.org
942e7424e9 Use native context to retrieve ErrorMessageForCodeGenerationFromStrings
BUG=155076

Review URL: https://codereview.chromium.org/11093073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 14:14:24 +00:00
svenpanne@chromium.org
86bcbcdc0b HChange is only deletable under certain circumstances.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11092075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 14:14:03 +00:00
verwaest@chromium.org
ad6a21c0d0 Remove descriptors pointer.
Secondary changes:
- don't transfer ownership back on CNLT
- turned debugging checks back into ASSERT

Review URL: https://chromiumcodereview.appspot.com/11099064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 12:01:19 +00:00
rossberg@chromium.org
00132da734 Bump variable limit further to 2^17.
R=jkummerow@chromium.org
BUG=151625

Review URL: https://codereview.chromium.org/11099063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 11:40:10 +00:00
svenpanne@chromium.org
f03fd70d9e Added a simple dead code removal phase.
We iteratively remove all dead Hydrogen instruction until we reach a fixed point. We consider an instruction dead if it is unused, has no observable side effects and is deletable. The last part of the condition is currently not very nice: We basically have to whitelist "safe" instructions, because we are missing more detailed dependencies and/or more detailed tracking of side effects.

We disable dead code elimination for now in our test runners, because we have tons of poorly written tests which wouldn't test anymore what they are supposed to test with this phase enabled. To get test coverage for dead code elimination itself, we should enable it on a few build bots. This is not really a perfect state, but the best we can do for now.

This patch includes a few const-correctness fixes, most of them were necessary for this CL.

Review URL: https://codereview.chromium.org/11088027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 10:52:58 +00:00
verwaest@chromium.org
bfb2db2329 Prepare push to trunk. Now working on version 3.14.3.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11098047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 17:05:00 +00:00
verwaest@chromium.org
e5620d5a58 Also use binary search to search through valid entries.
Review URL: https://chromiumcodereview.appspot.com/11028056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 14:48:07 +00:00
verwaest@chromium.org
c2a9d49393 Transition ownership back if the descriptors were shared via elements transitions.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11091044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 13:13:35 +00:00
verwaest@chromium.org
dde1cdfb8e Fix transition conversion from CONSTANT_FUNCTION to FIELD.
Review URL: https://chromiumcodereview.appspot.com/11094044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 12:31:50 +00:00
verwaest@chromium.org
55e924c595 Fix CNLT regression.
This happens when a map A with no descriptors in fast_holey_elements
mode first gets some properties, making it share descriptor arrays with
a map B to which it transitions. Then map A transitions elements kind to
dictionary_elements in map C. C stores the empty_descriptor_array in its
own transition array. When adding a property to C, C transitions to D
and shares the descriptors. If D dies, a CNLT clears the transition
array of C, making the descriptor array of A (and thus also of B) shine
through. If a property is now added to an object in state C, it'll inherit
all the properties of A (and B). If those properties had high field indices,
we do not have a large enough backing store for the single newly added
property, and we'll write out of bounds.

BUG=chromium:151749

Review URL: https://chromiumcodereview.appspot.com/11017054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 12:29:44 +00:00
mstarzinger@chromium.org
8b299a5b0e Fix compilation failure on ARM in r12685.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11103004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 11:58:22 +00:00
mstarzinger@chromium.org
270316e953 Improve page flag checking sequence on ARM.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11090021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 15:12:39 +00:00
svenpanne@chromium.org
f81b06dde5 Make sure that the context argument of HAdd is never NULL.
Although this doesn't hurt currently, it hurts any future compiler
pass relying on the invariant that no operand is NULL.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11088026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 13:53:24 +00:00
rossberg@chromium.org
012ae4761c Clarify that date parsing follows Safari.
R=ulan@chromium.org
BUG=145198

Review URL: https://codereview.chromium.org/11085006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 08:34:39 +00:00
mstarzinger@chromium.org
4887285da4 Make GDBJIT interface compile again.
R=ulan@chromium.org
BUG=v8:1804

Review URL: https://codereview.chromium.org/11022007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 08:24:58 +00:00
svenpanne@chromium.org
5d11c5ee69 Fixed Accessors::FunctionGetPrototype's proto chain traversal.
Actually it didn't traverse that far... ;-) Did some cleanup on the way.

R=rossberg@chromium.org
BUG=chrome:143967
TEST=regress/regress-143967.js

Review URL: https://codereview.chromium.org/11087004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-08 12:58:46 +00:00
danno@chromium.org
0a41d2731c ARM: Fast path for integer inputs to EmitVFPTruncate
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11049025
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-08 12:50:15 +00:00
rossberg@chromium.org
0c2fd0daa7 Use dot_for_symbol.
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11087002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-08 11:39:08 +00:00
rossberg@chromium.org
329cf12363 Make sure that names of temporaries do not clash with real variables.
R=mstarzinger@chromium.org
BUG=v8:2322

Review URL: https://codereview.chromium.org/11035054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-05 12:47:34 +00:00
rossberg@chromium.org
b07f38a46b Reject local module declarations.
R=mstarzinger@chromium.org
BUG=150628

Review URL: https://codereview.chromium.org/11033025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-05 09:14:08 +00:00
rossberg@chromium.org
3f7b5c338a Reject uses of lexical for-loop variable on the RHS.
R=mstarzinger@chromium.org
BUG=v8:2322

Review URL: https://codereview.chromium.org/11031045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-05 09:07:53 +00:00
verwaest@chromium.org
6e1bafc808 Revert "Allow partial scanning of large arrays in order to avoid"
This reverts commit r12619.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11029023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-04 11:09:17 +00:00
danno@chromium.org
a92a9c8a2c MIPS: Changed "marked" nops to use sll(zero_reg, at, type).
We use marking bits in nops (in the 'sa' field) for debug markers, and for some IC stuff. A normal NOP in mips is sll(zero_reg, zero_reg, 0), where the 0 is a 5 bit immediate field in 'sa'.

See enum NopMarkerTypes at around line 654 of assembler-mips.h

The problem is that these markers use encodings that are reserved for the 'ssnop' and 'ehb' instructions. These are instructions used for hazard barriers.

It does not break anything, but it will slow things down a little bit as some pipeline stages are cleared, etc.

This commit changes the "marked" NOPs to sll(zero_reg, at, type) instructions, which is also a NOP operation on MIPS.

BUG=
TEST=

Review URL: https://codereview.chromium.org/10990110
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-04 09:46:50 +00:00
ulan@chromium.org
a80f7f42dd Make sure all labels are bound and linked in ARM DoModI.
BUG=v8:2354

TBR=danno@chromium.org,subratokde@codeaurora.org

Review URL: https://chromiumcodereview.appspot.com/11038017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 16:48:45 +00:00
mstarzinger@chromium.org
739c9f6f01 Fix slot recording of code target patches.
This makes sure that we only record relocation slots for code target
patches that happen in marked objects. Unmarked ones might be visited
again, whereas marked ones are alive and will not be visited again.

R=ulan@chromium.org
BUG=chromium:152615,chromium:144230

Review URL: https://codereview.chromium.org/11040021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 15:46:55 +00:00
jkummerow@chromium.org
e0c7d8301f Revert "Adding a high-resolution timer to platform win32."
This reverts r12651.

Review URL: https://codereview.chromium.org/11033014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 11:07:26 +00:00
jkummerow@chromium.org
bdc466422b Adding a high-resolution timer to platform win32.
BUG=None

Review URL: https://codereview.chromium.org/10867057
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 10:59:44 +00:00
jkummerow@chromium.org
ecc7f4baad Replacing circular queue by single buffer in CPU Profiler.
BUG=None

Review URL: https://codereview.chromium.org/10871039
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 10:51:00 +00:00
jkummerow@chromium.org
dfb4218a04 Moving cpu profiling into its own thread.
BUG=None

Review URL: https://codereview.chromium.org/10857035
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 09:58:11 +00:00
verwaest@chromium.org
885837d981 MIPS: Fix mistake in r12549 (1597d7d9).
This commit fixes several test failures introduced by r12549 (1597d7d9):
- mjsunit/regress/regress-760-1
- mjsunit/strict-mode
- mjsunit/string-add

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11039014
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 07:54:41 +00:00
danno@chromium.org
08747c3a16 Support for SDIV and MLS ARM instructions, and implement DoModI using them.
Also added support for the runtime detection to check if hardware supports SDIV/UDIV
Other new opportunities to exploit SDIV/UDIV will be done in separate issues.

Review URL: https://chromiumcodereview.appspot.com/10977051
Patch from Subrato K De <subratokde@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 21:27:33 +00:00
verwaest@chromium.org
efe955587e Allow optimistically hoisting elements transitions over accesses.
Review URL: https://chromiumcodereview.appspot.com/10972011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 16:22:43 +00:00
jkummerow@chromium.org
db91fd3acf Prepare push to trunk. Now working on version 3.14.2.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11031002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 16:19:43 +00:00
mstarzinger@chromium.org
5b64362706 Revert r12625 due to sandbox incompatibility.
Original message: Implement committed physical memory stats for Linux.
This had to be reverted because it crashes when compiled into Chromium
due to the sandbox not allowing the mincore call.

R=verwaest@chromium.org
BUG=v8:2191

Review URL: https://codereview.chromium.org/11023010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 12:11:06 +00:00