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
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