yurys@chromium.org
827e827b38
Cache result of ScriptNameOrSourceURL function. The function is quite slow on large(several MBs) scripts which causes significant slowdown when capturing stack trace for such scripts.
...
Review URL: https://chromiumcodereview.appspot.com/9564012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 12:27:15 +00:00
rossberg@chromium.org
d180039f9c
Remove strict mode from message.js, seems to break Error conformance.
...
R=mstarzinger@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9426034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 15:02:23 +00:00
rossberg@chromium.org
1336b913d0
Make built-ins strict mode conforming, and support a --use-strict flag.
...
* Turned all uses of 'const' into 'var'.
* Turned all uses of local 'function' into 'var'.
* Added a couple of missing toplevel 'var' declarations.
One consequence is that the properties on the builtin object are no longer
non-writable, and I had to adapt one test. Is that a problem?
Unfortunately, we cannot actually switch the library scripts to strict mode
by default, because that makes observable things like poisoned .caller properties
for library functions.
Also removed dead flag code in Compiler::Compile.
R=yangguo@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9415010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 13:48:24 +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
keuchel@chromium.org
08b4262512
Statically check for assignments to const in harmony mode.
...
The ES.next draft rev 4 in section 11.13 reads:
It is a Syntax Error if the AssignmentExpression is contained in extended code
and the LeftHandSideExpression is an Identifier that does not statically resolve
to a declarative environment record binding or if the resolved binding is an
immutable binding.
This CL adds corresponding static checks for the immutable binding case.
TEST=mjsunit/harmony/block-const-assign
Review URL: http://codereview.chromium.org/8688007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 14:43:28 +00:00
keuchel@chromium.org
e26093f3d8
Make let/const outside of the extended mode early errors (under harmony flag).
...
The ES.next drafts require that source code that matches the productions for
let and const bindings outside the extended mode trigger early syntax
errors. This CL adapts the parser / preparser accordingly under the harmony
scoping flag.
Summary:
* Harmony scoping flag not set: Old semantics allowing const in classic mode
with function level scope. Const binding in strict mode and let bindings in
classic and strict mode trigger early syntax errors.
* Harmony scoping is set: Use new harmony const and let in
extended mode and old const in classic mode. This is to preserve
compatibility with current web pages that already use
non-standard implementations of const. An early syntax error is
thrown on const in strict mode and on let in classic and strict
mode.
This depends on:
http://codereview.chromium.org/8562002/
TEST=mjsunit/harmony/block-early-errors.js
Review URL: http://codereview.chromium.org/8564001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 06:38:04 +00:00
lrn@chromium.org
c7fccff9af
Clean up JavaScript files to better follow coding standard.
...
Multiline conditionals must use braces.
Semicolons are not optional.
Review URL: http://codereview.chromium.org/8701006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 12:11:00 +00:00
ricow@chromium.org
3a41613340
Optimize format message to not use DefineOwnProperty and freeze, do these inline
...
Review URL: http://codereview.chromium.org/8494005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:50:39 +00:00
ricow@chromium.org
086ae44213
Optimize DefineOneShotAccessor in messages.js to not call DefineOwnProperty.
...
Review URL: http://codereview.chromium.org/8490008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 09:30:28 +00:00
mstarzinger@chromium.org
cd9bc6c3a6
Fix error handling in Date.prototype.toISOString.
...
This fixes Date.prototyoe.toISOString to throw a RangeError exception
for invalid time values. It also includes a fix to removes the arbitrary
(and completely bogus) range limit on the date value during construction
of a Date object. Note that we still have bogus range limits on the year
and month values.
R=lrn@chromium.org
BUG=v8:1792
TEST=mjsunit/date,test262/15.9.5.43-0-*
Review URL: http://codereview.chromium.org/8392036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:45:04 +00:00
mstarzinger@chromium.org
5a33ffd7e8
Fix Error.prototype.toString to be ES5 conform.
...
R=lrn@chromium.org
TEST=test262/15.11.4.4-8-1,mjsunit/error-tostring
Review URL: http://codereview.chromium.org/8341021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:41:52 +00:00
keuchel@chromium.org
e8bccc2cb0
Block scoped const variables.
...
This implements block scoped 'const' declared variables in harmony mode. They
have a temporal dead zone semantics similar to 'let' bindings, i.e. accessing
uninitialized 'const' bindings in throws a ReferenceError.
As for 'let' bindings, the semantics of 'const' bindings in global scope is not
correctly implemented yet. Furthermore assignments to 'const's are silently
ignored. Another CL will introduce treatment of those assignments as early
errors.
Review URL: http://codereview.chromium.org/7992005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:33:08 +00:00
rossberg@chromium.org
46dde044de
Adapt to latest spec changes for Proxy.create[Function].
...
R=mstarzinger@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8271005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 16:25:30 +00:00
lrn@chromium.org
a47caee095
Make builtin functions be skipped in stack traces.
...
Does include exposed builtin functions ("native functions").
Review URL: http://codereview.chromium.org/8345039
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:31:33 +00:00
rossberg@chromium.org
4753976194
Fix handling of this in direct calls to function proxies.
...
Fix & tweak some proxy-related error messages.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=
Review URL: http://codereview.chromium.org/8229008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 15:55:57 +00:00
rossberg@chromium.org
e645597aa7
Implement function proxies (except for their use as constructors).
...
Introduce new %Apply native.
Extend Execution::Call to optionally handle receiver rewriting (needed for %Apply).
Fix Function.prototype.bind for functions that have .apply modified.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=
Review URL: http://codereview.chromium.org/7623011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-13 11:42:57 +00:00
danno@chromium.org
df860eda5c
Don't allow seal or element property re-definition on external arrays.
...
R=ricow@chromium.org
BUG=95920
TEST=test/mjsunit/regress/regress-95920.js
Review URL: http://codereview.chromium.org/7858031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-09 14:30:00 +00:00
lrn@chromium.org
ffffa716c5
Lock the prototype of internal classes.
...
Prototypes and their properties and methods are locked down to prevent fiddling with their operation, even if the build-in object leaks.
Made some built-in functions only work during bootstrapping.
Review URL: http://codereview.chromium.org/7799027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 07:30:35 +00:00
lrn@chromium.org
fdc7f60f42
Make functions on the built-in object non-writable.
...
Review URL: http://codereview.chromium.org/7736018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:57:02 +00:00
lrn@chromium.org
1b4cb57c52
Cleanup of messages.js.
...
Lock down some otherwise modifiable objects that don't need it.
Review URL: http://codereview.chromium.org/7828003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 07:39:22 +00:00
lrn@chromium.org
41426bde56
Fix bug introduced by earlier "cleanup".
...
TEST=message/replacement-marker-as-argument
Review URL: http://codereview.chromium.org/7696024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 12:54:03 +00:00
lrn@chromium.org
d2626be5d9
Prune some internal objects' prototypes.
...
Review URL: http://codereview.chromium.org/7703005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:51:56 +00:00
lrn@chromium.org
d8a123169b
Make regexp flag parsing stricter.
...
BUG=v8:1628
TEST=mjsunit/regress/regress-219
Review URL: http://codereview.chromium.org/7624045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 11:02:41 +00:00
keuchel@chromium.org
c6c504f8b6
Parse harmony let declarations.
...
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings
Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.
Review URL: http://codereview.chromium.org/7616009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 14:24:12 +00:00
mstarzinger@chromium.org
2bb7c74f80
Preliminary Harmony weak maps API implementation.
...
R=rossberg@chromium.org ,danno@chromium.org
BUG=v8:1565
TEST=mjsunit/harmony/weakmaps
Review URL: http://codereview.chromium.org/7529007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 11:55:13 +00:00
rossberg@chromium.org
3f5bc11c55
Implement Object.prototype.{hasOwnProperty, propertyIsEnumerable} for proxies.
...
Refactor trap invocation.
Test other Object.prototype functionality for proxies.
R=ager@chromium.org
BUG=v8:1543
TEST=
Review URL: http://codereview.chromium.org/7436004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 11:20:27 +00:00
ager@chromium.org
85f5afb717
Correctly mark functions from our natives files during compilation.
...
When creating a CompilationInfo we always have the script and can
determine if it is a natives script.
Now that all natives functions are recognized as such, many of them
are called with undefined as the receiver. We have to use different
filtering for builtins functions when printing stack traces.
Also, fixed one call of CALL_NON_FUNCTION to be correctly marked as a
method call (with fixed receiver). Now that CALL_NON_FUNCTION is
marked as a native function this caused the receiver to be undefined.
R=svenpanne@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7395030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 08:19:31 +00:00
rossberg@chromium.org
5e62e325ac
Implement sealing, freezing, and related functions for proxies.
...
R=ager@chromium.org
BUG=v8:1543
TEST=
Review URL: http://codereview.chromium.org/7391001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 13:04:52 +00:00
rossberg@chromium.org
58b913f9f0
Implement Object.defineProperty for proxies.
...
R=kmillikin@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7314003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 12:41:20 +00:00
keuchel@chromium.org
ab3d4cf7b8
Proper handling of future reserved words in strict and normal mode.
...
BUG=86442
TEST=mjsunit/keywords-and-reserved_words.js
Review URL: http://codereview.chromium.org/7207007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 14:59:51 +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
4032d2165e
Make name and message non-enumerable on Error object (this is a partial fix for issue 1215)
...
Review URL: http://codereview.chromium.org/7172011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 13:54:40 +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
whesse@chromium.org
1ea14c2041
Limit the number of arguments in a function call to 32766.
...
Limit the number of arguments in a function call to 32766. This is identical
to the limit on the number of parameters to a function.
BUG=v8:1413
TEST=
Review URL: http://codereview.chromium.org/7054074
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 08:15:47 +00:00
ager@chromium.org
22b5dfd395
Reapply: "Make instanceof and Object.getPrototypeOf work for proxies,
...
plus a few other tweaks."
The problem with the original patch was that it did not take hidden
prototype objects into account in Runtime_GetPrototype.
R=kmillikin@chromium.org ,rossberg@chromium.org
TEST=es5conform
Review URL: http://codereview.chromium.org/7056041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 10:15:49 +00:00
ager@chromium.org
ece7700d7c
Revert "Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks."
...
This change caused errors in es5conform tests for getPrototypeOf.
TBR=rossberg@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7109004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-02 10:12:00 +00:00
rossberg@chromium.org
2255860992
Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks.
...
R=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/7080053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 17:44:08 +00:00
ricow@chromium.org
ab67432ed0
Change strict mode poison pill to be the samme type error function (fixes issue 1387).
...
We are now following the spec, and with regards to the error message we are following firefox (webkit still has different type errors in their nightly)
Review URL: http://codereview.chromium.org/7067017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 11:07:06 +00:00
rossberg@chromium.org
05fd779dd3
Implement get trap for proxies.
...
TODO: reflective Object methods not handled yet.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7035007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 16:33:58 +00:00
sgjesse@chromium.org
230a56abda
Limit the number of local variables in a function
...
Review URL: http://codereview.chromium.org//7003030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 08:27:52 +00:00
ricow@chromium.org
e0eb110130
Reapply 7763, including arm and x64 variants.
...
The only difference to revision 7763 is the implementation in the
builtins file for arm and x64, plus a move of Array.prototype.toString
and Array.prototype.toLocaleString from should throw on null or
undefined to the non generic test cases in the function-call test (due
to us not currently supporting generic cases with these to functions)
Review URL: http://codereview.chromium.org/6928007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 05:21:30 +00:00
ricow@chromium.org
4d890da191
Revert 7763, missing implementation on x64 and arm for call and apply with null or undefined.
...
Review URL: http://codereview.chromium.org/6913024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:45:19 +00:00
ricow@chromium.org
2b730c2bf6
Don't exchange null and undefined with the global object in function.prototype.{call, apply} for natives.
...
This makes us compatible with firefox in throwing an exception when
call is invoked on a builtin with null as the this argument.
Review URL: http://codereview.chromium.org/6902104
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:19:04 +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
peterhal@chromium.org
e3d788329a
1309 fix
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6800018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 16:22:06 +00:00
mmaly@chromium.org
7346fbba81
Implement poison pill for non-strict mode function.caller
...
when caller is strict mode function.
Review URL: http://codereview.chromium.org/6713059/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 03:45:48 +00:00
vitalyr@chromium.org
7976ca2cbc
Merge isolates to bleeding_edge.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832
Revert r7268: it borked the history.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3
Merge isolates to bleeding_edge.
...
Review URL: http://codereview.chromium.org/6685088
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
lrn@chromium.org
c6e37c5dfb
Make Script.prototype.nameOrSourceURL use indexOf search first before trying to match with a RegExp.
...
This should use Boyer-Moore search with a long string, which is potentially
faster than RegExp search.
The target string is typically, but not guaranteed, at the end of the
source, so for long sources, there will be a lot of characters to skip.
Review URL: http://codereview.chromium.org/6709027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 13:40:48 +00:00
mmaly@chromium.org
4cbf3478d8
Implement strict mode ThrowTypeError functions for arguments object.
...
* Reverse order of arguments in-object fields for length and callee.
* Introduce arguments ThrowTypeError functions (caller/callee).
* Create strict mode arguments boilerplate object.
* Strict mode "new arguments object" stub.
* Runtime arguments object allocation.
* Update es5conform test expectations.
Review URL: http://codereview.chromium.org/6698015/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-17 20:28:41 +00:00
mmaly@chromium.org
1d1018aec7
Strict mode ThrowTypeError functions for
...
- function.caller
- function.arguments
Review URL: http://codereview.chromium.org/6694044/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-17 20:28:17 +00:00
ager@chromium.org
6428822811
Revert "Strict mode ThrowTypeError functions for"
...
TBR=mmaly@chromium.org
Review URL: http://codereview.chromium.org/6696018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-15 11:01:21 +00:00
mmaly@chromium.org
80bd958df2
Strict mode ThrowTypeError functions for
...
- function.caller
- function.arguments
Review URL: http://codereview.chromium.org/6691003/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-14 17:46:37 +00:00
mmaly@chromium.org
1d040083b0
Assignment to read only properties throws in strict mode.
...
Review URL: http://codereview.chromium.org/6594037/
Revert "Revert "Assignment to read only properties throws in strict mode.""
This reverts commit aefcd82e1d36d458dd071ebf4777340f08aa67b1.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 04:53:43 +00:00
mmaly@chromium.org
749b69853a
Revert "Assignment to read only properties throws in strict mode."
...
This reverts commit 503f2a501e504f330821f247074e731aa649b1f0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-01 06:10:41 +00:00
mmaly@chromium.org
98aea3c353
Assignment to read only properties throws in strict mode.
...
Review URL: http://codereview.chromium.org/6594037/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-01 01:42:37 +00:00
mmaly@chromium.org
bb0c22f11c
Strict mode - allow function only in SourceElements.
...
Review URL: http://codereview.chromium.org/6598023/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-28 19:07:02 +00:00
mmaly@chromium.org
180b6ec6b4
Disable const in strict mode.
...
Using const in strict mode yields SyntaxError.
Review URL: http://codereview.chromium.org/6592031/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-28 18:38:17 +00:00
ager@chromium.org
7c561be519
Remove Error.prototype.toStrings prototype property.
...
I did not use the helper function for adding this builtin function which meant that I missed the removal of the prototype property.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6588050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-28 13:29:05 +00:00
mmaly@chromium.org
9adaeb6a17
Strict mode delete of non-configurable property.
...
Strict mode flag is passed to runtime DELETE function
and then to JSObject::Delete(Property/Element) as STRICT_DELETION enum.
When deleting non-configurable property/eleemnt, TypeError is thrown.
Adding mozilla test to .gitignore.
Incorporate CR feedback.
Review URL: http://codereview.chromium.org/6515005/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 23:41:47 +00:00
mmaly@chromium.org
7e6bbab2c8
Strict mode delete of unqualified identifier.
...
SyntaxError is reported in strict mode when deleting
an unqualified identifier. (11.4.1 of Ecma-262 5th ed)
Review URL: http://codereview.chromium.org/6516003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 18:44:26 +00:00
whesse@chromium.org
602d5cf427
Fix a bug that occurs when functions are defined with more than 16,382 parameters.
...
Review URL: http://codereview.chromium.org/6447007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 12:46:22 +00:00
ager@chromium.org
52cfd6ab16
Fixed a number of issues on x64 crankshaft port:
...
- Don't use SmiSub when overflow can occur. It asserts that overflow
does not happen.
- Actually use CompareICs and signal to crankshaft whether or not smi
code was inlined.
- Fix bug in CmpI where 64 bits were compared instead of 32 bits.
- Implement Throw, DeferredStackCheck, StoreKeyedFastElement in
lithium backend.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6312193
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 07:49:59 +00:00
peterhal@chromium.org
39957aa741
Issue 117 - strict mode and future reserved words
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 18:36:37 +00:00
ager@chromium.org
015e72bbf5
Minor cleanup in messages.js. Remove unused variables and fix formatting.
...
Review URL: http://codereview.chromium.org/6410058
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 14:02:13 +00:00
ager@chromium.org
73a4ecfae1
A MessageObject is a purely internal object to hold information about
...
an error message that needs to be generated and reported. This change
hides all of the error information from JavaScript code so user
callbacks cannot get hold of it.
Review URL: http://codereview.chromium.org/6368051
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 13:31:52 +00:00
mmaly@chromium.org
a0c96dc3fb
Fix error message name.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 16:08:44 +00:00
ager@chromium.org
471c0d2983
Avoid callbacks to user code during error formatting in a couple of
...
other situations.
Do not use overwritten Object.prototype.hasOwnProperty and
Array.prototype.pop. Do not use split and join in the error formatting
implementation. They are too big to control and their generality is
not needed.
Review URL: http://codereview.chromium.org/6287041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 12:31:16 +00:00
ager@chromium.org
f8b74a1541
Avoid using Function.prototype.call in a number of places in our
...
builtins files. We should always use %_CallFunction for a couple of
reasons: it cannot be overwritten and it does not wrap basic types in
wrapper objects.
Review URL: http://codereview.chromium.org/6349018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 10:33:10 +00:00
mmaly@chromium.org
d07f1d62ff
Strict mode eval/arguments LHS.
...
Review URL: http://codereview.chromium.org/6335013/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 19:21:46 +00:00
ager@chromium.org
eb3970c822
Fix another message object leak.
...
Review URL: http://codereview.chromium.org/6269021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:16:13 +00:00
mmaly@chromium.org
2b47762e3a
Strict mode object property validation.
...
Review URL: http://codereview.chromium.org/6335010/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 18:42:35 +00:00
ager@chromium.org
d69ef26f7d
Another fix for leaking error objects. User code can overwrite
...
ReferenceError.prototype.__proto__ which will make "error instanceof
Error" fail. However, the ReferenceError.prototype object itself
cannot be modified. Therefore, the error checks must check for
concrete error instances instead of only checking for Error.
Review URL: http://codereview.chromium.org/6388003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 08:48:59 +00:00
mmaly@chromium.org
8d79f3a788
Strict mode octal literals.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 18:13:18 +00:00
ager@chromium.org
b5151d118d
Avoid calling overwritten toString methods for internal error
...
formatting. I missed a couple of places. Extracting the error object
check to a separate function.
Review URL: http://codereview.chromium.org/6304015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 07:59:40 +00:00
ager@chromium.org
bb9c9fe92c
Change recursive error printing to just replace recursively
...
encountered error objects with the empty string. This actually does
match the Safari behaviour.
Review URL: http://codereview.chromium.org/6259010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 14:11:35 +00:00
ager@chromium.org
ca14680556
Return the empty string when formatting recursive error messages. This
...
matches the behavior of Safari and Firefox. Our old behavior was to
throw a stack overflow exception.
BUG=crbug.com/70334
TEST=mjsunit/cyclic-error-to-string.js
Review URL: http://codereview.chromium.org/6261018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:44:29 +00:00
mmaly@chromium.org
4cb51b51e6
First part of strict mode.
...
- var eval | arguments
- catch (eval | arguments)
- 'with' is disabled
- function can't be named eval or arguments
Add FLAG_strict_mode
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 18:51:47 +00:00
mmaly@chromium.org
d6f88b6688
Revert strict mode (Mozilla test failure).
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 23:01:50 +00:00
mmaly@chromium.org
b4c88d5de4
First part of ES5 strict mode.
...
- var eval | arguments
- catch (eval | arguments)
- 'with' is disabled
- function can't be named eval or arguments
- function parameter name cannot be eval or arguments
- no duplicate parameter names allowed
Add FLAG_strict_mode
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:43:53 +00:00
ager@chromium.org
fd3edaf074
Fix name of the toString method on error objects. Bug caught by layout tests.
...
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/6258004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 14:51:19 +00:00
ager@chromium.org
c1306244a6
Make the 'name' property on error prototypes read-only and dont-delete
...
to avoid leaking of error objects to accessor methods when formatting
error messages internally.
Also, do not call overwritten toString methods on error objects when
formatting messages internally.
Review URL: http://codereview.chromium.org/6272004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 12:51:04 +00:00
ager@chromium.org
48acf77389
Do not allow accessors to intercept getting/setting properties on
...
error objects under construction and string conversions.
Review URL: http://codereview.chromium.org/6146009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 06:56:54 +00:00
lrn@chromium.org
f118f44130
Fix regression in JSON serialization of RegExps.
...
Tweaks to the serialization.
Review URL: http://codereview.chromium.org/5676005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 09:31:05 +00:00
kasperl@chromium.org
90b3370374
Update V8 to version 3.0 (re-land r5920).
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096
Revert r5920. Will re-land shortly.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8
Update V8 to version 3.0.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
ricow@chromium.org
01d7470b9b
Remove trailing spaces from js files.
...
This is a cosmetic change only.
Review URL: http://codereview.chromium.org/3797009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-15 13:03:59 +00:00
yurys@chromium.org
b2f444f6e6
Use //@ sourceURL when formatting stack trace
...
BUG=672
Review URL: http://codereview.chromium.org/3444011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-20 15:55:28 +00:00
sgjesse@chromium.org
aa48d61c2b
Improve performance of Error.stack when stack contains local functions.
...
BUG=http://crbug.com/53303
TEST=Use the test case attached in the bug report.
Patch by Xianzhu Wang <wangxianzhu@google.com>
Review URL: http://codereview.chromium.org/3167042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-06 09:10:11 +00:00
sgjesse@chromium.org
56e0221754
Handle accessors when generating Error.stack
...
BUG=http://code.google.com/p/v8/issues/detail?id=798
TEST=test/mjsunit/regress/regress-798.js
Review URL: http://codereview.chromium.org/3082012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 08:31:52 +00:00
ager@chromium.org
f6e049b0ce
Remove the special error message for overflows when using
...
Function.prototype.apply. This avoids having more than one error
message for stack overflow situations which makes testing a pain.
Review URL: http://codereview.chromium.org/2967003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 15:29:25 +00:00
yurys@chromium.org
abaf8347a5
Allow to capture stack trace for uncaught exceptions
...
Review URL: http://codereview.chromium.org/2961003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 13:17:27 +00:00
whesse@chromium.org
f7c85755ba
Prevent invalid pre-parsing data passed in through the API from crashing V8.
...
Review URL: http://codereview.chromium.org/2876046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-07 10:28:22 +00:00
ricow@chromium.org
eed4ed99c8
Add ES5 Object.isExtensible and Object.preventExtensions.
...
Review URL: http://codereview.chromium.org/2819034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 14:36:34 +00:00
sgjesse@chromium.org
f5b5edf2a3
Adds C++ API for retrieving a stack trace without running JavaScript
...
This API is extensible, and parameterized with flags so that callers can specify what subset of information they want to capture for each stack frame.
Patch by jaimeyap, see http://codereview.chromium.org/1694011 for details.
Review URL: http://codereview.chromium.org/2028001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 07:32:44 +00:00
mikhail.naganov@gmail.com
c2df9cc8c8
Support setting brekpoint by script name set in //@ scriptURL= comment,
...
in case script name is missing.
BUG=http://crbug.com/39290
Author: Andrey Kosyakov (caseq@chromium.org )
Original issue: http://codereview.chromium.org/1303003
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/1527007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-01 16:25:07 +00:00
kmillikin@chromium.org
1cf0439ca7
Remove trailing regexp from .js files.
...
Removed trailing whitespace using regexp replace. No other changes.
Review URL: http://codereview.chromium.org/1559006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 07:15:23 +00:00