Commit Graph

427 Commits

Author SHA1 Message Date
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
mikhail.naganov@gmail.com
4f3a8bd137 Return v8::True or v8::False instead of using Boolean::New.
BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 18:45:48 +00:00
lrn@chromium.org
cd3588d582 Make (some) functions called from builtin functions use the callback's global as receiver.
Changes GetGlobalReceiver() to GetDefaultReceiver(func) that returns undefined
for strict and native functions, and the function's context's global proxy
for "normal" functions.

BUG=v8:1547
TEST=cctest/api-test/ForeignFunctionReceiver

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:53:00 +00:00
yangguo@chromium.org
ec7b679a8d Changed the order of arguments in the check as suggested to issue 1275.
BUG=v8:1275

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 08:45:47 +00:00
lrn@chromium.org
893b8320b8 Added access check to Runtime_GetPrototype.
BUG=93759

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:22:55 +00:00
yangguo@chromium.org
011b136ee0 Slight API change enabling opting out from null termination in String::Write*().
BUG=v8:1537
TEST=cctest test-api/StringWrite

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 11:11:12 +00:00
yangguo@chromium.org
107d1b5e65 Inserted a missing string encoding check in lastIndexOf.
Review URL: http://codereview.chromium.org/7685005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 13:55:25 +00:00
danno@chromium.org
edd691960f Implement UnionOfKeys for NonStrictArguments
BUG=none
TEST=cctest/test-api/IndexedInterceptorNonStrictArgsWithIndexedAccessor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 16:15:30 +00:00
mikhail.naganov@gmail.com
7904a85592 Remove some unnecessary namespace alias definitions.
We can pick the namespace alias 'i' from v8.h which is already included
in those files.

BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

--------------

Inline the implementation of Handle default ctor.

BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 10:29:05 +00:00
lrn@chromium.org
654417d1a9 Make threaded tests not use static fields for communication.
TEST=cctest/Threaded4

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 09:08:44 +00:00