Commit Graph

9963 Commits

Author SHA1 Message Date
rossberg@chromium.org
93579d9d3e Make indexed intercepted methods enumerable by default.
R=ulan@chromium.org
BUG=162606

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 12:55:47 +00:00
ulan@chromium.org
735d052f4c Remove unused heap debug utils code.
This functionality is already implemented by PathTracer.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 10:23:16 +00:00
yangguo@chromium.org
94476cb89a Also time other API functions calling into javascript.
And prevent crash when starting chromium without --single-process.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 08:56:59 +00:00
yangguo@chromium.org
3c251ec924 Fix valgrind warnings.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 08:47:48 +00:00
rossberg@chromium.org
5593b956b2 Censor .caller if it is a strict function instead of throwing.
For details, see:

http://www.mail-archive.com/es-discuss@mozilla.org/msg19322.html
https://bugs.ecmascript.org/show_bug.cgi?id=310

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 15:47:58 +00:00
rossberg@chromium.org
21b7af787f Fix strict mode test case, so that it succeeds for the right reason.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 15:45:03 +00:00
rossberg@chromium.org
085bf78c70 Object.observe: Tests for __define{G,S}etter__.
R=adamk@chromium.org,rafaelw@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 15:43:54 +00:00
rossberg@chromium.org
1090d8e0dc MIPS: Get rid of static module allocation, do it in code.
Port r13033 (58c2efbb)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11413146
Patch from palfia <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 15:39:25 +00:00
ulan@chromium.org
79c10a8c7f Prepare push to trunk. Now working on version 3.15.6.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 14:35:13 +00:00
danno@chromium.org
6db4bc2f4d Force small array literals to have FAST_ELEMENTs
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 13:23:39 +00:00
yangguo@chromium.org
bebf37799e Fix JSON.stringify for objects with interceptor handlers.
BUG=161028

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 12:32:24 +00:00
hpayer@chromium.org
bbb6d45088 Reset progress bar of object to 0 when RecordWrites changes object color to grey.
BUG=v8:2423

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 12:22:16 +00:00
mmassi@chromium.org
a0582112f8 Revert r13025 and r13026 (they introduced a bug on arm and regressed octane crypto).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 10:53:03 +00:00
verwaest@chromium.org
2c1ac55213 - Initialize the result array with holes if we concat a double array into an object array, since it may cause a marking step while boxing a double.
- Ensure we go holey if we are concatting any holey array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 16:22:57 +00:00
svenpanne@chromium.org
9de70742a6 PredictableCodeSizeScope checks the expected size now.
We still have some problems on ARM, so the size check currently
optional. Furthermore, we don't use PredictableCodeSizeScope at all
place where we should do it. Both issues are cleaned up in upcoming
CLs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 14:59:52 +00:00
yangguo@chromium.org
72db2287c3 Add parallel recompilation time to histogram and plot execution pause times.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 13:04:11 +00:00
rossberg@chromium.org
07481867a1 Object.observe: More tests for accessor reconfiguration.
R=adamk@chromium.org,rafaelw@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 10:31:42 +00:00
svenpanne@chromium.org
51f5a8e7c7 Moved buffer handling to AssemblerBase.
This removed a lot of copy-n-paste code and is very handy for some upcoming
changes (regarding predictable code size).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 10:28:29 +00:00
rossberg@chromium.org
ce05280bfc Get rid of static module allocation, do it in code.
Modules now have their own local scope, represented by their own context.
Module instance objects have an accessor for every export that forwards
access to the respective slot from the module's context. (Exports that are
modules themselves, however, are simple data properties.)

All modules have a _hosting_ scope/context, which (currently) is the
(innermost) enclosing global scope. To deal with recursion, nested modules
are hosted by the same scope as global ones.

For every (global or nested) module literal, the hosting context has an
internal slot that points directly to the respective module context. This
enables quick access to (statically resolved) module members by 2-dimensional
access through the hosting context. For example,

  module A {
    let x;
    module B { let y; }
  }
  module C { let z; }

allocates contexts as follows:

[header| .A | .B | .C | A | C ]  (global)
          |    |    |
          |    |    +-- [header| z ]  (module)
          |    |
          |    +------- [header| y ]  (module)
          |
          +------------ [header| x | B ]  (module)

Here, .A, .B, .C are the internal slots pointing to the hosted module
contexts, whereas A, B, C hold the actual instance objects (note that every
module context also points to the respective instance object through its
extension slot in the header).

To deal with arbitrary recursion and aliases between modules,
they are created and initialized in several stages. Each stage applies to
all modules in the hosting global scope, including nested ones.

1. Allocate: for each module _literal_, allocate the module contexts and
   respective instance object and wire them up. This happens in the
   PushModuleContext runtime function, as generated by AllocateModules
   (invoked by VisitDeclarations in the hosting scope).

2. Bind: for each module _declaration_ (i.e. literals as well as aliases),
   assign the respective instance object to respective local variables. This
   happens in VisitModuleDeclaration, and uses the instance objects created
   in the previous stage.
   For each module _literal_, this phase also constructs a module descriptor
   for the next stage. This happens in VisitModuleLiteral.

3. Populate: invoke the DeclareModules runtime function to populate each
   _instance_ object with accessors for it exports. This is generated by
   DeclareModules (invoked by VisitDeclarations in the hosting scope again),
   and uses the descriptors generated in the previous stage.

4. Initialize: execute the module bodies (and other code) in sequence. This
   happens by the separate statements generated for module bodies. To reenter
   the module scopes properly, the parser inserted ModuleStatements.

R=mstarzinger@chromium.org,svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 10:25:22 +00:00
mvstanton@chromium.org
80819f618d Add dehoisting to the string printout of hydrogen and lithium instructions.
This is nice when looking at hydrogen graphs, to see the real key offset.

R=mmassi@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 10:19:05 +00:00
yangguo@chromium.org
c412264c4a Fix counters in d8.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 08:35:21 +00:00
svenpanne@chromium.org
f275b36299 Reduced TLS accesses even further.
Thread the Isolate through FindCodeInCache, FindCodeInSpecialCache and
SetProperty. Reduced the number of TLS accesses while running the Octane
benchmark down to 19% compared to the beginning of the cleanups.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 07:58:59 +00:00
hpayer@chromium.org
ee164ffe3d Use slot instead of value in the write barrier to record write from code.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 07:05:20 +00:00
mvstanton@chromium.org
2fed381652 Fix performance regression in DXT5Decoder.js.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 14:01:10 +00:00
rossberg@chromium.org
4751776dce Object.observe: Unblacklist some tests involving indexed properties
These were erroneously disabled because they were expecting indexed properties to be of Number type when appearing as the "name" in change records. But the "name" property will always be a string. Fixed assertRecordsEqual() to enforce this in expectations.

BUG=v8:2409

Review URL: https://codereview.chromium.org/11280105
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 12:50:49 +00:00
mmassi@chromium.org
ce81fb7b13 Fix build (and fix brown paper bug as well...).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 12:17:18 +00:00
mmassi@chromium.org
5e7f30a596 Use the property load IC for accessing the array length.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 11:49:15 +00:00
svenpanne@chromium.org
c8bc4db52f Enable deprecations.
In addition, use a more common style in the preprocessor condition, making
e.g. '-DV8_ENABLE_DEPRECATIONS=0' do the expected thing. Removed a useles

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 10:16:07 +00:00
yangguo@chromium.org
36f5b6d41f Rename IsAsciiRepresentation
This is a straight rename:

IsAsciiRepresentation -> IsOneByteRepresentation
IsAsciiRepresentationUnderneath -> IsOneByteRepresentationUnderneath
AllocateRawAsciiString -> AllocateRawOneByteString
AllocateStringFromAscii -> AllocateStringFromOneByte

R=yangguo@chromium.org,
BUG=

Review URL: https://chromiumcodereview.appspot.com/11308066
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 10:01:05 +00:00
verwaest@chromium.org
67c9e9d065 MIPS: Support all fast elements kinds in the major array operations. Currently missing support for unshift.
Port r12969 (b10320d7)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 09:54:53 +00:00
yangguo@chromium.org
92d3113250 MIPS: Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.
Port r12966 (ec963fe0)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11316091
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 09:41:34 +00:00
yangguo@chromium.org
89bc2eb93f Actually relax test expectations for known failing test.
This corrects r13011.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 09:32:06 +00:00
jkummerow@chromium.org
a956594fc2 Fix corner case in x64 compare stubs.
BUG=v8:2416

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 15:57:10 +00:00
svenpanne@chromium.org
7e6dd6db1e Drastically reduce the number of created strings in d8, 2nd attempt.
This also reduces the number of TLS accesses, so it is a double-win. We have
230k less TLS accesses while running Octane now, so we are down to 23% now
compared to the start of these TLS-related CLs.

To get things right in the presence of multiple Isolates, we have to thread the
correct Isolate through several layers. This threading wasn't that bad after
all, it keeps one honest about the real depdencies. The only ugly thing is that
in ExternalArrayWeakCallback we have to conjure up the current Isolate from the
TLS, but this is a know API deficiency.

Introduced a tiny helper function for throwing on the way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 14:47:56 +00:00
ulan@chromium.org
6a6012c0e7 Emit RSB for subtraction with constant lhs on ARM
Instead of generating the following for "100 - x":

  mov r1, #100
  subs r0, r1, r0

this patch makes Crankshaft generate this:

  rsbs r0, r0, #100

thus saving a register and a mov.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11308040
Patch from Hans Wennborg <hans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 14:46:16 +00:00
rossberg@chromium.org
6add3222ed Object.observe: Add test case covering most special cases.
Things not working yet are currently blacklisted in the test (see TODOs).

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 14:45:21 +00:00
rossberg@chromium.org
15dec1ae28 Missing check for exception.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 14:41:20 +00:00
jkummerow@chromium.org
0620b1d0d7 MIPS: Lattice-based representation inference, powered by left/right specific type feedback for BinaryOps and comparisons
Port r12961 (96c0e493)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11280080
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 14:11:53 +00:00
jkummerow@chromium.org
8c5bf4a7e0 Fix typo in condition when to log code objects during deserialization.
Review URL: https://codereview.chromium.org/11416068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 12:59:36 +00:00
rossberg@chromium.org
0f6d0d28dd Fix and clean up treatment of hidden prototypes.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 12:32:29 +00:00
yangguo@chromium.org
bfbca55d02 Relax test expectations for known failing test.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 12:31:41 +00:00
mstarzinger@chromium.org
f5cff7d91c Make test-dictionary work for GC stress builder.
R=yangguo@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 10:47:31 +00:00
rossberg@chromium.org
1570d62721 Object.observe/unobserve now return object
BUG=v8:2418

Review URL: https://codereview.chromium.org/11419078
Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 10:38:14 +00:00
rossberg@chromium.org
75cb024609 Re-adjust access failure log messages for %GetOwnProperty.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 17:59:11 +00:00
mstarzinger@chromium.org
1f71c3c34e Enable marking progress bar for large objects by default.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 17:23:58 +00:00
hpayer@chromium.org
8a6947af13 Forward transition objects to grey if they are referenced by a large object
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 16:20:22 +00:00
verwaest@chromium.org
397f5291ae Always check copy_size before getting accessor and trying to copy.
Review URL: https://chromiumcodereview.appspot.com/11348071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 15:31:38 +00:00
verwaest@chromium.org
08cfda49f2 Ensure CopyElementsImpl is always executed so it fills in holes even if from_size is 0. Allow FixedDoubleArray::cast to also support FixedArray with size 0.
Review URL: https://chromiumcodereview.appspot.com/11280054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 15:00:34 +00:00
svenpanne@chromium.org
3326b845e2 Revert "Drastically reduce the number of created strings in d8."
This reverts commit 2fc4424b00296cc06d6f7eb4bf31ec9c3d6be68a.

Even symbols shouldn't be shared across Isolates. The CL has to be reworked to
use a (Isolate,C-string)->v8-symbol mapping. Slowly approaching Chrome... :-/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 14:46:19 +00:00
yangguo@chromium.org
2b5e6bae60 Fix --hydrogen-stats.
Timing happens in a scope.  Since crankshaft has been chopped up into three methods, this approach is wrong.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-19 14:20:57 +00:00