mstarzinger@chromium.org
b6efbd79de
Force context allocation for variables in generator scopes.
...
* src/scopes.h (ForceContextAllocation, has_forced_context_allocation):
New interface to force context allocation for an entire function's
scope.
* src/scopes.cc: Unless a new scope is a function scope, if its outer
scope has forced context allocation, it should also force context
allocation.
(MustAllocateInContext): Return true if the scope as a whole has
forced context allocation.
(CollectStackAndContextLocals): Allow temporaries to be
context-allocated.
* src/parser.cc (ParseFunctionLiteral): Force context allocation for
generator scopes.
* src/v8globals.h (VariableMode): Update comment on TEMPORARY.
* src/arm/full-codegen-arm.cc (Generate):
* src/ia32/full-codegen-ia32.cc (Generate):
* src/x64/full-codegen-x64.cc (Generate): Assert that generators have no
stack slots.
* test/mjsunit/harmony/generators-instantiation.js: New test.
BUG=v8:2355
TEST=mjsunit/harmony/generators-instantiation
Review URL: https://codereview.chromium.org/13408005
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 13:19:31 +00:00
mstarzinger@chromium.org
d71678676f
Refactor parser mode configuration for correctness
...
This patch refactors the parser and preparser interface to be more
readable and type-safe. It has no behavior changes.
Previously, parsers and preparsers were configured via bitfield called
parser_flags in the Parser constructor, and flags in
PreParser::PreParseProgram, ParserApi::Parse, and ParserApi::PreParse.
This was error-prone in practice: six call sites passed incorrectly
typed values to this interface (a boolean FLAG value, a boolean false
and a boolean true value). None of these errors were caught by the
compiler because it's just an "int".
The parser flags interface was also awkward because it encoded a
language mode, but the language mode was only used to turn on harmony
scoping or not -- it wasn't used to actually set the parser's language
mode.
Fundamentally these errors came in because of the desire for a
procedural parser interface, in ParserApi. Because we need to be able
to configure the parser in various ways, the flags argument got added;
but no one understood how to use the flags properly. Also they were
only used by constructors: callers packed bits, and the constructors
unpacked them into booleans on the parser or preparser.
The solution is to allow parser construction, configuration, and
invocation to be separated. This patch does that.
It passes the existing tests.
BUG=
Review URL: https://codereview.chromium.org/13450007
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 13:01:06 +00:00
yangguo@chromium.org
c02bf4515c
Remove push(holder_reg) in CheckAccessGlobalProxy.
...
R=jkummerow@chromium.org
BUG=v8:119
Review URL: https://chromiumcodereview.appspot.com/13177002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 12:06:34 +00:00
yangguo@chromium.org
deecbb2e01
Do not implicitly convert non-object receivers for strict mode functions.
...
This was still the case for Array.prototype.* builtin functions.
R=rossberg@chromium.org
BUG=v8:2273
Review URL: https://chromiumcodereview.appspot.com/13473009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 11:57:02 +00:00
mstarzinger@chromium.org
48635f7d58
Fix minor typo in generator parsing test.
...
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/13575010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 08:38:40 +00:00
hpayer@chromium.org
ff85f50e84
Refactoring BuildAllocateElements.
...
BUG=
Review URL: https://codereview.chromium.org/13693004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 08:35:40 +00:00
haraken@chromium.org
c638555853
Pass an isolate to GetCurrent()
...
TEST=test-api.cc:GetCallingContextCallback
Review URL: https://chromiumcodereview.appspot.com//13426002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 02:17:56 +00:00
plind44@gmail.com
6e56e41205
MIPS: Resolved the rest of soft-float bugs.
...
TEST=mjsunit/mul-exhaustive-part9, mjsunit/bit-not, mjsunit/greedy,
mjsunit/math-floor-of-div-nosudiv, mjsunit/math-floor-of-div,
mjsunit/numops-fuzz-part2
BUG=
Review URL: https://codereview.chromium.org/13455006
Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 02:16:58 +00:00
adamk@chromium.org
759f4b37ce
Remove code duplication in JSObject::HasRealElementProperty
...
Review URL: https://codereview.chromium.org/13540003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 19:12:59 +00:00
mstarzinger@chromium.org
af25102f41
Compile FastCloneShallowArrayStub using Crankshaft.
...
R=danno@chromium.org
Review URL: https://codereview.chromium.org/12521011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 17:55:43 +00:00
palfia@homejinni.com
f995f77cee
MIPS: Remove extranous holder load in some prototype-chain checking cases
...
Port r14136 (d091bc0e)
BUG=
Review URL: https://codereview.chromium.org/13636002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 15:41:58 +00:00
mstarzinger@chromium.org
9fd5eb52d4
Skip long running regression test from r14078.
...
R=yangguo@chromium.org
BUG=chromium:217858
TEST=mjsunit/regress/regress-crbug-217858
Review URL: https://codereview.chromium.org/13640004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 14:46:18 +00:00
mstarzinger@chromium.org
7e0ae6da66
Fix bogus uses of preparser API
...
* src/api.cc (ScriptData::PreCompile): Fix bogus use of bogus value for
preparsing flags by removing those arguments, which were always zero.
* src/parser.h
* src/parser.cc (ParserApi::PreParse): Remove extension and flags
arguments, both of which were either always 0 or incorrectly used.
* test/cctest/test-parsing.cc (RegressChromium62639, Regress928): Fix
more bogus uses of preparser api.
BUG=
Review URL: https://codereview.chromium.org/13496008
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 14:34:19 +00:00
mstarzinger@chromium.org
9e757a604c
Make __proto__ a real JavaScript accessor property.
...
This turns the __proto__ callback from a foreign callback into a real
JavaScript accessor. It makes the accessor behavior of this property
explicit.
R=rossberg@chromium.org
BUG=v8:1949,v8:2606
TEST=mjsunit/regress/regress-2606
Review URL: https://codereview.chromium.org/13533004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 12:10:23 +00:00
danno@chromium.org
cb650a51de
Remove extranous holder load in some prototype-chain checking cases
...
R=ulan@chromium.org
Review URL: https://codereview.chromium.org/13620003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 11:38:10 +00:00
mstarzinger@chromium.org
a293d7dd27
Prepare push to trunk. Now working on version 3.17.17.
...
R=danno@chromium.org
Review URL: https://codereview.chromium.org/13633002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 11:37:01 +00:00
mstarzinger@chromium.org
489135d632
Switch transition zapping to slower version.
...
This is just an experiment to track down high crash rates on some
systems where third-party software corrupts memory regions.
R=danno@chromium.org
Review URL: https://codereview.chromium.org/13630002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 10:52:53 +00:00
dslomov@chromium.org
370caca72c
Test behavior of qNaN and sNaN
...
BUG=v8:2607
Review URL: https://codereview.chromium.org/13470002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 09:31:24 +00:00
ulan@chromium.org
eee5884f8d
Add extra flag for load-ic stubs in code cache.
...
This allows to distinguish between stubs compiled for the current object from
stubs compiled for objects that have the current object as a prototype.
BUG=v8:2593
R=verwaest@chromium.org
Review URL: https://chromiumcodereview.appspot.com/13552003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 08:29:25 +00:00
palfia@homejinni.com
ee5b15dbf2
MIPS: Ensure UseRegisterAtStart not used with fixed temp/return register
...
Port r14124 (f116e8b9)
BUG=
Review URL: https://codereview.chromium.org/13557002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 17:26:59 +00:00
palfia@homejinni.com
91e10c301e
MIPS: Fix ARM build
...
Port r14123 (ded70e2a)
BUG=
Review URL: https://codereview.chromium.org/13551004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 17:25:24 +00:00
palfia@homejinni.com
05df88b31d
MIPS: Fix hydrogen tracing on x64 and ARM
...
Port r14122 (43525afd)
BUG=
Review URL: https://codereview.chromium.org/13556003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 17:23:52 +00:00
rossberg@chromium.org
b449691db2
ES6 symbols: fix corner cases of equality operators
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/13552002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 17:06:22 +00:00
dslomov@chromium.org
a172a5e839
Remove (H|L)JSArrayLength instructions
...
BUG=
Review URL: https://codereview.chromium.org/12491023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 16:25:24 +00:00
mstarzinger@chromium.org
e559b72e40
Fix error message when reporting unexpected yield.
...
R=rossberg@chromium.org
BUG=v8:2355
TEST=webkit:fast/js/reserved-words-as-property.html
Review URL: https://codereview.chromium.org/13546004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 16:14:56 +00:00
adamk@chromium.org
c5427d5eea
Codify the assumption that %GetArrayKeys can return only a single interval starting at zero
...
This patch adds comments explaining the interface in runtime.cc and simplifies
all callers given these assumptions (e.g., no need to loop over intervals, or
calculate where the interval starts).
Took care of some unrelated issues in the edited code:
- Fixes one use of [] to InternalArray
- Removed a bunch of comments referring to ES3 which no longer hold in ES5
Review URL: https://codereview.chromium.org/13071006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 15:52:42 +00:00
danno@chromium.org
98281c62f0
Ensure UseRegisterAtStart not used with fixed temp/return register
...
R=vegorov@chromium.org
BUG=chromium:201590
Review URL: https://codereview.chromium.org/13527007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 14:45:39 +00:00
danno@chromium.org
3b0861f022
Fix ARM build
...
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/13529003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 12:00:23 +00:00
danno@chromium.org
087a853609
Fix hydrogen tracing on x64 and ARM
...
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/13461020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 11:44:03 +00:00
hpayer@chromium.org
2545774232
Move DeepCopy of JSObject from runtime to object.
...
BUG=
Review URL: https://codereview.chromium.org/13527005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 11:42:03 +00:00
palfia@homejinni.com
01ccd0f602
MIPS: Deoptimizer support for hydrogen stubs that accept a variable number of arguments.
...
Port r14111 (29157ad7)
BUG=
Review URL: https://codereview.chromium.org/13461013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 20:30:23 +00:00
rodolph.perfetta@gmail.com
db9cc639d5
Fix bugs in softfloat code path.
...
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/13008018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 18:25:09 +00:00
mstarzinger@chromium.org
502063c4a7
Fix another set of build failures on Windows since r14116.
...
TBR=yangguo@chromium.org
Review URL: https://codereview.chromium.org/13465010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 18:09:40 +00:00
mstarzinger@chromium.org
0c823b8957
Fix build failure on Windows since r14116.
...
TBR=yangguo@chromium.org
Review URL: https://codereview.chromium.org/13464010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 18:00:50 +00:00
mstarzinger@chromium.org
2816f19680
Add parser support for generators.
...
This patchset begins by adding support for "yield", which is unlike other tokens
in JS. In a generator, whether strict or classic, it is a syntactic keyword.
In classic mode it is an identifier. In strict mode it is reserved.
This patch adds YIELD as a token to the scanner, and adapts the preparser and
parser appropriately. It also parses "function*", indicating that a function is
actually a generator, for both eagerly and lazily parsed functions.
Currently "yield" just compiles as "return".
BUG=v8:2355
TEST=mjsunit/harmony/generators-parsing
Review URL: https://codereview.chromium.org/12646003
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 17:34:59 +00:00
dslomov@chromium.org
7e90cfb10d
Fix Win64 build
...
BUG=
Review URL: https://codereview.chromium.org/13463004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 15:03:04 +00:00
dslomov@chromium.org
a23868fb44
Fix CopyBytes to accept size_t for num_bytes
...
BUG=
Review URL: https://codereview.chromium.org/13470008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 13:29:26 +00:00
ulan@chromium.org
de17fa5b4c
Cleanup: Rename Simulator::watched_stops to match style guide.
...
BUG=none
Review URL: https://chromiumcodereview.appspot.com/13469002
Patch from Hans Wennborg <hans@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 12:36:16 +00:00
ulan@chromium.org
fed279a553
ARM: Log an error if /proc/cpuinfo cannot be opened
...
This will make it easier to see if the current CPU feature detection
starts breaking because of process sandboxing.
BUG=v8:2597
Review URL: https://chromiumcodereview.appspot.com/13465003
Patch from Hans Wennborg <hans@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 12:20:50 +00:00
mvstanton@chromium.org
2502668f50
Deoptimizer support for hydrogen stubs that accept a variable number of arguments.
...
BUG=
Review URL: https://codereview.chromium.org/12490013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 11:28:01 +00:00
yurys@chromium.org
359d4a2869
Isolatify CPU profiler public API
...
Relanding r14006 and r14009 that were reverted in r14031
TBR=danno
BUG=None
Review URL: https://codereview.chromium.org/13460002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 08:16:53 +00:00
yurys@chromium.org
04cb86899c
Deprecate HeapSnapshot type
...
Re-landing r14005 that was reverted in r14031
TBR=danno
BUG=None
Review URL: https://codereview.chromium.org/13430003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 08:09:59 +00:00
yurys@chromium.org
047f6f97d9
Isolatify HeapProfiler
...
Re-landing r13997 that was reverted in r14031
TBR=danno
BUG=None
Review URL: https://codereview.chromium.org/13458003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 08:03:01 +00:00
yurys@chromium.org
9cbb34a0b5
Isolatify CPU profiler
...
Relanding r13987 that was reverted in r14031
TBR=danno
BUG=None
Review URL: https://codereview.chromium.org/13457002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 07:53:50 +00:00
yurys@chromium.org
c7532f0f0b
Allow recording individual samples in addition to the aggregated CPU profiles
...
Re-landing r13980 that was reverted in r14031
TBR=danno
BUG=None
Review URL: https://codereview.chromium.org/13454002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 07:48:25 +00:00
plind44@gmail.com
d15321f2f8
MIPS: Fixed some soft-float bugs.
...
TEST=cctest/test-api/ExternalUnsignedIntArray
BUG=
Review URL: https://codereview.chromium.org/13165007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-01 16:06:52 +00:00
plind44@gmail.com
e53986d203
MIPS: Make the mips port build cleanly with clang.
...
Port r13583 (b39b116b) and also fix a couple mips-specific warnings.
BUG=
Review URL: https://codereview.chromium.org/13321002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-30 15:54:12 +00:00
palfia@homejinni.com
797dd3053e
MIPS: Fix register usage in softfloat code path.
...
BUG=none
TEST=mjsunit/math-floor-part2.js
Review URL: https://codereview.chromium.org/12413032
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-28 21:17:02 +00:00
yangguo@chromium.org
443f85eed9
Add test to check that Function.caller must not expose native functions.
...
R=svenpanne@chromium.org
BUG=v8:105
Review URL: https://chromiumcodereview.appspot.com/13166002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-28 14:31:48 +00:00
yangguo@chromium.org
a3f0f942a3
Always allocate symbols in old space.
...
Keys are expected to be tenured. This now not only includes internalized
strings, but also symbols.
R=rossberg@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13158002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-28 13:52:31 +00:00