Commit Graph

836 Commits

Author SHA1 Message Date
ulan@chromium.org
475131b2b9 Revert r15361 "Improved function entry hook coverage" because of ARM build error.
R=siggi@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:31:06 +00:00
danno@chromium.org
8494f3bf25 Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:39:37 +00:00
svenpanne@chromium.org
a92d237948 Allow users of the V8 API to distinguish between unset and undefined HiddenValues
BUG=v8:2746
R=svenpanne@chromium.org

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

Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 08:00:05 +00:00
mstarzinger@chromium.org
6d92511162 Reland "Remove IsInitialized checks from inlined API functions."
The initialization sequence in Blink has been adapted to use explicit
isolate initialization instead of through calling v8::Null() as the
first API call.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 08:11:50 +00:00
dslomov@chromium.org
4308fb462d API for DataView.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:23:50 +00:00
mstarzinger@chromium.org
48c16454b1 Revert "Remove IsInitialized checks from inlined API functions."
This reverts r15277 due to failures in layout tests. Apparently Blink
still initializes the Isolate by calling v8::Null() as the first API
function on some paths.

TBR=svenpanne@chromium.org
TEST=webkit:crypto/worker-random-values-concurrent.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:10:40 +00:00
mstarzinger@chromium.org
9ef18efff6 Remove IsInitialized checks from inlined API functions.
R=marja@chromium.org, svenpanne@chromium.org
TEST=cctest/test-api

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:58:01 +00:00
dslomov@chromium.org
91eb5f8d25 DataView implementation.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 13:02:38 +00:00
yurys@chromium.org
7f1750580c V8 API: Add a missing NULL check into Isolate::GetCurrentContext().
There is a missing NULL check for: "internal_isolate->context() != NULL".
Right now before calling this method one should call v8::Context::InContext()
first to perform this check, otherwise we may crash. But this static method
will do this check on the current isolate, which may not be the same as a given one.

BUG=249655
R=yurys@chromium.org,mvstanton@chromium.org

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

Patch from Andrey Adaykin <aandrey@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:34:47 +00:00
yurys@chromium.org
6f09cb471b Delete deprecated methods from v8-profiler.h
All these methods were already marked as V8_DEPRECATED in V8 Version 3.18.0 (see https://code.google.com/p/v8/source/browse/trunk/include/v8-profiler.h?r=14304) so it is time to delete them.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 07:56:22 +00:00
yurys@chromium.org
c7b3ef0e05 Make sure ExternalCallbackScope is always created when VM state changes to EXTERNAL
ExternalCallbackScope is used to let CPU profiler know which API callback is being executed. Whenever such callback is called we should create VMState<ETERNAL> and ExternalCallbackScope. This patch fixes several places where VMState<ETERNAL> went without ExternalCallbackScope.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:47:35 +00:00
hpayer@chromium.org
77f5c6c122 Don't let the GC clear the cache between cache invocations to pass test.
BUG=
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 11:23:34 +00:00
dcarney@chromium.org
640353d088 remove all old style callbacks - patch 1 of many
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:12:59 +00:00
dcarney@chromium.org
89fb509c77 remove all old style callbacks - patch 2
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:07:45 +00:00
yurys@chromium.org
2ab2e4843e Introduce THREADED_PROFILED_TEST macro
A bunch of tests in test-api.cc need to be executed two times: with CPU profiler on and off to check different code paths. There are only two such tests at the moment but I'm going to add more and having this logic duplicated in all these tests look awkward. The tests are executed as part of Threading* tests and there is no much sense in running CPU profiler in that case. This change addresses both problems by introducing THREADED_PROFILED_TEST macro which mosly resembles THREADED_TEST except that when such test is executed as a standalone test (not part of a test-api/Threading*) it will first run the test normally and the start CPU profiler and run the test again.

BUG=244580
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:46:56 +00:00
dcarney@chromium.org
b0860dd2b0 arm build fix for 15142
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 10:49:57 +00:00
dcarney@chromium.org
022ee63f5c build fix for 15142
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 10:34:12 +00:00
yurys@chromium.org
c4224f09a2 Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case. Indirect call happens only if CpuProfiler::is_profiling() is true.

This is exactly same change as r15116 with a build fix for test-api.cc

BUG=244580
TBR=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 19:16:35 +00:00
yurys@chromium.org
24ec017182 Revert "Notify CPU profiler when calling native getters"
This reverts commit f323d984a73bab345c4eab5c1907552ccfa7ccaa.

Broke compilation on the bots with an error that doesn't occur locally:

  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-bignum-dtoa.o
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = int]’:
../test/cctest/test-api.cc:1129: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = unsigned int]’:
../test/cctest/test-api.cc:1136: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = double]’:
../test/cctest/test-api.cc:1143: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = bool]’:
../test/cctest/test-api.cc:1150: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = void]’:
../test/cctest/test-api.cc:1157: error: insufficient contextual information to determine type
  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-circular-queue.o

BUG=None
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 14:05:19 +00:00
yurys@chromium.org
1a3c3cee9d Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 13:46:33 +00:00
dcarney@chromium.org
608a6b8965 another attempt at fixing 15107
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 10:39:44 +00:00
dcarney@chromium.org
67c9cd8274 build fix for 15107
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 10:13:09 +00:00
dcarney@chromium.org
8b2c26d736 remove most uses of raw handle constructors
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 09:27:09 +00:00
dcarney@chromium.org
9103afa291 Deprecate the version of MakeWeak which takes an Isolate.
BUG=NONE
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 07:23:23 +00:00
dslomov@chromium.org
9278a4b7b1 Change ArrayBuffer API and implementation to use embedder-provided allocator.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 10:41:14 +00:00
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
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
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
63b5392717 Make test case in r12891 non-threaded.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 09:45:47 +00:00
mstarzinger@chromium.org
db73b0af16 Add a test case for object grouping in a scavenger GC
BUG=v8:2077
TEST=cctest/test-api/ApiObjectGroupsCycleForScavenger

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 09:10:53 +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
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
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
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
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
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
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
svenpanne@chromium.org
b54750c60f Added a workaroung for a GCC visibility bug.
Movef a helper class to the top level to avoid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40145.

TBR=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 07:22:24 +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
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
yurys@chromium.org
26721b7dc0 This issue is for landing patch by vsevik: http://codereview.chromium.org/10966011/
SourceURL comments for scripts having a name. 

sourceURL comment is now preferred script name for all scripts except 
for those with non zero start position (e.g. inline scripts in HTML). 


BUG=v8:2342
Review URL: https://codereview.chromium.org/10959038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-21 08:09:34 +00:00
mstarzinger@chromium.org
86fd161fdc Fix casting error for receiver of interceptors.
This fixes a casting error that occured when the receiver of a missed
or uninitialized CallIC is a Smi and there is an interceptor installed
on the prototype chain.

R=yangguo@chromium.org
BUG=chromium:149912
TEST=cctest/test-api/Regress149912

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 14:39:10 +00:00
ulan@chromium.org
4bd4fb1aa4 Throw a more descriptive exception when blocking 'eval' via CSP.
BUG=140191

R=svenpanne@chromium.org,mkwst@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 09:58:22 +00:00
yangguo@chromium.org
8d04c8c89f Replace r12503. Explicitly check toString() for exception in d8's print().
R=jkummerow@chromium.org
BUG=v8:2317

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:43:46 +00:00
yangguo@chromium.org
4fe330c055 Not mask exception thrown by toString in String::UtfValue etc.
R=jkummerow@chromium.org
BUG=v8:2317

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 08:13:57 +00:00
mstarzinger@chromium.org
8db2000615 Fix API check for length of external arrays.
R=jkummerow@chromium.org
BUG=chromium:148896
TEST=cctest/test-api/ExternalArrayLimits

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-13 09:36:56 +00:00
yangguo@chromium.org
6a9e4048aa Introduce new API to expose external string resource regardless of encoding.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 11:29:50 +00:00
yangguo@chromium.org
59b9a32b34 Fix edge case of extension with NULL as source string.
BUG=144649

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 14:16:56 +00:00
erik.corry@gmail.com
03e4ddcfcf Loosen up code logging test that was sensitive to GC timing.
Review URL: https://chromiumcodereview.appspot.com/10918096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-06 11:05:40 +00:00
yangguo@chromium.org
5ac2a5d22e Revert r12430, r12432, r12433 (basic support for Latin1).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-04 12:23:22 +00:00
yangguo@chromium.org
37c1c06108 Fix more windows build warnings.
TBR=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:50:24 +00:00
yangguo@chromium.org
74f06b1f99 Add basic support for Latin1 to the API.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:06:36 +00:00
jkummerow@chromium.org
f9d4856289 Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
BUG=None
TEST=Included in CL.

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

Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 14:43:28 +00:00
verwaest@chromium.org
a713f82aa6 Revert "Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers."
This reverts commit r12389.

TBR=jkummerow@chromium.org, CC=siggi@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 19:47:02 +00:00
jkummerow@chromium.org
0a6493b5a8 Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
BUG=None
TEST=Included in CL.

Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 18:03:38 +00:00
ulan@chromium.org
7b1d13affc Revert r12342 "Flush monomorphic ICs on context disposal instead of context exit." because of canary channel crashes.
BUG=144230
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 16:08:27 +00:00
erikcorry
c6094f5237 Fix semaphore on MacOS. This is a commit of https://chromiumcodereview.appspot.com/10867009/ for Fedor Indutny
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-23 11:15:06 +00:00
svenpanne@chromium.org
f7ed521fce Handle native callbacks without getters.
TEST=cctest/test-api/SetterOnly,cctest/test-api/NoAccessors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 14:32:32 +00:00
ulan@chromium.org
bac8e56f8d Fix test failures introduced by r12342.
Add missing context disposed notifications in test-api.
Move send-idle-notification flag to d8 options so that it is available in d8
when v8 is build as a shared libarary.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 13:19:52 +00:00
ulan@chromium.org
27fb8c2cf6 Flush monomorphic ICs on context disposal instead of context exit.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 12:09:03 +00:00
rossberg@chromium.org
984d0b0925 Rename Context::global to Context::global_object,
in preparation for global lexical scope.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 12:59:00 +00:00
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
mstarzinger@chromium.org
15589fe22a Fix improved LoadICs for dictionaries with callbacks.
This fixes the positive lookup performed by these LoadICs, to use the
holder instead of the receiver to perfrom the lookup on. It also extends
this improvement to KeyedLoadICs. And it fixes a bug introduced for the
JavaScript getter case of a LoadIC.

R=erik.corry@gmail.com
BUG=chromium:142088
TEST=cctest/test-api/Regress142088,cctest/test-api/Regress137002b

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 13:17:47 +00:00
erik.corry@gmail.com
ac4b44297b Add checks for interceptors to negative lookup code in Crankshaft.
BUG=140473
Review URL: https://chromiumcodereview.appspot.com/10837141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:48:19 +00:00
erik.corry@gmail.com
92f30d1df5 Improve load IC so it can call a native accessor even if the holder is
in dictionary mode.  Add a flag to all maps to indicate whether they are
used for dictionary (normalized) objects or fast mode objects.
Review URL: https://chromiumcodereview.appspot.com/10831153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:25:19 +00:00
yangguo@chromium.org
4e82c3fb1a Allow SetHiddenValue to accept empty value.
R=mstarzinger@chromium.org
BUG=v8:2274

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 07:55:05 +00:00
erik.corry@gmail.com
5c6db6d081 Fix the 137002 fix (Don't generate ICs for accessors on slow
case objects).  We should be testing the holder for dictionary
mode, not the receiver.
Review URL: https://chromiumcodereview.appspot.com/10827113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 12:35:33 +00:00
yangguo@chromium.org
6b489d9753 Improve String::WriteAscii and add PRESERVE_ASCII_NULL option.
The PRESERVE_ASCII_NULL option prevents WriteAscii from converting
\0 to white space.

R=verwaest@chromium.org
BUG=v8:2252
TEST=test-api/StringWrite

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 14:22:46 +00:00
yangguo@chromium.org
53f329ab5f Add test case for custom error's toString.
R=arv@chromium.org
BUG=
TEST=error-tostring.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 08:03:46 +00:00
verwaest@chromium.org
33147848dc Fix presubmit failure in r12107.
Review URL: https://chromiumcodereview.appspot.com/10780035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 16:00:00 +00:00
danno@chromium.org
43d0ed048d Implements a new API to set a function entry hook for profiling.
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

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

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

Review URL: https://chromiumcodereview.appspot.com/10706002
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 15:18:15 +00:00
mstarzinger@chromium.org
bb9f4470c6 Fix missing tagging of stack value in finally block.
R=yangguo@chromium.org
BUG=chromium:137496
TEST=cctest/test-api/Regress137496

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 13:38:17 +00:00
mstarzinger@chromium.org
f71de19a4b Fix ICs for slow objects with native accessor.
This prevents creation of LoadICs or StoreICs for native callbacks on
objects in dictionary mode. Those ICs fail if the accessor is installed
on the receiver itself and also lead to bogus type feedback.

R=danno@chromium.org
BUG=chromium:137002
TEST=test/test-api/Regress137002[a,b]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 09:53:32 +00:00
danno@chromium.org
b1530257ab Revert 12083: Implements a new API to set a function entry hook for profiling.
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 16:33:27 +00:00
danno@chromium.org
5c8c4bec46 Implements a new API to set a function entry hook for profiling.
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

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

Review URL: https://chromiumcodereview.appspot.com/10706002
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 16:18:37 +00:00
danno@chromium.org
30569cba9b Revert 12069: Implements a new API to set a function entry hook for profiling
Reverted due to waterfall failures

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:59:50 +00:00
danno@chromium.org
d6edbdd436 Implements a new API to set a function entry hook for profiling.
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

Review URL: https://chromiumcodereview.appspot.com/10706002
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:42:39 +00:00
mstarzinger@chromium.org
d3d59e71e9 Revert r11834 because of broken Chromium unit test.
R=yangguo@chromium.org
BUG=v8:2166

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-21 11:10:53 +00:00
ulan@chromium.org
9006c1b223 In test-api.cc a few calls to Heap::CollectAllGarbage use obsolete argument.
The assertion failure I ran into is in Regress1516, where collector falls back to SCAVENGER, during x64.debug.check run.

Zheng Liu
zheng.z.liu@intel.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-20 16:07:30 +00:00
mstarzinger@chromium.org
dd21ee801b 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.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 13:34:39 +00:00
danno@chromium.org
3515559a38 Increase old space in cctest/test-api/HugeConsStringOutOfMemory test.
This test is failing on MIPS since r11715 (a7d6f92c),
it seems that after the modifications in bootstrapper.cc,
this test runs out of old generation space on MIPS.

TEST=cctest/test-api/HugeConsStringOutOfMemory

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 13:52:58 +00:00
yangguo@chromium.org
9a80637be7 Fix GCC 4.6 build.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-13 07:17:37 +00:00
yangguo@chromium.org
09179b314a Reland r11753: Fix try..finally.
R=ulan@chromium.org
BUG=129171
TEST=test-api/TryFinallyMessage, mjsunit/try-finally-continue.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 13:18:05 +00:00
yangguo@chromium.org
e98fb1028b Revert r11753.
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 11:21:21 +00:00
yangguo@chromium.org
1b25fb8fa9 Preserve error message during finally block in try..finally.
R=ulan@chromium.org
BUG=129171
TEST=test-api/TryFinallyMessage

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 10:51:09 +00:00
mstarzinger@chromium.org
81e8aa0016 Implement implicit instance checks for API accessors.
This allows to specify a constructor against which an implicit instance
check is performed for API accessors. If the receiver is incompatible,
an implicit TypeError is thrown and no callback is invoked.

R=svenpanne@chromium.org
BUG=v8:2075
TEST=cctest/test-api/InstanceCheckOn[*]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-08 07:45:11 +00:00
rossberg@chromium.org
4ea1fc0d27 Remove one more case behind --es5_readonly flag.
Plus add a couple of assertions.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-05 16:56:53 +00:00
rossberg@chromium.org
c13dd2ece6 Put inherited readonliness behind a flag,
since it currently breaks WebKit bindings massively.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-05 12:39:07 +00:00
rossberg@chromium.org
e4c472a7af Implement correct checking for inherited readonliness on assignment.
Removes 6 out of 8 of our remaining unintentional failures on test262.

Also fixes treatment of inherited setters added after the fact.

Specifically:

- In the runtime, when looking for setter callbacks in the prototype chain,
  also look for read-only properties. If one is found, reject (exception in
  strict mode). If a proxy is found, invoke proper trap.
  Note: this folds in the CanPut function from the spec and avoids an extra
  lookup over the prototype chain.

- In generated code for stores, insert a test for the maps from the prototype
  chain, but only up to the object where the property already exists (which
  may be the object itself).
  In Hydrogen, if the found property is read-only or not cacheable (e.g. a
  proxy), bail out; in a stub, generate an unconditional miss (to get an
  exception in strict mode).

- Add test cases and adapt existing test expectations.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-01 10:51:36 +00:00
mstarzinger@chromium.org
d965561862 Fix register clobbering in LoadIC for interceptors.
This fixes a corner-case where the receiver register was clobbered by
LoadICs for interceptors and inlined followup code still relied on the
receiver to be intact in case of prototype changes.

R=vegorov@chromium.org
BUG=chromium:125988
TEST=cctest/test-api/Regress125988

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-03 11:28:24 +00:00
ulan@chromium.org
bc46d6c4a4 Make sure idle notifications perform a round of incremental GCs after context disposal.
BUG=v8:2107

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-30 14:41:12 +00:00
mstarzinger@chromium.org
6aeed46180 Make String::Empty inlineable.
R=svenpanne@chromium.org
TEST=cctest/test-api/StringEmpty

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-25 08:45:45 +00:00
mstarzinger@chromium.org
c25a92d76b Make Isolate::GetData and Isolate::SetData inlineable.
R=svenpanne@chromium.org
TEST=cctest/test-api/IsolateEmbedderData

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-24 14:37:53 +00:00
mstarzinger@chromium.org
5113cc1bbc Make static API getters inlineable again.
This relands r11376 with minor fixes for Windows where offsets are
slightly different from Linux for unaligned fields.

R=svenpanne@chromium.org
TEST=cctest/test-api/StaticGetters

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-23 15:09:59 +00:00
rossberg@chromium.org
c8aea7a184 Put new global var semantics behind a flag until WebKit tests are cleaned up.
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-20 13:35:09 +00:00
fschneider@chromium.org
3760893edd Fix bug in forced-deletion of globals.
When inling functions across contexts in optimized code and using
ForceDelete from the API to delete a DontDelete global property we
can end up returning the hole value instead of throwing a ReferenceError
as expected after accessing a deleted global variable.

BUG=v8:2092
TEST=test/cctest/test-api/InlinedFunctionAcrossContexts
Review URL: https://chromiumcodereview.appspot.com/10035060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-20 10:21:08 +00:00
mstarzinger@chromium.org
0f590eb45f Revert r11376 and r11379 due to compile failures on Windows.
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-18 17:49:53 +00:00
mstarzinger@chromium.org
3b3e701a27 Make static API getters inlineable.
R=danno@chromium.org
TEST=cctest/test-api/StaticGetters[AfterDeath]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-18 16:07:08 +00:00
rossberg@chromium.org
62945585fd Implement ES5 erratum: global declarations shadow inherited properties.
I also discovered that our treatment of const declarations is inconsistent
when inside a global eval under 'with' (i.e., when created by
DeclareContextSlots). That is,

  var x;
  eval("const x = 9")

and

  var x;
  eval("with({}) const x = 9")

differ (the former assigns 9, the latter throws). This appears to be an
oversight from earlier changes to our const semantics (the latter shouldn't
throw either). Fixing this is a separate issue, though (and one that doesn't
seem quite worthwhile).

R=mstarzinger@chromium.org
BUG=v8:1991,80591
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-16 13:20:50 +00:00
mstarzinger@chromium.org
2f732c2728 Add isolate accessor to AccessorInfo and Arguments.
This passes the isolate through to API callback functions so that it is
available through AccessorInfo and Arguments. This allows bindings to
avoid unnecessary TLS lookups to retrieve the current isolate.

R=danno@chromium.org
TEST=cctest/test-api,cctest/test-accessors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-13 09:38:00 +00:00
erikcorry
b6911b555f A version of test-api.cc that compiles both on Mac and on Linux.
Review URL: http://codereview.chromium.org/10050013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 13:41:48 +00:00
erik.corry@gmail.com
dd0be92a1c Fix Windows 64 bit compile.
Review URL: https://chromiumcodereview.appspot.com/10034014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 10:18:42 +00:00
erik.corry@gmail.com
0cdf6b50e7 Fix compile errors on 64 bit platforms.
Review URL: https://chromiumcodereview.appspot.com/10053009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 09:55:20 +00:00
erik.corry@gmail.com
25f84a48ce Speed up WriteUtf8 in the case where the output buffer is large enough.
Review URL: https://chromiumcodereview.appspot.com/9696032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-21 13:48:29 +00:00
erik.corry@gmail.com
bcd0fd00e3 Add API call that identifies strings that are guaranteed
only to contain ASCII characters.
Review URL: https://chromiumcodereview.appspot.com/9724022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 09:51:36 +00:00
erik.corry@gmail.com
03cfc4363b Fix input and output to handle UTF16 surrogate pairs.
Review URL: https://chromiumcodereview.appspot.com/9600009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:35:28 +00:00
mstarzinger@chromium.org
4b4b3a4da7 Add kAbortIncrementalMarkingMask flag for GC.
This adds an additional flag to control whether incremental marking
should be aborted when requesting a GC, providing a finer granularity
between kNoGCFlags and kMakeHeapIterableMask.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-07 17:52:16 +00:00
danno@chromium.org
a6963cdf7e Rewrite test CHECK to work on all platforms, including MIPS
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 12:49:44 +00:00
erik.corry@gmail.com
9f375ea880 Fix secondary stub cache and add a test for the stub cache lookups.
Review URL: https://chromiumcodereview.appspot.com/9496010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 10:45:59 +00:00
mstarzinger@chromium.org
1a356cff3e Fix redefinition of aliased elements in arguments.
This refactors the way we (re)define elements to perform normalization
and attribute updating at a much deeper level, thereby removing some
bogus special cases in upper runtime layers.

Most element setters take an indicator flag that distinguishes between
setting and defining. Setting of an element causes attributes to remain
unchanged, writability to be checked and callbacks to be called.
Defining of an element causes attributes to be updated and callbacks to
be overridden. The same approach could be taken for properties.

R=svenpanne@chromium.org
BUG=v8:1772
TEST=test262,test262/15.2.3.6-4-333-11

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 11:43:07 +00:00
fschneider@chromium.org
b90a8ec851 Enable test-api/TurnOnAccessCheckAndRecompile and change it so it can't cause a GC.
A GC in the access check callbacks NamedSecurityCallback and IndexedSecurityCallback
violates the contract about these callbacks.

Added a EXTERNAL VMState scope around the call to FailedAccessCheckCallback to be
consistent with the other callback invocations.

BUG=v8:1952
TEST=cctest/test-api/TurnOnAccessCheckAndRecompile
Review URL: https://chromiumcodereview.appspot.com/9425048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 15:34:08 +00:00
fschneider@chromium.org
781427a110 Temporarily disable known failing test to make builder cycle green.
BUG=v8:1952
Review URL: https://chromiumcodereview.appspot.com/9414006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 15:20:13 +00:00
danno@chromium.org
2fa1cc03ac Prefix usage of kExternalFloatArray and kExternalDoubleArray with v8.
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 08:10:47 +00:00
danno@chromium.org
bd79e299e5 Uniformly handle 'undefined' store to Float64Array and Float32Array.
Previous behavior diverged in ICs and Crankshaft. When storing to a Float32Array or Float64Array, the ICs treated undefined as zero while Crankshaft treated it as NaN. Now both ICs and Crankshaft treat it as NaN, which is consistent with the WebGL & ECMAScript spec.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 07:58:07 +00:00
mstarzinger@chromium.org
bc7e01534d Cleanup idle notification tests.
R=ulan@chromium.org
TEST=cctest/test-api/IdleNotification

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-15 15:42:50 +00:00
yangguo@chromium.org
988d1269de When rethrowing an exception, print the stack trace of its original site instead of rethrow site.
BUG=60240

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 09:31:06 +00:00
yurys@chromium.org
882ede3053 Add a getter for value set with AllowCodeGenerationFromStrings
Review URL: https://chromiumcodereview.appspot.com/9223016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-01 12:58:34 +00:00
yurys@chromium.org
09ff5c4c44 Provide access to function inferred name in v8 public API
Review URL: https://chromiumcodereview.appspot.com/9146039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 12:45:54 +00:00
jkummerow@chromium.org
6c85119c6a Fix building with clang
BUG=v8:1912

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 16:36:55 +00:00
fschneider@chromium.org
01979c70a8 Fix handling of named interceptors in optimized code.
When calling a constant function property from optimized code,
we need to check that there is no interceptor on the receiver map.

TEST=cctest/InterceptorCallICConstantFunctionNotNeededWrapped
Review URL: http://codereview.chromium.org/9240006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 16:06:03 +00:00
danno@chromium.org
88d358b345 Fix GCC4.7 compilation warning introduced in r10400
Add some usages for string1 and string2 to avoid "assigned
but not used" warning.

Review URL: http://codereview.chromium.org/9163003
Patch from Yury Semikhatsky <yurys@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 11:04:58 +00:00
ulan@chromium.org
08d77cbde4 Fix flaky idle notification test.
Idle notification handler might not free more memory if there was a global GC before or incremental marking is not activated (and it's not worth activating).

BUG=
TEST=cctest/test-api/IdleNotificationWithHint

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:40:04 +00:00
yurys@chromium.org
ebb75c23a1 Provide a way for iterating through all external strings referenced from the JS heap
Review URL: http://codereview.chromium.org/9139018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 15:14:45 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
danno@chromium.org
df8b359f41 Fix handling of -0.0 in IsInt32/IsUInt32
R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 10:05:45 +00:00
ulan@chromium.org
746ef93362 Move handlified functions from handles.cc to objects.cc
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 17:16:19 +00:00
erik.corry@gmail.com
9de3992837 Fix broken test that assumes that no GC can clear the regexp
cache (GC can happen at any time due to Crankshaft).
Review URL: http://codereview.chromium.org/9113012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 13:16:15 +00:00
yangguo@chromium.org
f953e7fcea Fix windows build.
Review URL: http://codereview.chromium.org/8983014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 09:58:21 +00:00
yangguo@chromium.org
d9f7cf819c Implement callback when script finishes running in V8 API.
TEST=test-api/LeaveScriptCallback

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 08:48:35 +00:00
mstarzinger@chromium.org
aae7033ba1 Fix JavaScript accessors on objects with interceptors.
This fixes how Object.defineProperty() defines JavaScript accessors on
objects with installed API interceptors. The definition itself does not
cause any interceptors to be called, whereas any subsequent accesses on
said object will still fire the interceptor. This behavior is in sync
with API accessors.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 16:14:38 +00:00
ulan@chromium.org
0fd7350595 Relax test condition to make it less brittle.
BUG=
TEST=cctest/test-api/IdleNotificationWithHint

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 16:08:09 +00:00
ulan@chromium.org
cda5b1a53f Use the old handler for low frequency idle notifications.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 14:30:21 +00:00
ulan@chromium.org
8dc728126e Start incremental marking on idle notification.
BUG=v8:1458
TEST=cctest/test-api/IdleNotification*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 11:13:36 +00:00
yangguo@chromium.org
2055f4195e Recommit introducing short external strings.
Review URL: http://codereview.chromium.org/8677006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 13:08:28 +00:00
yangguo@chromium.org
922aee5a02 Rolling back r10049 due to webkit failures.
Review URL: http://codereview.chromium.org/8681007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 10:41:12 +00:00
yangguo@chromium.org
21edc7c30b Introduce short external strings without pointer cache.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 09:58:58 +00:00
yangguo@chromium.org
5a82d78948 Add pointer cache field to external string for access in generated code.
TEST=test/mjsunit/string-externalize.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 17:05:12 +00:00
mstarzinger@chromium.org
330cd2205c Remove hidden prototype for builtin functions.
This is a deliberate non-conformity introduced more than 2 years ago to
be compatible with JSC. The current state is that all other browsers
perform ES5 conform in that regard.

R=erik.corry@gmail.com
BUG=chromium:1717,chromium:39662
TEST=test262/15.2.3.6-4-6??,mjsunit/undeletable-functions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 09:44:57 +00:00
yangguo@chromium.org
dbd3578e3e MIPS: Fix the cctest QuietSignalingNaNs for MIPS.
MIPS uses a different NAN bit pattern to represent quiet or
signalling NANs than does x86 or ARM.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8510007
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 08:25:23 +00:00
yurys@chromium.org
8b7bcc4e80 Add getters for column number and script id to v8::Function
Review URL: http://codereview.chromium.org/8508008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:18:30 +00:00
keuchel@chromium.org
80d1b898fb Fix gcc-4.6 warnings.
BUG=v8:1806

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:59:01 +00:00
lrn@chromium.org
30465596e6 Make eval consider anything on the form eval(args...) a potential direct cal
Previously we omitted all cases where the global eval property was shadowed,
even if by a variable holding the same value. ES5 requires us to treat these
as direct calls.

We still throw if calling indirect eval with a detached global object.

BUG=v8:994
TEST=mjsunit/eval.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 09:38:52 +00:00
erikcorry
dac0b853e1 Improve speed of Utf8Write by always flattening the string first and
detecting the ASCII case.  Also rewrite Utf8Length to work on an
unflattened string.  Bug: http://code.google.com/p/v8/issues/detail?id=1665
Review URL: http://codereview.chromium.org/8304021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:48:31 +00:00
lrn@chromium.org
ebc0f85e40 Revert "Added ability to lock strings to prevent their representation or encoding from changing."
This reverts r9424.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:09:34 +00:00
ricow@chromium.org
7810ff70f6 Make sure that we can't access hidden properties by installing accessors on Object.prototype.
BUG:chromium:97784
TEST=cctest/test-api
Review URL: http://codereview.chromium.org/8041020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 16:54:50 +00:00
ulan@chromium.org
16ae2551ae Search prototypes for accessor setters if interceptor returns empty value.
Extract the part of SetPropertyForResult that searches the prototype chain
for accessor setters into a separate function SetPropertyInPrototypes.
Call this function in SetPropertyPostInterceptor.

This should fix both optimized and unoptimized cases because
the cache stub for storing with interceptor calls the runtime system.

BUG=v8:1636

TEST=cctest/test-api.cc/EmptyInterceptorDoesNotShadowAccessors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:54:57 +00:00
lrn@chromium.org
172c27a6ba Added ability to lock strings to prevent their representation or encoding from changing.
Use string locking to ensure consistent representation of source string during JSON parsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:14:41 +00:00
fschneider@chromium.org
ad5ed43c13 Fix broken Windows build.
Review URL: http://codereview.chromium.org/7983033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:42:50 +00:00
fschneider@chromium.org
fdaadb78d6 Landing for miket@chromium.org: Add an optional source length field to the Extension constructor.
Original code review: http://codereview.chromium.org/7889046/
Review URL: http://codereview.chromium.org/7978028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:28:09 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
jkummerow@chromium.org
1db6be7f2b Fix a few clang warnings (which -Werror treats as errors)
Review URL: http://codereview.chromium.org/7779033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 07:41:45 +00:00