Commit Graph

613 Commits

Author SHA1 Message Date
bmeurer@chromium.org
c5751ce72c Let SetEntropySource() fail if called after V8::Initialize().
BUG=v8:2905
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 14:11:32 +00:00
dcarney@chromium.org
9a62b1dab7 move CopyablePersistentTraits to v8.h
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 11:27:07 +00:00
dcarney@chromium.org
86a2e4849a remove Isolate::GetCurrent from Context api functions
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 11:25:52 +00:00
dcarney@chromium.org
f34340033e new gc callbacks with isolate parameters
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 12:37:22 +00:00
dcarney@chromium.org
0e90c68908 reland 16744: add context save for GenerateFastApiCall
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 11:37:48 +00:00
dcarney@chromium.org
c09d00d1b0 revert 16744 for breaking build
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 07:53:56 +00:00
dcarney@chromium.org
0020146f24 add context save for GenerateFastApiCall
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 07:19:50 +00:00
svenpanne@chromium.org
7b41d6d491 Fixed shared_library build on Windows.
BUG=v8:2879
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-16 12:08:30 +00:00
mstarzinger@chromium.org
34edb73332 Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1.
The goal is to unify PropertyCallbackInfo and FunctionCallbackInfo so that they
contain the same fields.

The field order will be:
holder
isolate
return value default value
return value
data
this

This step 1 reorders the PropertyCallbackInfo fields.

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

Committed: http://code.google.com/p/v8/source/detail?r=16673

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 14:32:14 +00:00
mstarzinger@chromium.org
e6d10e4243 Revert "Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1."
TBR=marja@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 10:03:56 +00:00
mstarzinger@chromium.org
541840f8c1 Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1.
The goal is to unify PropertyCallbackInfo and FunctionCallbackInfo so that they
contain the same fields.

The field order will be:
holder
isolate
return value default value
return value
data
this

This step 1 reorders the PropertyCallbackInfo fields.

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 09:09:39 +00:00
bmeurer@chromium.org
8dbd822855 Reland "Deuglify V8_INLINE and V8_NOINLINE."
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 08:57:10 +00:00
mstarzinger@chromium.org
718a6a9a9e Revert r16648, r16641, r16638 and r16637.
Original descriptions were:
- "Refactor and cleanup VirtualMemory."
- "Fix typo."
- "Deuglify V8_INLINE and V8_NOINLINE."
- "Don't align size on allocation granularity for unaligned ReserveRegion calls."

Reasons for the revert are:
- Our mjsunit test suite slower by a factor of 5(!) in release mode.
- Flaky cctest/test-alloc/CodeRange on all architectures and platforms.
- Tankage of Sunspider by about 6% overall (unverified).

TBR=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 18:30:01 +00:00
dslomov@chromium.org
488ba18a13 Clean-up v8::ArrayBuffer::Allocator interface
BUG=v8:2823
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 12:54:28 +00:00
bmeurer@chromium.org
b60d340e08 Deuglify V8_INLINE and V8_NOINLINE.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 10:28:09 +00:00
titzer@chromium.org
562d8ddcb9 Remove dead strings from heap.h
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 08:58:38 +00:00
svenpanne@chromium.org
4ef84b9240 Add a ResourceConstraint for the embedder to specify that V8 is running on a memory constrained device.
This enables us to specialize certain operations such that we limit memory
usage on low-memory devices, without reducing performance on devices which
are not memory constrained.

BUG=chromium:280984
R=svenpanne@chromium.org

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

Patch from Ross McIlroy <rmcilroy@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 10:57:00 +00:00
svenpanne@chromium.org
d9bc6f7078 Move Maybe template into v8.h so it can be used by SetResourceConstraints
BUG=
R=svenpanne@chromium.org

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

Patch from Ross McIlroy <rmcilroy@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 10:53:33 +00:00
dcarney@chromium.org
dcc93c9144 restore persistent dtor
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 09:24:53 +00:00
svenpanne@chromium.org
d571a91e4a Remove HandleScope default ctor.
BUG=chromium:236173
R=bmeurer@chromium.org, svenpanne@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-10 06:43:23 +00:00
dcarney@chromium.org
3d855d4707 remove commented out code in v8.h
TBR=dslomov@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 10:26:25 +00:00
dcarney@chromium.org
8fa8ca8b1a temporarily remove persistent destructor to allow trunk push
TBR=dslomov@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 10:10:26 +00:00
dcarney@chromium.org
66c8b527e8 new persistent semantics
adds copying and autodispose as traits

R=marja@chromium.org, mstarzinger@chromium.org, svenpanne@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 09:25:23 +00:00
dcarney@chromium.org
c20f87a654 add uncached Function::New
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:52:52 +00:00
dcarney@chromium.org
5b0a281604 revert 16584 for breaking build
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:16:24 +00:00
dcarney@chromium.org
ddc5d437bb add uncached Function::New
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:08:34 +00:00
bmeurer@chromium.org
63c817cc55 Drop GetCurrentThreadId() and TerminateExecution(int) from the external API.
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-06 11:29:13 +00:00
dcarney@chromium.org
913b244bb5 invert Eternal::IsEmpty logic
R=svenpanne@chromium.org
BUG=v8:2870

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-04 08:19:14 +00:00
dcarney@chromium.org
615c34869c Push SetAccessor to Template
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-04 07:45:36 +00:00
svenpanne@chromium.org
625874a48c Deprecate Persistent functions which were marked to be deprecated.
BUG=
R=svenpanne@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-03 07:34:34 +00:00
titzer@chromium.org
7bd61f8ca4 Remove OptimizedCodeEntry *sigh*.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-02 10:35:34 +00:00
yurys@chromium.org
1379f4efeb Add scriptId to StackTrace frames.
BUG=v8:2865
R=verwaest@chromium.org, yurys@chromium.org

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

Patch from Vsevolod Vlasov <vsevik@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-30 14:54:59 +00:00
dcarney@chromium.org
740bfa5dd0 fix eternal casts
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-30 09:03:27 +00:00
yurys@chromium.org
1083d1f817 Remove deprecated profiler API
This change removes --prof-lazy command line flag that was introduced for the old CPU profiler implementation in Chrome DevTools. DevTools now use profiler API defined in v8-profiler.h

This change also removes methods for pausing resuming --prof profiler. These methods were deprecated in v.3.20 (https://code.google.com/p/v8/source/browse/branches/3.20/include/v8.h#4629)

After this change the profiler will always start if --prof option is passed and can be stopped either in the tests or if write to log file fails.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-29 10:42:55 +00:00
titzer@chromium.org
22b70b0508 Add OptimizedCodeEntry as a new heap object type. An optimized code entry represents an association between the native context, a function, optimized code, and the literals. Such associations are needed by the deoptimizer and optimized code cache to efficiently find related optimized code and functions for a given context or shared function info.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 16:48:40 +00:00
haitao.feng@intel.com
b2ca7e0b0a Introduce SmiValuesAre31Bits and SmiValuesAre32Bits global predicate functions
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-27 14:13:40 +00:00
dcarney@chromium.org
166b6d0747 remove old style callbacks
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-27 11:47:52 +00:00
mstarzinger@chromium.org
fc68cb74e5 Add RemovePrototype to FunctionTemplate
This allows functions created from a FunctionTemplate to not have a
prototype property, which is required by DOM methods.

R=mstarzinger@chromium.org
BUG=chromium:272440

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-26 17:40:03 +00:00
dcarney@chromium.org
ad9cc8e716 js accessor creation on Template
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-26 11:59:14 +00:00
dcarney@chromium.org
b1bc71a510 abstract eternal into class
R=rossberg@chromium.org, svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-26 09:41:22 +00:00
bmeurer@chromium.org
7a2c253e24 Move OS/compiler/feature detection to public v8config.h header.
From now on the v8config.h header should be the one and
only file where we do (freaky) checks to detect OS, C++
compiler or certain compiler features. Since we need that
both internally and for the public API, the new v8config.h
is the proper place to add (everything is prefixed with V8_
so we are safe).

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-23 07:32:25 +00:00
mstarzinger@chromium.org
798809ce73 Adding missing operator!= for Handle and Persistent.
BUG=
R=mstarzinger@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-21 10:49:29 +00:00
bmeurer@chromium.org
aca068462f Fix -Wconversion warnings in external V8 headers.
BUG=v8:2830
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-09 10:33:08 +00:00
yangguo@chromium.org
5818d831c5 Make JSON::Parse return Local<Value>
It should be able to return Smi, etc. Not only JSObject.

BUG=v8:2821
TEST=cctest/test-api/JSONParseNumber
R=yangguo@chromium.org

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

Patch from Takeshi Yoshino <tyoshino@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 09:11:39 +00:00
dcarney@chromium.org
cd74a09886 expose eternal handle api
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 08:26:23 +00:00
yurys@chromium.org
2144dc2d0f Define V8EXPORT only in v8.h and use it in the other headers
V8EXPORT is defined in each header of V8 public API and the definitions already have some slight discrepancies. This CL makes all headers use the same definition in v8.h

BUG=None
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 14:37:35 +00:00
jochen@chromium.org
cb68e2cd9b Expose JSON parser through V8 API
BUG=v8:2821
TEST=cctest/test-api/JSONParse
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 11:14:46 +00:00
dcarney@chromium.org
207396101f introduce eternal handles
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 09:46:23 +00:00
dcarney@chromium.org
eb52c66fd0 IsNearDeath needs to include pending nodes
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 06:58:48 +00:00
dslomov@chromium.org
5230c19d8b Add size_t length argument to v8::ArrayBuffer::Allocator::Free.
The previous implementation of Free is a deprecated overload now.

R=mstarzinger@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 13:03:06 +00:00
dslomov@chromium.org
f8b80ca66d Revert "Add size_t length argument to v8::ArrayBuffer::Allocator::Free."
This reverts r16031 for breaking shared build.

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 12:56:53 +00:00
dslomov@chromium.org
1688f3c167 Add size_t length argument to v8::ArrayBuffer::Allocator::Free.
The previous implementation of Free is a deprecated overload now.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 12:19:22 +00:00
dslomov@chromium.org
4ebeda216d Speed-up 'new TypedArray(arrayLike)'.
Handle specially the cases when the argument is a typed array,
in particular of the same type as the one we create.

Allocate backing store uninitialized in cases when we can guarantee
complete initialization.

R=bmeurer@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:52:21 +00:00
dslomov@chromium.org
791e1a9cb2 Revert "Speed-up 'new TypedArray(arrayLike)'."
This reverts commit r15998 for breaking NaCl build.

TBR=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:47:39 +00:00
dslomov@chromium.org
d208eea478 Speed-up 'new TypedArray(arrayLike)'.
Handle specially the cases when the argument is a typed array,
in particular of the same type as the one we create.

Allocate backing store uninitialized in cases when we can guarantee
complete initialization.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:19:51 +00:00
verwaest@chromium.org
e53471dbaa Remove elements transitions from the transition array.
This is preparatory work for reordering the transition tree. Since elements transitions will be at the root of the transition tree, runtime access to them is slow since we have to walk the transition tree backwards first. Hence remove the optimization that promoted them to a special field, requiring a pointer (mostly NULL) in every non-simple transition array.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 17:08:50 +00:00
mstarzinger@chromium.org
96fc677d25 Pipe a script's CORS status through V8 during compilation.
In order to properly sanitize exception data during a 'window.onerror'
handler, we need to know whether a script was served with proper CORS
headers at the time it was loaded into V8. This patch adds a single bool
to ScriptOrigin, and pipes that through the compiler to land on the
Script object. We can then retrieve the parameter when calling the
embedder's exception callback.

BUG=crbug.com/159566
R=mstarzinger@chromium.org

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

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 17:05:50 +00:00
svenpanne@chromium.org
31e56df122 Prepare some ValueOf renamings.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 07:05:15 +00:00
jochen@chromium.org
0826f85a02 Put object templates of the i18n extension on the heap object.
Using function local statics doesn't work, as we need the templates per
isolate.

I'm not #ifdef'ing the definitions out, because kEmptyStringRootIndex
changes depending on whether the two additional slots are present or
not.

BUG=v8:2745
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 16:01:02 +00:00
hpayer@chromium.org
3c0483af52 Fix TargetSpace() method for box type.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 19:05:00 +00:00
yurys@chromium.org
682a0d65c6 Deprecate v8::V8::Pause/ResumeProfiler
The methods were added to the public API in r1185 when Chrome DevTools were using the same output as produced for tick processor when --prof option is specified.

I don't see any existing clients of these methods and since they add a noticeable complexity to the profiler code I'd like to remove them.

BUG=None
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 13:44:15 +00:00
adamk@chromium.org
625a0e9759 Add map transition for observed objects
This patch enables objects to undergo a single transition when they become observed, avoiding the need to create a new map for every observed objects.

Observed objects which become unobserved does not cause another map transition and unobserved does not clear the observed bit on the map. The unobserved object.

R=verwaest@chromium.org

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

Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-13 00:20:40 +00:00
jochen@chromium.org
97409c2363 Move InitializeICU() to the V8 API and use it.
I can't get rid of the enable_i18n flag yet, as we need to be able to
turn off all extensions for creating the snapshot.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 09:58:54 +00:00
mvstanton@chromium.org
67d9051bcd Create AllocationSite objects, pointed to by AllocationSiteInfo.
This creates a platform where we can do additional things with allocation sites,
other than just aid in reducing array transitions.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 10:02:16 +00:00
dslomov@chromium.org
7e0ee5301e Add internal fields to JSArrayBufferViews (JSTypedArray and JSDataView)
In Blink, JSTypedArray and JSDataView objects act as "wrappers" for C++
objects. Wrapping protocol in Blink requires all wrapper JavaScript objects
to have a certain amount of internal fields that Blink uses for
book-keeping (essentially a pointer to C++ object and some type
information). This change adds those internal fields to JSTypedArray and
JSDataView, in a similiar way to how it is done for JSArrayBuffer.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:12:36 +00:00
mstarzinger@chromium.org
de07db147f Ensure CheckInitialized is present independent of define.
This makes sure that the same symbols are present, independent of which
defines have been used while building V8. Otherwise only embedders with
compatible defines would be able to link against that binary.

R=danno@chromium.org
BUG=chromium:255779

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:57:15 +00:00
yurys@chromium.org
0ac0edb707 Test that profiler is stopped when isolate is being disposed
The only way to get v8::CpuProfiler instance in the V8 public API is to call v8::Iolate::GetCpuProfiler(). The method will return NULL if the isolate has not been initialized yet or has been torn down already. It is the client's reponsibility to make sure that CPU profiling has been stopped before disposing of the isolate.

This CL adds a test for this and several ASSRTS enforcing that assumptions. This allowed to be sure that heap is always setup when CPU profiling is being started. Based on that the number of places where already compiled functions are reported to the profiler event processor boils down to the single place (CpuProfiler::StartProcessorIfNotStarted). I'm going to rely on this assumption in further changes.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:32:52 +00:00
yangguo@chromium.org
cc2f01d31f Restore message when rethrowing in TryCatch.
Based on a patch contributed by Andrew Paprocki <andrew@ishiboo.com>.

R=jkummerow@chromium.org
BUG=
TEST=cctest/test-api/TryCatchNestedSyntax

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 10:54:39 +00:00
danno@chromium.org
1642f32d1c 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

Committed: http://code.google.com/p/v8/source/detail?r=15361

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@15384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:40:41 +00:00
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
loislo@chromium.org
53eb53f4af CPUProfiler: It is not clear why we are using Handle<Object> for scriptId. Lets flip it into Smi/int.
By the nature it is integer. So we can work with it as with Smi internaly and use int in the external API.

BUG=none
TEST=existing tests
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 14:57:47 +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
1c22b2cd98 Make a Persistent ctor take const Persistent& instead of Persistent&.
BUG=
R=mstarzinger@chromium.org, svenpanne@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 09:34:56 +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
dcarney@chromium.org
8202410cca deprecate old style callbacks
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 12:53:19 +00:00
dcarney@chromium.org
43a805fc27 added type checks on fast return values
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 07:39:15 +00:00
dcarney@chromium.org
eeded306fd webkit build fix for 15142
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 12:53:19 +00:00
dcarney@chromium.org
a1d359d20e remove V8_USE_UNSAFE_HANDLES define
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 09:46:43 +00:00
dcarney@chromium.org
274221b06c build fix for 15107
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 09:55:42 +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
danno@chromium.org
1b89cbf817 Separate Cell and PropertyCell spaces
This makes it possible to store additional information on property cells, for example Type and optimized Code dependencies.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 15:03:44 +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
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
dslomov@chromium.org
b3282c290e Recording array buffer views.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 10:52:11 +00:00
dcarney@chromium.org
a0f786f022 Make ReturnValue a friend of Persistent, so it can use operator*.
BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 10:46:51 +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
2149ac97ee build fix for 14990
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 07:54:39 +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
rossberg@chromium.org
372457a793 Allow smis for singleton types
To that end, introduce a generic Box struct.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 15:40:28 +00:00
verwaest@chromium.org
16199c63d8 Initialized representations of computed values to None.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 14:21:35 +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
98b97d9edb build fix for 14973
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 12:32:32 +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
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
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +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
595d0ea8b0 remove old MakeWeak
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 08:17:04 +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
fec64cd698 remove most remaining V8_ALLOW_ACCESS_TO* defines
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:39:37 +00:00
dcarney@chromium.org
7b82ad9b98 de-isolate remaining persistent calls
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:32:45 +00:00
dcarney@chromium.org
ff2a76b5d5 remove most V8_ALLOW_ACCESS_TO_* defines from test classes
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 11:54:52 +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
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
366948840a de-isolate Persistent::Dispose
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 08:19:27 +00:00
verwaest@chromium.org
36e91242fd Make Object.freeze fast
This patch both speeds up the freeze operation itself, but also
allows properties to remain in fast mode. Objects with non-empty
elements backing stores still end up with slow elements.

Relanding r14758 and r14759 with fix for Test262: only mark properties
and elements READ_ONLY if they are not JS setter/getters. Tightened up
tests to assert frozen-ness, and added targeted tests for the new code
(covering accessors).

BUG=v8:1858, 115960
R=verwaest@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 07:05:58 +00:00
adamk@chromium.org
4d48bb832f Revert "Make Object.freeze fast"
and "Fix Object.freeze on dictionary-backed arrays to properly freeze elements"

This reverts r14758 and r14759 due to introducing failures in Test262

TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 21:27:00 +00:00
adamk@chromium.org
648e99e308 Make Object.freeze fast
This patch both speeds up the freeze operation itself, but also
allows properties to remain in fast mode. Objects with non-empty
elements backing stores still end up with slow elements.

BUG=v8:1858, 115960
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 18:53:58 +00:00
ulan@chromium.org
aadfc39a12 Fix Windows shared library build.
We cannot dll-export templates.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 15:12:07 +00:00
dcarney@chromium.org
64aa48349e build fix for 14738
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 07:32:36 +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
dslomov@chromium.org
2ff3e2e0f4 Preallocate transitioned maps for TypedArrays.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 15:23:53 +00:00
svenpanne@chromium.org
cfe3e039ca Don't use anonymous types declared in an anonymous union.
They are a non-standard extension (probably in C1X, IIRC), but clang is unhappy
with them when -Wnested-anon-types is enabled, which seems to be implied by
-pedantic.

With this change and the previous fix for clang, we are now -Werror clean, even
on clang 3.3.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 12:04:04 +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
danno@chromium.org
05e8e0e7b4 Elide hole checks on KeyedLoads of holey double arrays
Improves NavierStokes by about 5%

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 07:35:26 +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
wingo@igalia.com
3f09e0a3d8 Remove separate maps for function instances
ES3 specified that functions created via Function() would have
enumerable prototypes, unlike function literals.  For this reason, V8
has always had two prototypes for functions: "function_map" for
literals, and "function_instance_map" for "function instances": those
functions created by Function().

However, since 2009 or so, both maps have been the same!  Both have had
writable, non-enumerable prototypes.  Moreover, ES5 changed to specify
that function instances would have non-enumerable prototypes.

This patch removes the separate maps for function instances in sloppy
and strict mode.

R=mstarzinger@chromium.org
TEST=mjsunit/function-prototype
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 12:59:20 +00:00
mstarzinger@chromium.org
0a224352ad Deprecate the version of Context::New which returns a Persistent.
BUG=
R=svenpanne@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 12:48:53 +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
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
2e856d2c16 expose AssertNoAllocation to api
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 20:28:02 +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
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
dcarney@chromium.org
0a32b57594 HasOnlyAsciiChars can return incorrect results. Fixup usages and rename.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 11:34:44 +00:00
dcarney@chromium.org
f28bd182b0 forgot parends around macro arg
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 10:52:14 +00:00
dcarney@chromium.org
d0f9b7386b Defer slow branch of GetAlignedPointerFromInternalField
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 07:28:08 +00:00
hpayer@chromium.org
7ed7af2f9f Tell the GC prologues to construct RetainedObjectInfos only when needed.
The GC prologue is called by the GC, but also by the heap snapshotter. The
RetainedObjectInfos are only needed by the heap snapshotter, so it's wasteful to
construct them always. (And it will be even more wasteful when Blink migrates to
the new GC APIs, since after that point it no longer knows about object groups.)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:08:10 +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