Commit Graph

661 Commits

Author SHA1 Message Date
dcarney@chromium.org
c90e697a30 make empty string returnable by ReturnValue
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 07:42:12 +00:00
dcarney@chromium.org
a9ce5bb5ea add a default value for return value
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 07:41:16 +00:00
dcarney@chromium.org
8c892ea2a8 do aligned reads in ContainsOnlyOneByte
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 07:34:58 +00:00
dslomov@chromium.org
cbb11dbe6c Neutering API for v8::ArrayBuffer
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 15:02:20 +00:00
dcarney@chromium.org
72098711b7 Add Value::Cast.
It's needed for upcasting Persistent<Object> to Persistent<Value> after
handlepocalypse (with Persistent::As or Persistent::Cast).

BUG=
R=svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 08:46:39 +00:00
dcarney@chromium.org
94d6a13682 build fix for build fix for 14990
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 08:15:00 +00:00
dcarney@chromium.org
3c8a79caba ReturnValue::Set(uint32_t) is wrong
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 07:34:25 +00:00
dcarney@chromium.org
6f5d899248 add function to test whether string contents are definitely one byte
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 13:16:52 +00:00
dcarney@chromium.org
c6519a142f update test to test new style property handlers
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 12:23:37 +00:00
danno@chromium.org
f6caad4b6b Fix EntryHookStub on ia32 and x64.
These stubs were computing the return address location incorrectly.
Add testing for same.

R=danno@chromium.org

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

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 21:02:29 +00:00
dcarney@chromium.org
2380eff265 Remove V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS.
Blink has migrated to use the new style visitors.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 13:36:18 +00:00
mstarzinger@chromium.org
f8db2414f2 Deprecate FACTORY helper macro.
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 10:30:05 +00:00
dcarney@chromium.org
7d55c16389 remove V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT and V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 10:02:02 +00:00
dcarney@chromium.org
0fbfdf1699 ReturnValue::Set needs to check for empty handles
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-31 11:06:50 +00:00
yurys@chromium.org
09959efe41 Add support for //# sourceURL similar to deprecated //@ sourceURL one.
BUG=v8:2702
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 12:40:21 +00:00
dcarney@chromium.org
ccae2a75ca remove remaining V8_ALLOW_ACCESS_TO* defines from test classes
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 11:04:10 +00:00
dcarney@chromium.org
f16ebc61c9 Delete old GC related APIs.
Blink doesn't use them any more, and they have no other known users either.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:52:01 +00:00
dcarney@chromium.org
515aec2014 Transforming PersistentHandleVisitor to not need to copy Persistent handles.
This gets rid of more places where Persistent handles are copied
(see crbug.com/236290 ).

Transition plan: after this CL, Blink will be modified to work both with and
without the #define, then the #define will be removed from V8.

The corresponding Blink side changes are in https://codereview.chromium.org/15670010/ .

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:48:37 +00:00
dcarney@chromium.org
f8039eff6c fix return out of handlescope in NestedLockers
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:33:46 +00:00
dcarney@chromium.org
eecc9ff8f1 remove use of context scope with persistent argument
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 10:36:21 +00:00
dcarney@chromium.org
f69727d849 Add template parameter to ReturnValue::Set.
E.g., v8-i18n wants to set the return value with a different type of a Persistent.

BUG=NONE
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 14:34:16 +00:00
dcarney@chromium.org
81e5778718 make isolate accessible from returnvalue
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 11:50:08 +00:00
svenpanne@chromium.org
dc9e80beec fix thread safety issue in FunctionTemplate test
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 09:32:10 +00:00
dcarney@chromium.org
91efd1e7d7 callback handler map not correctly populated by direct use of SetCallHandler
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 07:59:33 +00:00
dslomov@chromium.org
28729d24a4 Fix Windows build after r14770
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 10:29:28 +00:00
dslomov@chromium.org
fc73052dc2 Externalization API for ArrayBuffer
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 10:01:42 +00:00
dcarney@chromium.org
1045d62733 implement fast ReturnValue setters
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 06:35:38 +00:00
dcarney@chromium.org
881476a7af new style of property/function callbacks
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 06:36:24 +00:00
svenpanne@chromium.org
b1bd641078 Various minor cctest fixes to make ASAN a bit happier.
* Running with ASAN needs more stack, so don't set resource constraints too
     tight.

   * Checking boot time memory usage doesn't make sense when running with ASAN,
     it eats tons of memory for itself.

   * Fixed a malloc/delete[] mismatch: Not surprisingly, the pointer wrapped by
     a SmartArrayPointer should better be allocated by, well, NewArray...

Even with these 3 fixes, we still have a few failures when running our test
suite with ASAN. Most of them are either timeouts or failures caused by greatly
increased stack usage.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 08:59:28 +00:00
dslomov@chromium.org
5777f3fb48 Enable native implementation of array buffer and typed arrays in d8 and tests.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 14:18:43 +00:00
dcarney@chromium.org
b774c3edfe stop using AsciiValue
TBR=svenpanne@chomium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 14:18:05 +00:00
mstarzinger@chromium.org
d97fe8d4df Add Persistent::ClearAndLeak.
This will be relevant after Persistent is changed to Dispose itself when
destructed. With Persistent::ClearAndLeak, Blink can take the ownership of the
object pointed by a Persistent and avoid it getting destructed.

BUG=
R=svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 14:04:51 +00:00
dcarney@chromium.org
d4fd9db342 fix nosnapshot test failure in 14793004, do not deprecate function
BUG=
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 07:45:16 +00:00
mstarzinger@chromium.org
04a5b3d6b6 Revert "deprecate Context::New which returns Persistent"
This reverts r14573 because of test failures in no-snapshot mode in the
cctest/test-debug/ScriptCollectedEventContext test case.

TBR=dcarney@chromium.org,svenpanne@chromium.org
TEST=cctest/test-debug/ScriptCollectedEventContext

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 16:28:51 +00:00
dcarney@chromium.org
386de8010b deprecate Context::New which returns Persistent
BUG=
TBR=marja@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 13:29:24 +00:00
dcarney@chromium.org
44ec65b1e1 Add Persistent<T>::Reset which disposes the handle and redirects it to point to another object.
BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 12:37:22 +00:00
dcarney@chromium.org
42a8ff87ba add weakcallback without persistent copying
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 10:44:30 +00:00
dslomov@chromium.org
9b45b71d5a Added an extra flag that enables only ArrayBuffer.
This makes Blink experimentation easier.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-06 16:19:27 +00:00
dcarney@chromium.org
0cf128390f deprecate WriteAscii and MayContainNonAscii
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 06:47:24 +00:00
dcarney@chromium.org
cf5ff5a14c first step to remove unsafe handles
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 20:18:42 +00:00
dslomov@chromium.org
6e86141916 Implementation of Uint8ClampedArray.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 11:36:48 +00:00
dslomov@chromium.org
1469acaa7f Add Value::Is* methods for typed arrays and ArrayBuffer
R=rossberg
BUG=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:53:27 +00:00
dslomov@chromium.org
3af1cc1072 Revert "Fix typo"
This reverts commit r14506 (that was commited with a wrong description).

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:49:20 +00:00
dslomov@chromium.org
b029ad4201 Fix typo
R=rossberg@chromium.org

BUG=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:02:22 +00:00
mvstanton@chromium.org
6e4a8fecb7 Two bugfixes for hydrogen-based array constructors
CacheInitialJSArrayMaps needs to be able to pick up where it left off,
as it can now be called from a handlfied context.

Disable incremental marking for CCTest SetJitCodeEventHandler, as it allocates
during compilation.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 13:43:45 +00:00
dslomov@chromium.org
7b1e7463f2 Remove __ prefix from Harmony typed arrays implementation
R=rossberg@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 11:18:27 +00:00
dslomov@chromium.org
3fd6bb51f0 First cut at API for native Typed Arrays.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 11:09:03 +00:00
verwaest@chromium.org
99e17bb12a Track storage types of instance variables.
Review URL: https://chromiumcodereview.appspot.com/14146005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:30:41 +00:00
dslomov@chromium.org
76098f0770 Win64 build
R=rossberg@chromium.org,mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:34:45 +00:00
dslomov@chromium.org
44f2d534b1 First cut at API for ES6 ArrayBuffers
R=rossberg@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:02:23 +00:00
mstarzinger@chromium.org
e7c1f322a4 New GC APIs, try 2.
With these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 15:59:23 +00:00
danno@chromium.org
600ed94a3d Update tests to use std::isnan instead of isnan
Should fix compilation breakage after r14352

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 14:20:36 +00:00
mstarzinger@chromium.org
091f0b7f35 Revert the commits adding new GC-related APIs.
We need to solve efficiency problems first.

This reverts the following revisions: 14283 14286 14221 14215

BUG=

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 16:37:04 +00:00
mstarzinger@chromium.org
e8bc8d76ae New GC related APIs: Implicit references.
When using these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=NONE

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:57:01 +00:00
jkummerow@chromium.org
2df1620c28 Make gyp work with Cygwin
Review URL: https://codereview.chromium.org/13760003

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:36:44 +00:00
jkummerow@chromium.org
586c4e74b6 Replace OS::MemCopy with OS::MemMove (just as fast but more flexible).
Review URL: https://codereview.chromium.org/13932006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:30:51 +00:00
mstarzinger@chromium.org
45125e6480 New GC related APIs.
When using these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=NONE

Review URL: https://codereview.chromium.org/13786002
Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 14:53:03 +00:00
rossberg@chromium.org
dc72037e10 ES6 symbols: extend V8 API to support symbols
Specifically:
- Introduce Symbol and SymbolObject classes.
- Generalise Object::Has and Object::Delete to arbitrary Value-typed keys.
- Generalise some places in the API implementation from String to Name.

It is not possible to intercept symbol-named properties. That is consistent with the idea that symbols are private and should not leak.

R=svenpanne@chromium.org
BUG=v8:2158

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 12:16:29 +00:00
svenpanne@chromium.org
d04de1fe1a Move context retrieval method around. Use delegation for implementation.
This is a refactoring of https://code.google.com/p/v8/source/detail?r=14146.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-09 07:34:32 +00:00
haraken@chromium.org
c638555853 Pass an isolate to GetCurrent()
TEST=test-api.cc:GetCallingContextCallback

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 02:17:56 +00:00
rossberg@chromium.org
52aec4722d ES6 symbols: prevent reflection, proxy, and observe APIs from leaking symbols
R=svenpanne@chromium.org
BUG=v8:2158

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 17:27:44 +00:00
yangguo@chromium.org
9673d7944c Fix tests that fail on GC stress tests.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-20 10:33:26 +00:00
svenpanne@chromium.org
53310ac152 Added a version of the v8::HandleScope constructor with an Isolate and use that consistently.
I tried to limit the use of v8::Isolate::GetCurrent() and v8::internal::Isolate::Current() as much as possible, but sometimes this would have involved restructuring tests quite a bit, which is better left for a separate CL.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-15 12:06:53 +00:00
dcarney@chromium.org
fbe34d4ba5 remove latin-1 flag
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 20:04:50 +00:00
svenpanne@chromium.org
8db737a583 Made AdjustAmountOfExternalAllocatedMemory an instance method of Isolate
BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 13:15:09 +00:00
mstarzinger@chromium.org
bbc9f5362a Fix heap snapshot creation for Harmony collections.
R=yangguo@chromium.org
BUG=v8:2535
TEST=cctest/test-api/Regress2535

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-11 11:31:53 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
yangguo@chromium.org
7145671392 Make message listener API backwards compatible.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:35:39 +00:00
adamk@chromium.org
deeddc7e76 Remove duplication and unnecessary HandleScope from HasElement helper functions
Review URL: https://codereview.chromium.org/12328064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-26 17:20:21 +00:00
mstarzinger@chromium.org
ce1e10f5fc Make __proto__ a foreign callback on Object.prototype.
This moves the __proto__ property to Object.prototype and turns it into
a callback property actually present in the descriptor array as opposed
to a hack in the properties lookup. For now it still is a "magic" data
property using foreign callbacks and not an accessor property visible to
JavaScript.

The second effect of this change is that JSON.parse() no longer treats
the __proto__ property specially, it will be defined as any other data
property. Note that object literals still have their special handling.

R=rossberg@chromium.org
BUG=v8:621,v8:1949,v8:2441
TEST=mjsunit,cctest,test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-26 10:46:00 +00:00
adamk@chromium.org
30a4a798e5 Speed up non-interceptor case of Object.getOwnPropertyNames
When there are interceptors on an object, it's possible to
end up with duplicate property names. But when all the names
are provided by v8, a collision is not possible, so we can
fast-path that case by not de-duping.

Also added better test coverage for interceptor API.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 18:58:47 +00:00
svenpanne@chromium.org
fb6776e84a Made Isolate a mandatory parameter for everything Handle-related.
Unified parameter order of CreateHandle with the rest of v8 on the way. A few
Isolate::Current()s had to be introduced, which is not nice, and not every place
will win a beauty contest, but we can clean this up later easily in smaller steps.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:46:09 +00:00
danno@chromium.org
be8e8f7528 Improve the JitCodeEventHandler API to add support for line position information.
This includes:

* adding the CODE_ADD_LINE_POS_INFO, CODE_START_LINE_INFO_RECORDING, CODE_END_LINE_INFO_RECORDING event and the corresponding functionality.
 * adding the JITCodeLineInfo struct to record the code line info. I added this definition because Danno mentioned that "we'd like to cleanup and decouple the external debugging functionality"
 * some other small changes.

Review URL: https://chromiumcodereview.appspot.com/12223027
Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-18 18:06:12 +00:00
mstarzinger@chromium.org
3d81dec91d Unflakify SetJitCodeEventHandler test case.
R=ulan@chromium.org
TEST=cctest/test-api/SetJitCodeEventHandler

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-14 11:59:04 +00:00
svenpanne@chromium.org
9eec096914 Fixed a memory leak in v8 and another one in d8.
Cleaned up a few tests on the way. This CL brings us down to 5 leaks for d8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 11:57:51 +00:00
svenpanne@chromium.org
7b45ab9501 Don't use TLS for space iterators.
This is not only inherently slow, but it also forces the caller to enter an
Isolate before. Both is bad, so we have to do some heap plumbing.

BUG=v8:2531

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-11 13:02:20 +00:00
svenpanne@chromium.org
3b08a1f82c Added new GetHeapStatistics API entry and deprecated old one.
Simplified the HeapStatistics class a bit, following Uncle Bob's advice that
adding accessors to DTOs only satisfies some design fundamentalists, but serves
no other purpose. :-)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-08 12:41:55 +00:00
mstarzinger@chromium.org
79607d20e6 Make the GC stress builder go green.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-06 13:21:28 +00:00
svenpanne@chromium.org
52d10a68cb Add Isolate parameter to Persistent class.
BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-25 08:31:46 +00:00
mstarzinger@chromium.org
c8cf5d90aa Implement VisitHandlesInNewSpaceWithClassIds()
BUG=
TEST=test-api.cc::PersistentHandleInNewSpaceVisitor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-24 15:53:16 +00:00
svenpanne@chromium.org
fab9a39d9d Make the Isolate parameter mandatory in Locker and Unlocker classes.
Note that leaving out the Isolate parameter previously had a very special
meaning, namely "use the *default* Isolate", i.e. the one magically created at
program initialization time. All other API entries use the meaning "current
Isolate", which is different in a multi-threaded setting and confusing.

Temporarily disabled deprecations until Chrome is ready.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-18 07:20:17 +00:00
mstarzinger@chromium.org
fd4d32e733 Inline SetWrapperClassId() and WrapperClassId()
BUG=
TEST=test-api.cc (WrapperClassId)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 16:33:09 +00:00
yangguo@chromium.org
10436443fe Avoid pointer underflow in CopyCharsUnsigned.
R=dcarney@chromium.org
BUG=v8:2493

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 12:27:38 +00:00
svenpanne@chromium.org
6e6426627e Implement Context::GetIsolate()
BUG=
TEST=test-api.cc (IsolateOfContext)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 12:11:43 +00:00
yangguo@chromium.org
89bef51aca Remove move ascii data hint for one byte strings
This is mostly a rollback of r12966
[Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.]

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-14 15:17:56 +00:00
svenpanne@chromium.org
1ac3949a93 Removed deprecated functions from v8's external API.
Removed the following deprecated functions:

   * Object::GetPointerFromInternalField
   * Object::SetPointerInInternalField
   * External::Wrap
   * External::Unwrap
   * Context::GetData
   * Context::SetData

They have been deprecated in the 3.15 branch and are not used by Chrome anymore.
Furthermore, judging from bug reports and email threads, embedders like node.js
and others are already using 3.15, too. All removed API entries can be emulated
by a one-liner, so adapting should not be hard for anybody.

We want to introduce more deprecations soon, but to keep things simple and avoid
having old and not-so-old deprecations in v8.h, the 3.15 deprecations are now
removed.

In general, the strategy of keeping deprecated things for one stable release and
then removing them seems to be a good compromise between a maintenance nightmare
and annoying external embedders. :-)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-14 13:41:08 +00:00
yangguo@chromium.org
45f20e366a Introduce ENABLE_LATIN_1 compile flag
Mostly a bunch of renaming when flag is disabled.

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 10:30:54 +00:00
rossberg@chromium.org
75dac95604 Fix treatment of hidden prototypes in SetProperty.
R=svenpanne@chromium.org
BUG=v8:2457

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-19 15:17:01 +00:00
rossberg@chromium.org
b25c040c2c Extend API to allow setting length property for function templates.
R=yangguo@chromium.org
BUG=125308

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-19 10:28:36 +00:00
mstarzinger@chromium.org
e46b251324 Pass Isolate to MakeWeak(), IsWeak(), and AddObjectGroup().
BUG=
TEST=cctest/test-api/ApiObjectGroupsCycle

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 10:14:10 +00:00
mstarzinger@chromium.org
0e3fece02d Pass Isolate to Local<T>::New()
Our profiling revealed that Local<T>::New() is one of bottlenecks of DOM bindings.

BUG=
TEST=cctest/test-api/LocalHandle

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 09:13:53 +00:00
mstarzinger@chromium.org
5966276d56 Change deprecated semantics of function template signatures.
This changes how FunctionTemplate interprets a Signature that specifies
compatible receivers and arguments. Only the hidden prototype chain will
be considered when searching for compatible receivers. This prevents
JavaScript from modifying the inheritance relationship set up by the
embedder.

R=rossberg@chromium.org
BUG=v8:2268
TEST=cctest/test-api

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-04 13:45:48 +00:00
mstarzinger@chromium.org
b21cf0208f Fix external exceptions in external try-catch handlers.
This tries to propagate exceptions which are externally thrown into
external try-catch handlers before scheduling them. This also allows
embedders to nest external try-catch handlers.

This just relands r11834.

R=svenpanne@chromium.org
BUG=v8:2166
TEST=cctest/test-api/TryCatchNested

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-04 10:45:59 +00:00
danno@chromium.org
5a40f006f9 Remove unused private member variables found by clang -Wunused-private-field
Review URL: https://codereview.chromium.org/11414207
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-29 15:13:49 +00:00
mstarzinger@chromium.org
b2a7b26e82 Disable stress for some unit test.
Some unit tests specifically test scavenges and forcing them to do
global GCs instead makes no sense. The GC stress builder triggers this.

R=yangguo@chromium.org
TEST=cctest/test-api --stress-compaction

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-27 15:30:12 +00:00
yangguo@chromium.org
36f5b6d41f Rename IsAsciiRepresentation
This is a straight rename:

IsAsciiRepresentation -> IsOneByteRepresentation
IsAsciiRepresentationUnderneath -> IsOneByteRepresentationUnderneath
AllocateRawAsciiString -> AllocateRawOneByteString
AllocateStringFromAscii -> AllocateStringFromOneByte

R=yangguo@chromium.org,
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 10:01:05 +00:00
mstarzinger@chromium.org
f5cff7d91c Make test-dictionary work for GC stress builder.
R=yangguo@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 10:47:31 +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
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
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