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
antonm@chromium.org
48e6274cc3
Allows not API functions as inputs for CreationConext method.
...
Review URL: http://codereview.chromium.org/7552034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 06:40:14 +00:00
danno@chromium.org
bdf6895bb3
Encapsulate element handling into a class keyed on ElementsKind
...
Advantage is that it's much easier to add new element types (like FAST_SMI_ELEMENTS), and that handling logic for each element kind is (more) consolidated.
Currently, only GetElementsWithReceiver uses the new encapsulation, but the goal is to move much more element functionality into the class incrementally.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7527001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 11:12:46 +00:00
kmillikin@chromium.org
4487f8c050
Revert "Revert "Fix a bug in scope analysis.""
...
Reapply r8783 with an additional fix.
Because the preparser and parser do not use the same scope analysis to
determine if a function can be lazily compiled, the parser can have false
positives. Rather than treating this as a parse error, treat the preparser
as authoritative and eagerly compile the function.
R=lrn@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7565003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 09:10:35 +00:00
jkummerow@chromium.org
0aab25fabf
Fix: FunctionTemplate::SetPrototypeAttributes broke prototype object
...
BUG=v8:1539
TEST=cctest test-api/SetPrototypeAttributes
Review URL: http://codereview.chromium.org/7324027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 15:01:45 +00:00
danno@chromium.org
3e7d642d0a
Remaining changes to fully support FastDoubleArray.
...
R=ager@chromium.org
BUG=none
TEST=cctests, unboxed-double-array.js
Review URL: http://codereview.chromium.org/7473031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:04:16 +00:00
ager@chromium.org
645bb1b1ba
Add GetPropertyAttribute method for Object in the API
...
Patch by Peter Varga.
BUG=none
TEST=cctest/test-api/PropertyAttributes
Review URL: http://codereview.chromium.org/7321006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 17:44:57 +00:00
vegorov@chromium.org
615add8463
Expose APIs for detecting boxed primitives, native errors and Math.
...
While implementing structured clone I found that I need support
for detecting and creating objects using the builtin Number, String
and Boolean constructors; this CL adds this support. I also need
to be able to detect entities of "native object type (e.g., Error)",
hence the new IsNativeError() calls.
(ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data )
Patch by Luke Zarko.
Review URL: http://codereview.chromium.org/7344013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:00:04 +00:00
sgjesse@chromium.org
54e81c351f
Add source position recording for variable loads
...
This provides more precise source to generated code mapping as variable loads can be handled using IC calls.
R=kmillikin@chromium.org
BUG=v8:1527
TEST=test/message/regress/regress-1527
Review URL: http://codereview.chromium.org//7327038
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 15:20:17 +00:00
vitalyr@chromium.org
fe7bdf1fe8
Remove unmarked entries from per context map caches.
...
Made "map_cache" a weak field of global context and added a pass over
all caches late in the marking phase.
R=vegorov@chromium.org
BUG=v8:1516
TEST=cctest/test-api/Regress1516
Review URL: http://codereview.chromium.org/7285031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 12:47:18 +00:00
keuchel@chromium.org
628a2e2a1f
Better codegen for '<expression> === void <literal>'.
...
Detect the pattern in both, the full compiler and crankshaft and generate direct pointer
comparisons. Along the way I cleaned up 'typeof <expression> == <string literal>' comparisons
as well by lifting platform independent code and checking the symmetric case.
BUG=v8:1440
TEST=cctest/test-api.cc
Review URL: http://codereview.chromium.org/7216008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 14:30:10 +00:00
lrn@chromium.org
1eb34e542c
Make extensions in different tests have different names.
...
In the threaded test, they influenced each other.
Review URL: http://codereview.chromium.org/7244001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-23 08:28:23 +00:00
jkummerow@chromium.org
1e1387f12c
Add possibility to configure 'prototype' property via FunctionTemplate
...
BUG=v8:1479
TEST=test-api/SetPrototypeProperties
Review URL: http://codereview.chromium.org/7229007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 12:39:45 +00:00
lrn@chromium.org
8c538d9012
Made parser not accept unicode escapes inside "native" when used as a keyword.
...
This is a regression relative to the original behavior, when "native" was a keyword,
since keywords cannot contain esacpes.
Added tests for escapes and for not allowing line-terminators betwen "native" and "function".
Review URL: http://codereview.chromium.org/7206022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 11:52:24 +00:00
karlklose@chromium.org
f4e4bc43a8
Merge arguments branch to bleeding edge (second try).
...
Review URL: http://codereview.chromium.org/7187007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 14:12:58 +00:00
karlklose@chromium.org
cc19d1e278
Revert "Merge arguments branch to bleeding merge."
...
This reverts commit ceb31498b9d69edca3260820fb4047045891ce6d.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/7172030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 06:37:49 +00:00
karlklose@chromium.org
6cfeb2d400
Merge arguments branch to bleeding merge.
...
Review URL: http://codereview.chromium.org/7167006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 15:09:28 +00:00
ricow@chromium.org
40fa4a761b
Correctly set ReadOnly flag on indexed properties when using the API Set method (fixes issue 1470)
...
Review URL: http://codereview.chromium.org/7149015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 06:44:57 +00:00
ricow@chromium.org
38a75cf731
Geve correct error message when Object.isExtensible is called on a non object (fixes issue 1452)
...
Review URL: http://codereview.chromium.org/7146010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 11:28:14 +00:00
ager@chromium.org
b7a93d417d
Add GetOwnPropertyNames method for Object in the API
...
Patch by Peter Varga.
BUG=none
TEST=cctest/test-api/PropertyEnumeration
Review URL: http://codereview.chromium.org/7129058
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:33:55 +00:00
mikhail.naganov@gmail.com
508b22c436
"Deiceolate" Thread classes.
...
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.
This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.
As a side effect, we have also fixed the DebuggerAgent test.
Thanks to Vitaly for help in fixing isolates handling!
R=vitalyr@chromium.org
BUG=none
TEST=none
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
mikhail.naganov@gmail.com
47248cc5fe
Revert accidental r8254..r8256
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
6891dd204c
tests compile but crash
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:36:18 +00:00
mikhail.naganov@gmail.com
3b2470d296
Fix presubmit errors catched by a more recent version of cpplint.py.
...
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].
BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).
AFTER an access control section there should be no blank line.
TBR=ager@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
fschneider@chromium.org
7c9cf0b3a1
Re-land r8140: Deoptimize on never-executed code-paths.
...
Original cl: http://codereview.chromium.org/7105015
I'm removing the test GlobalLoadICGC test that was introduced for testing
inlined global cell loads (in the classic backend) and has an invalid assumption
about the number of global objects referenced from a v8 context. We don't have
this feature with Crankshaft anymore.
Review URL: http://codereview.chromium.org/7112032
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 14:57:25 +00:00
ager@chromium.org
017935408d
Reapply change to Pass undefined to JS builtins when called with
...
implicit receiver.
A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.
R=fschneider@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js
Review URL: http://codereview.chromium.org/7085034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 13:49:22 +00:00
ager@chromium.org
c832c467a4
Revert "Pass undefined to JS builtins when called with implicit receiver."
...
Presubmit and failing test.
TBR=lrn@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7071009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:22:29 +00:00
ager@chromium.org
19b718fe73
Pass undefined to JS builtins when called with implicit receiver.
...
A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.
R=lrn@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js
Review URL: http://codereview.chromium.org/7068009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:07:48 +00:00
ager@chromium.org
98778dc802
Remove execScript from V8. No longer present i neither Firefox nor Safari.
...
R=ricow@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7046002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 08:10:27 +00:00
vegorov@chromium.org
925107046e
Extend Handle API with MarkIndependent.
...
Garbage collector is free to ignore object groups for independent handles and can collect then in minor collections.
Review URL: http://codereview.chromium.org/7031005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 12:18:19 +00:00
ricow@chromium.org
964dbff40d
Only send null or undefined as receiver for es5 natives, not generally
...
for builtin functions.
Review URL: http://codereview.chromium.org/7012012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 07:26:44 +00:00
vitalyr@chromium.org
4cc800b3cf
Support %_IsUndetectableObject in crankshaft.
...
Review URL: http://codereview.chromium.org/6995046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:53:43 +00:00
jkummerow@chromium.org
944a388412
Avoid using a register for constant external array indices.
...
This CL is based on and obsoletes CL 6879037.
TEST=mjsunit/external-array.js
Review URL: http://codereview.chromium.org/6902112
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 15:25:17 +00:00
ager@chromium.org
8033be880e
Add IsCallable method for Object in the API
...
Patch by Peter Varga.
BUG=none
TEST=cctest/test-api/CallableObject
Review URL: http://codereview.chromium.org/6964005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 15:24:48 +00:00
ager@chromium.org
0961b1a936
Check that receiver is JSObject on API calls.
...
R=sgjesse@chromium.org
BUG=v8:1369
TEST=mjsunit/regress/regress-1369.js
Review URL: http://codereview.chromium.org/6931056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 14:14:16 +00:00
ager@chromium.org
cf19179266
Implement CallAsConstructor method for Object in the API
...
Patch by Peter Varga.
BUG=v8:1348
TEST=cctest/test-api/ConstructorForObject
Review URL: http://codereview.chromium.org/6902108
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 11:07:52 +00:00
ricow@chromium.org
1d9133bbac
Split threaded cctests into four parts (instead of 2)
...
The number of cctests are now so large that this is causing timeouts
when only splitting these into two parts.
Review URL: http://codereview.chromium.org/6929063
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 09:22:54 +00:00
dslomov@chromium.org
2500f14868
This implements per-isolate locking and unlocking, including tests
...
BUG=
TEST=
Committed: http://code.google.com/p/v8/source/detail?r=7734
Committed: http://code.google.com/p/v8/source/detail?r=7784
Review URL: http://codereview.chromium.org/6788023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 18:55:31 +00:00
dslomov@chromium.org
6e4629a81c
Revert "This implements per-isolate locking and unlocking, including tests"
...
This reverts commit 1aa40d0c278e195e9e69dcf8b29a212aa1817c0b.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 22:35:42 +00:00
dslomov@chromium.org
d54fe47fad
This implements per-isolate locking and unlocking, including tests
...
BUG=
TEST=
Committed: http://code.google.com/p/v8/source/detail?r=7734
Review URL: http://codereview.chromium.org/6788023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 21:04:32 +00:00
ager@chromium.org
82a04c7fdc
Add CallAsFunction method to the Object class in the API
...
Patch by Peter Varga.
BUG=v8:1336
TEST=cctest/test-api/CallAsFunction
Review URL: http://codereview.chromium.org/6883045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 13:03:08 +00:00
ager@chromium.org
24f19608d4
Actually revert "Add Call method to the Object class in the API"
...
Tests are failing in debug mode.
This also reapplies the change "Make Date and RegExp inherit from
Object in the API" that I accidentally reverted.
R=sgjesse@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6927009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:07:09 +00:00
ager@chromium.org
26c775da94
Revert "Make Date and RegExp inherit from Object in the API."
...
Tests are failing in debug mode.
R=sgjesse@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6930004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:51:07 +00:00
ager@chromium.org
b8cdecb517
Add Call method to the Object class in the API
...
Patch by Peter Varga.
BUG=v8:1336
TEST=cctest/test-api/CallAsFunction
Review URL: http://codereview.chromium.org/6883045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:03:49 +00:00
ager@chromium.org
87f225936f
Make Date and RegExp inherit from Object in the API.
...
They are objects and the API inheritance hierarchy should reflect that.
R=sgjesse@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6929008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 07:28:27 +00:00
ager@chromium.org
8aeaa5e90a
Implement API to disallow code generation from strings for a context.
...
R=sgjesse@chromium.org
BUG=v8:1258
TEST=test-api/AllowCodeGenFromStrings
Review URL: http://codereview.chromium.org/6905167
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 05:40:47 +00:00
dslomov@chromium.org
7088aea3eb
Revert "This implements per-isolate locking and unlocking, including tests"
...
This reverts commit 76c78febb70e75b18214f5fe45de95c7fb515386.
This change has broken test-thread-termination/TerminateMultipleV8Threads
TBR=vitalyr
Review URL: http://codereview.chromium.org/6903154
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 22:16:45 +00:00