Commit Graph

3711 Commits

Author SHA1 Message Date
dslomov@chromium.org
2751eeb361 More typed array constructors.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14845012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 12:27:03 +00:00
dslomov@chromium.org
6e86141916 Implementation of Uint8ClampedArray.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14657003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 11:36:48 +00:00
dslomov@chromium.org
1469acaa7f Add Value::Is* methods for typed arrays and ArrayBuffer
R=rossberg
BUG=

Committed https://code.google.com/p/v8/source/detail?r=14506

Review URL: https://codereview.chromium.org/13977018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:53:27 +00:00
dslomov@chromium.org
3af1cc1072 Revert "Fix typo"
This reverts commit r14506 (that was commited with a wrong description).

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:49:20 +00:00
dslomov@chromium.org
b029ad4201 Fix typo
R=rossberg@chromium.org

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=14505

Review URL: https://codereview.chromium.org/13993029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:02:22 +00:00
mvstanton@chromium.org
6e4a8fecb7 Two bugfixes for hydrogen-based array constructors
CacheInitialJSArrayMaps needs to be able to pick up where it left off,
as it can now be called from a handlfied context.

Disable incremental marking for CCTest SetJitCodeEventHandler, as it allocates
during compilation.

BUG=

Review URL: https://codereview.chromium.org/14642002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 13:43:45 +00:00
dslomov@chromium.org
acf1a7c91c Accurate function prototypes for native calls from ARM simulator.
This is a resubmit of codereview.chromium.org/13818012 with the following modifications:
- src/x64/code-stubs-x64.cc for changes specific to Win64   calling conventions.
- src/sampler.cc for Native Client support

BUG=v8:2614

Committed: https://code.google.com/p/v8/source/detail?r=14491

Review URL: https://codereview.chromium.org/14305029

Patch from Brad Chen <bradchen@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:34:43 +00:00
dslomov@chromium.org
c5252a1bcd Revert "Accurate function prototypes for native calls from ARM simulator."
This reverts commit r14991. (one file missing)

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:31:09 +00:00
dslomov@chromium.org
1da21f1868 Revert "Flag optimize-constructed-arrays turned on."
This reverts commit r14491.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:23:34 +00:00
dslomov@chromium.org
d362e727e3 Accurate function prototypes for native calls from ARM simulator.
This is a resubmit of codereview.chromium.org/13818012 with the following modifications:
- src/x64/code-stubs-x64.cc for changes specific to Win64   calling conventions.
- src/sampler.cc for Native Client support

BUG=v8:2614

Review URL: https://codereview.chromium.org/14305029

Patch from Brad Chen <bradchen@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:16:40 +00:00
mvstanton@chromium.org
ff57a1062b Flag optimize-constructed-arrays turned on.
This routes array construction through a hydrogen stub, and enables use of
allocation site info tracking.

BUG=

Review URL: https://codereview.chromium.org/14616010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 08:22:05 +00:00
danno@chromium.org
d728493929 Allow setting debugger breakpoints on CompareNilICs
BUG=v8:2660
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14106011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 07:56:09 +00:00
dslomov@chromium.org
9e2c046f5c TypedArray(length) constructor
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14460008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 16:16:31 +00:00
danno@chromium.org
e6570d43ba Fix bug in CompareNil IC
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/13863022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 15:09:22 +00:00
danno@chromium.org
528792e39b Fix beyond-heap load on x64 Crankshafted StringCharFromCode
BUG=chromium:235311
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14387008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 14:34:24 +00:00
dslomov@chromium.org
7b1e7463f2 Remove __ prefix from Harmony typed arrays implementation
R=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14402026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 11:18:27 +00:00
dslomov@chromium.org
3fd6bb51f0 First cut at API for native Typed Arrays.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14195034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 11:09:03 +00:00
verwaest@chromium.org
99e17bb12a Track storage types of instance variables.
Review URL: https://chromiumcodereview.appspot.com/14146005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:30:41 +00:00
mvstanton@chromium.org
d5e485a3cc Change 'Parse error' to three more informative messages.
Replace the 'unable_to_parse' key used in three places with three difference keys.
Provide three more informative and less ambiguous error messages in place of 'Parse error'.

Add three test/message cases to cover the new messages.

BUG=2636

Review URL: https://codereview.chromium.org/14161007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 14:26:54 +00:00
mstarzinger@chromium.org
1706fe657e Add support for yield expressions
This CL extends the generator suspend and resume implementation to
capture values on the operand stack.

It factors out some helpers to measure and access the operand stack into
the JavaScriptFrame class.  It also refactors the suspend and resume
helpers to avoid handle allocation.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14348003

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 12:09:32 +00:00
mstarzinger@chromium.org
885fd2f4b2 Fix yield inside with
This patch makes it so that suspending generators always saves the
context.  Previously we erroneously assumed that if the operand stack
was empty, that the context would be unchanged, but that is not the case
with "with".

Fixing this brought out an interesting bug in the variable allocator.
Yield inside with will reference a context-allocated temporary holding
the generator object.  Before the fix, this object was looked up in the
with context instead of the function context, because with contexts were
not being simulated during full-codegen.  Previously this was OK as all
variables would be given LOOKUP allocation instead of CONTEXT, but the
context-allocated temporary invalidated this assumption.  The fix is to
simulate the context chain more accurately in full-codegen.

R=mstarzinger@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14416011

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 11:55:22 +00:00
mstarzinger@chromium.org
bb2d8a51da Implement support for Math.imul in Crankshaft.
R=jkummerow@chromium.org
TEST=mjsunit/math-imul

Review URL: https://codereview.chromium.org/14471041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 08:52:35 +00:00
yurys@chromium.org
f76c2ae2b7 Avoid unnecessary indirection when creating CodeEntries
BUG=None

Review URL: https://codereview.chromium.org/14471035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 07:50:35 +00:00
mvstanton@chromium.org
e751ad06d9 Constructed arrays can be created with Hydrogen code stubs. The feature is still off by default (--optimize-constructed-arrays).
BUG=

Review URL: https://codereview.chromium.org/12385014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 16:00:32 +00:00
dslomov@chromium.org
76098f0770 Win64 build
R=rossberg@chromium.org,mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14392013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:34:45 +00:00
dslomov@chromium.org
44f2d534b1 First cut at API for ES6 ArrayBuffers
R=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/13958007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:02:23 +00:00
mstarzinger@chromium.org
8f1fc88f8c Relax --debug-code checks that runtime returns are not the hole
ia32, unlike the other architectures, includes a --debug-code check that
asserts that runtime functions do not return the hole.  However the new
SuspendJSGeneratorObject runtime does return the hole at times.

This CL adds a wee hack that only signals an error if the callee was not
SuspendJSGeneratorObject.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/13856011

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:00:07 +00:00
mstarzinger@chromium.org
71dc9e165f Capture receiver in generator object
Previously there has been no reason to context-allocate the receiver, so
access to the receiver always goes through the stack.  This was failing
with generators, which assumed that forcing context allocation would
relieve the need of storing anything but the context and the function on
the stack.

This CL adds a slot in generator objects to capture the receiver, and
restores it when resuming a generator.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14158006

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 10:59:09 +00:00
jkummerow@chromium.org
628875475e Fix overflow check in mul-i which was missing since r14322
Review URL: https://codereview.chromium.org/14471012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 07:36:59 +00:00
mstarzinger@chromium.org
338f11850a Fix generator suspend and resume on ARM
This CL fixes a number of rookie mistakes in
FullCodeGenerator::VisitYield and
FullCodeGenerator::EmitGeneratorResume, and re-enables the
generators-iteration test on ARM.

R=mstarzinger@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/13843022

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 16:07:44 +00:00
mstarzinger@chromium.org
e7c1f322a4 New GC APIs, try 2.
With these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=

Review URL: https://codereview.chromium.org/14007008

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 15:59:23 +00:00
dcarney@chromium.org
061f523b5a Change cctest/test-lockers to not copy persistent handles around.
Instead, create Local handles to pass them around. This also means that the
code needs to be shifted around a bit such that a handle scope exists when
creating threads.

Review URL: https://codereview.chromium.org/14150017

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 14:23:46 +00:00
mstarzinger@chromium.org
23f39546b9 Generators can resume
The generator object methods "next", "send", and "throw" now
include some inline assembly to set up a resumed stack frame.  In some
common cases, we can just jump back into the frame to resume it.
Otherwise the resume code calls out to a runtime to fill in the operand
stack, rewind the handlers, and possibly to throw an exception.

BUG=v8:2355
TESTS=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14066016

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 13:00:16 +00:00
dslomov@chromium.org
852f90339a Adds EXTERNAL_DOUBLE_ARRAY to a list of instance types
BUG=v8:2646

Patch by Andrei Kashcha <anvaka@gmail.com>

Review URL: https://codereview.chromium.org/14042008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 17:02:09 +00:00
ulan@chromium.org
bc4d7878e6 Do not emit Simulates in HandlePolymorphicElementAccess.
BUG=v8:2653
R=jkummerow@chromium.org
TEST=mjsunit/regress/regress-2653.js

Review URL: https://chromiumcodereview.appspot.com/14081025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 15:28:44 +00:00
svenpanne@chromium.org
cd34acdae3 Do not emit double values at their use sites.
Revert part of r14179. From the regression test's comment:

Currently, the gap resolver doesn't handle moves from a ConstantOperand to a
DoubleRegister, but these kind of moves appeared when HConstant::EmitAtUses
was changed to allow special double values (-0, NaN, hole). So we should
either enhance the gap resolver or make sure that such moves don't happen.

BUG=chrome:234101

Review URL: https://codereview.chromium.org/14429002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 13:08:10 +00:00
yangguo@chromium.org
4d1362720f Add methods to allow resuming execution after calling TerminateExecution().
R=mvstanton@chromium.org
BUG=v8:2361

Review URL: https://chromiumcodereview.appspot.com/14401008

Patch from Andrew Paprocki <andrew@ishiboo.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 15:01:45 +00:00
mstarzinger@chromium.org
81b762cc33 Disable ParserSync test in GC stress mode for now.
R=jkummerow@chromium.org
TEST=cctest/test-parsing/ParserSync

Review URL: https://codereview.chromium.org/14075017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 14:38:07 +00:00
rossberg@chromium.org
3cd9f6a40e Add d8 functionality for switching between realms (a.k.a. contexts), 2nd try
The only difference to the previous implementation (https://codereview.chromium.org/14295011/) is in patch set 2.

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14404005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 11:29:52 +00:00
mstarzinger@chromium.org
8fa1186258 Skip one generators test because of no-snap failures.
R=rossberg@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-objects

Review URL: https://codereview.chromium.org/13956023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 08:46:02 +00:00
danno@chromium.org
600ed94a3d Update tests to use std::isnan instead of isnan
Should fix compilation breakage after r14352

Review URL: https://codereview.chromium.org/14328044

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 14:20:36 +00:00
mstarzinger@chromium.org
0f348e5592 Generator objects can suspend
* src/ast.h:
* src/parser.cc: Differentiate between the different kinds of yields, in
  anticipation of boxing return values.  Parse `return' into `yield' in
  a generator.

* src/runtime.h:
* src/runtime.cc (Runtime_SuspendJSGeneratorObject): New horrible
  runtime function: saves continuation, context, and operands into the
  generator object.

* src/arm/full-codegen-arm.cc (VisitYield):
* src/ia32/full-codegen-ia32.cc (VisitYield):
* src/x64/full-codegen-x64.cc (VisitYield): Arrange to call
  SuspendJSGeneratorObject.  If the call returns the hole, we suspend.
  Otherwise we resume.

BUG=v8:2355
TEST=These codepaths are tested when the generator is first invoked, and so
are covered by mjsunit/harmony/generators-objects.js.

Review URL: https://codereview.chromium.org/13704010

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 14:11:23 +00:00
yurys@chromium.org
c0fca4e8c8 Revert r14252 as it broke --prof for some cases
R=jkummerow
BUG=v8:2642

Review URL: https://codereview.chromium.org/14367020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 11:55:01 +00:00
yangguo@chromium.org
72a05845ec Revert r14310 due to isolate tests failure.
R=mstarzinger@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14021004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 14:41:24 +00:00
mstarzinger@chromium.org
adf9afc09e Fix missing Smi check in grow mode keyed stores.
R=danno@chromium.org
TEST=mjsunit/regress/regress-grow-store-smi-check

Review URL: https://codereview.chromium.org/14352011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 14:18:27 +00:00
jkummerow@chromium.org
5eadc1a428 Remove SCons related files
Review URL: https://codereview.chromium.org/14348002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 11:01:14 +00:00
mstarzinger@chromium.org
c47af882ba Remove deprecated test suite configurations.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/13878008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 10:48:27 +00:00
dslomov@chromium.org
3e31a67bf8 Disable the test due to Win64 build problems.
The large allocation actually succeeds on Win64, but it looks like
subsequent memory adjustment fails. Disabling the test for now, will
investigate further.

TBR=rossberg

Review URL: https://codereview.chromium.org/14330006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 18:13:44 +00:00
jkummerow@chromium.org
b19649ce78 Fix building cctests with component=shared_library snapshot=off
BUG=v8:2634

Review URL: https://codereview.chromium.org/14232008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 17:02:35 +00:00
yangguo@chromium.org
b3707c17d6 Inline String.fromCharCode in hydrogen.
BUG=

Review URL: https://chromiumcodereview.appspot.com/14296009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 16:37:11 +00:00