platform/upstream/v8.git
13 years agoAdd curly braces to if / else clauses after r8152
mikhail.naganov@gmail.com [Thu, 2 Jun 2011 11:22:26 +0000 (11:22 +0000)]
Add curly braces to if / else clauses after r8152

TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRevert "Make instanceof and Object.getPrototypeOf work for proxies, plus a few other...
ager@chromium.org [Thu, 2 Jun 2011 10:12:00 +0000 (10:12 +0000)]
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

13 years agoRevert "Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large...
mikhail.naganov@gmail.com [Wed, 1 Jun 2011 23:11:10 +0000 (23:11 +0000)]
Revert "Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files"

Breaks compilation on Linux.

This reverts commit e72c5b1d69fb2cb2d5973f172666dd5d477e6f7e.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix presubmit errors after r8152
mikhail.naganov@gmail.com [Wed, 1 Jun 2011 23:09:18 +0000 (23:09 +0000)]
Fix presubmit errors after r8152

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years ago[Linux] Do not install SIGPROF handler until we
mikhail.naganov@gmail.com [Wed, 1 Jun 2011 22:12:05 +0000 (22:12 +0000)]
[Linux] Do not install SIGPROF handler until we
start CPU profiling.

TBR=vitalyr@chromium.org
BUG=1344,crbug/79320,crbug/83521
TEST=none

Review URL: http://codereview.chromium.org/7107003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRe-landing http://codereview.chromium.org/7014019.
cira@chromium.org [Wed, 1 Jun 2011 21:10:56 +0000 (21:10 +0000)]
Re-landing http://codereview.chromium.org/7014019.

Adding DateTimeFormat class to i18n API with following methods:

- format
- getWeekdays
- getMonths
- get Eras
- getAmPm

Difference from the reverted revision:

Removed all references to v8/src, like ASSERT_EQ.

All #includes have full path to include/v8.h or extension headers.

TEST=Visit i18n.kaziprst.org/datetimeformat.html
Review URL: http://codereview.chromium.org/7105002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMake instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks.
rossberg@chromium.org [Wed, 1 Jun 2011 17:44:08 +0000 (17:44 +0000)]
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

13 years agoFix Issue 1320: LiveEdit: text differencer fails with out of memory on large files
peter.rybin@gmail.com [Wed, 1 Jun 2011 17:05:35 +0000 (17:05 +0000)]
Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files

Review URL: http://codereview.chromium.org/7080029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoUntank compilation and fix JSON parse bug introduced in r8147.
sandholm@chromium.org [Wed, 1 Jun 2011 14:55:55 +0000 (14:55 +0000)]
Untank compilation and fix JSON parse bug introduced in r8147.
Review URL: http://codereview.chromium.org/7020028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemove scanner abstraction layer from JSON parsing.
sandholm@chromium.org [Wed, 1 Jun 2011 14:06:30 +0000 (14:06 +0000)]
Remove scanner abstraction layer from JSON parsing.
Review URL: http://codereview.chromium.org/7020018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRevert r8140.
fschneider@chromium.org [Wed, 1 Jun 2011 13:34:15 +0000 (13:34 +0000)]
Revert r8140.

It breaks test when running with nosnapshot.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/7027029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoDelay processing of declarations for inlining candidates.
kmillikin@chromium.org [Wed, 1 Jun 2011 13:26:30 +0000 (13:26 +0000)]
Delay processing of declarations for inlining candidates.

Processing the declarations in an inlining candidate must be performed
after constructing the Hydrogen environment of the candidate function.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7027028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemoving white spaces introduced in r8142.
sandholm@chromium.org [Wed, 1 Jun 2011 12:24:55 +0000 (12:24 +0000)]
Removing white spaces introduced in r8142.
Review URL: http://codereview.chromium.org/7025005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoEnsure strings are never externalized as a side-effect of doing a GC.
sandholm@chromium.org [Wed, 1 Jun 2011 11:46:14 +0000 (11:46 +0000)]
Ensure strings are never externalized as a side-effect of doing a GC.
Review URL: http://codereview.chromium.org/7105016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix compilation on OpenBSD. Patch from Robert Nagy in
erik.corry@gmail.com [Wed, 1 Jun 2011 11:09:32 +0000 (11:09 +0000)]
Fix compilation on OpenBSD.  Patch from Robert Nagy in
http://code.google.com/p/v8/issues/detail?id=1420
Review URL: http://codereview.chromium.org/7104024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoEagerly deoptimize on never-executed code-paths.
fschneider@chromium.org [Wed, 1 Jun 2011 11:04:40 +0000 (11:04 +0000)]
Eagerly deoptimize on never-executed code-paths.

If type-feedback indicates that an expression was never executed in
the non-optimized code, we insert a forced deoptimization right away
to enable re-optimization if we ever hit this path.

With this change we still continue to build the graph. As a next step, we
should remove the dead code after the deoptimize.

I had to remove one assert about the optimization status in a test since
we now immediately deoptimize after exiting the loop that triggers OSR.

Also remove a restriction that control-flow from an inlined function in a
test context always reaches both true- and false-target.
Review URL: http://codereview.chromium.org/7105015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoDisable context-allocated const variables.
kmillikin@chromium.org [Wed, 1 Jun 2011 09:12:22 +0000 (09:12 +0000)]
Disable context-allocated const variables.

We intended them to be fully disabled for now, but there was a missing
check at initialization time.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7020021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: port Fix receiver for calls to strict-mode and builtin functions ....
sgjesse@chromium.org [Wed, 1 Jun 2011 09:06:46 +0000 (09:06 +0000)]
MIPS: port Fix receiver for calls to strict-mode and builtin functions ....

Fix receiver for calls to strict-mode and builtin functions that
are potentially shadowed by eval.

Port r8116 (e8a1e4842) to mips.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7090003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS:port Reapply change to Pass undefined to JS builtins when called with implicit...
sgjesse@chromium.org [Wed, 1 Jun 2011 09:05:44 +0000 (09:05 +0000)]
MIPS:port Reapply change to Pass undefined to JS builtins when called with implicit receiver.

Port r8110 (0a6ff3a) to mips.

Some mips work was in original commit. Fixed bug due to Generate_ArgumentsAdaptorTrampoline
using the dedicated CallKind reg (t1) as a temporary.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7027024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: port Fix a number of IC stubs to correctly set the call kind.
sgjesse@chromium.org [Wed, 1 Jun 2011 09:01:57 +0000 (09:01 +0000)]
MIPS: port Fix a number of IC stubs to correctly set the call kind.

Ported r8109 (7ab86acc) to mips.

Original commit message:
Make the call kind and call wrapper arguments explicit to force
developers to make a choice. This would have avoided the bug in the
first case.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7006021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: port Prevent deopt on double value assignment to typed arrays
sgjesse@chromium.org [Wed, 1 Jun 2011 08:58:19 +0000 (08:58 +0000)]
MIPS: port Prevent deopt on double value assignment to typed arrays

Ported r8077 (defc4f9b) to mips.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7027023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoARM: Be consistent about the condition codes used with CompareObjectType
sgjesse@chromium.org [Wed, 1 Jun 2011 08:54:30 +0000 (08:54 +0000)]
ARM: Be consistent about the condition codes used with CompareObjectType

Now the signed comparison condition codes are always used with CompareObjectType. The type is only a byte and ldrb will do sign extension, so signed and unsigned comparison will give the same result. Signed condition codes are easier to read.

R=erik.corry@gmail.com

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7104019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoLower heap size limits on systems that are short of virtual memory.
erik.corry@gmail.com [Wed, 1 Jun 2011 08:49:18 +0000 (08:49 +0000)]
Lower heap size limits on systems that are short of virtual memory.
Review URL: http://codereview.chromium.org/7020020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoOoops, forgot to commit the renamings in Hydrogen for issue 6976028....
svenpanne@chromium.org [Wed, 1 Jun 2011 07:11:25 +0000 (07:11 +0000)]
Ooops, forgot to commit the renamings in Hydrogen for issue 6976028....

TBR=danno@chromium.org
Review URL: http://codereview.chromium.org/7105014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoPrepare push to trunk. Now working on version 3.4.2.
ricow@chromium.org [Wed, 1 Jun 2011 05:48:51 +0000 (05:48 +0000)]
Prepare push to trunk. Now working on version 3.4.2.
Review URL: http://codereview.chromium.org/7090002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoLiveEdit: Optimize compare by stripping common suffix and prefix.
peter.rybin@gmail.com [Tue, 31 May 2011 20:58:21 +0000 (20:58 +0000)]
LiveEdit: Optimize compare by stripping common suffix and prefix.

Review URL: http://codereview.chromium.org/7087031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemoved all references to v8/src from i18n extension code.
cira@chromium.org [Tue, 31 May 2011 17:21:28 +0000 (17:21 +0000)]
Removed all references to v8/src from i18n extension code.

Removed I18N enum from v8/src/natives.h

Removed use of Vector and natives.h from i18n-extension.cc. Added new
python script that generates i18n-js.cc from i18n.js.

Made all paths absolute pointing to either v8/include or
v8/src/extensions/experimental.

Exported -Iv8 for embedders (-Iv8/include was there already).
Review URL: http://codereview.chromium.org/7077012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoImplement set trap for proxies, and revamp class hierarchy in preparation:
rossberg@chromium.org [Tue, 31 May 2011 16:38:40 +0000 (16:38 +0000)]
Implement set trap for proxies, and revamp class hierarchy in preparation:

- Introduce a class JSReceiver, that is a common superclass of JSObject and
  JSProxy. Use JSReceiver where appropriate (probably lots of places that we
  still have to migrate, but we will find those later with proxy test suite).

- Move appropriate methods to JSReceiver class (SetProperty,
  GetPropertyAttribute, Get/SetPrototype, Lookup, and so on).

- Introduce new JSFunctionProxy subclass of JSProxy. Currently only a stub.

- Overhaul enum InstanceType:
  * Introduce FIRST/LAST_SPEC_OBJECT_TYPE that ranges over all types that
    represent JS objects, and use that consistently to check language types.
  * Rename FIRST/LAST_JS_OBJECT_TYPE and FIRST/LAST_FUNCTION_CLASS_TYPE
    to FIRST/LAST_[NON]CALLABLE_SPEC_OBJECT_TYPE for clarity.
  * Eliminate the overlap over JS_REGEXP_TYPE.
  * Also replace FIRST_JS_OBJECT with FIRST_JS_RECEIVER, but only use it where
    we exclusively talk about the internal representation type.
  * Insert JS_PROXY and JS_FUNCTION_PROXY in the appropriate places.

- Fix all checks concerning classification, especially for functions, to
  use the CALLABLE_SPEC_OBJECT range (that includes funciton proxies).

- Handle proxies in SetProperty (that was the easiest part :) ).

- A few simple test cases.

R=kmillikin@chromium.org

Review URL: http://codereview.chromium.org/6992072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRevert 8122 (stub call asserts) while test failures are investigated.
erik.corry@gmail.com [Tue, 31 May 2011 15:21:25 +0000 (15:21 +0000)]
Revert 8122 (stub call asserts) while test failures are investigated.
Review URL: http://codereview.chromium.org/7050039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoReduced the code ping-pong between the full code generator and contexts a bit.
svenpanne@chromium.org [Tue, 31 May 2011 14:37:34 +0000 (14:37 +0000)]
Reduced the code ping-pong between the full code generator and contexts a bit.

* Centralized AND/OR handling, keeping related code together.

* Removed HandleExpression/HandleInNonTestContext and introduced VisitInSameContext instead, making it more obvious what's actually going on.

* Consistently use a new context when visiting the left sub-expression of an AND/OR. Note that the context stacks in the full code generator and crankshaft are still a bit out of sync for the right sub-expression.
Review URL: http://codereview.chromium.org/6976028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix two bugs in LiveRange::SplitAt:
vegorov@chromium.org [Tue, 31 May 2011 13:35:52 +0000 (13:35 +0000)]
Fix two bugs in LiveRange::SplitAt:

- when splitting at the beginning of the UseInterval we need to find an interval preceding it.

- we need to reset cached iteration state after splitting.

BUG=v8:1410

Review URL: http://codereview.chromium.org/7053039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd asserts and state tracking to ensure that we do not call
erik.corry@gmail.com [Tue, 31 May 2011 12:38:45 +0000 (12:38 +0000)]
Add asserts and state tracking to ensure that we do not call
into C++ without having a valid stack frame that can be
traversed at GC.
Also add asserts to track that we do not try to generate a stub
while we are generating a stub, since the stub creation code is
not GC safe.
Review URL: http://codereview.chromium.org/7084032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoSupport optimization of named function literals.
kmillikin@chromium.org [Tue, 31 May 2011 11:54:46 +0000 (11:54 +0000)]
Support optimization of named function literals.

Introduce a Hydrogen value for the value denoted by the function name.

R=fschneider@chromium.org,mnaganov@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7083024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoUpdate apply with arguments optimization for strict mode functions and builtins.
ager@chromium.org [Tue, 31 May 2011 10:38:41 +0000 (10:38 +0000)]
Update apply with arguments optimization for strict mode functions and builtins.

Do not convert to object for values for strict-mode functions and
builtins.

R=ricow@chromium.org
BUG=v8:1412
TEST=mjsunit/regress/regress-1412.js

Review URL: http://codereview.chromium.org/7096006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd support for external arrays to d8
jkummerow@chromium.org [Tue, 31 May 2011 09:42:17 +0000 (09:42 +0000)]
Add support for external arrays to d8

Review URL: http://codereview.chromium.org/7053038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoPush the general AST id field down from ASTNode to Expression.
svenpanne@chromium.org [Tue, 31 May 2011 09:34:37 +0000 (09:34 +0000)]
Push the general AST id field down from ASTNode to Expression.

Almost all uses were below Expression already, only a single use in IfStatement
had to be handled explicitly (probably an oversight from earlier changes?). This
is a small step towards a less ad-hoc handling of IDs in the front end.
Review URL: http://codereview.chromium.org/7054034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix a number of tests that incorrectly used assertUnreachable.
ager@chromium.org [Tue, 31 May 2011 08:08:42 +0000 (08:08 +0000)]
Fix a number of tests that incorrectly used assertUnreachable.

Our testing infrastructure uses exceptions to indicate
errors. assertUnreachable therefore throws an exception to indicate
that it was reached. Therefore, it cannot be used to check that an
exception was thrown using the pattern:

try {
  shouldThrow();
  assertUnreachable();
} catch(e) {
}

Such a test will always pass because assertUnreachable will throw an
exception if shouldThrow does not.

R=ricow@chromium.org

Review URL: http://codereview.chromium.org/7053035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix receiver for calls to strict-mode and builtin functions that are
ager@chromium.org [Tue, 31 May 2011 07:57:22 +0000 (07:57 +0000)]
Fix receiver for calls to strict-mode and builtin functions that are
potentially shadowed by eval.

R=sgjesse@chromium.org
TEST=mjsunit/regress/regress-124.js

Review URL: http://codereview.chromium.org/7096004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix building with profilingsupport=off
sgjesse@chromium.org [Mon, 30 May 2011 14:33:23 +0000 (14:33 +0000)]
Fix building with profilingsupport=off

Using profilingsupport=off is not recommended as it will turn off crankshaft. With this change it will build though.

R=erik.corry@gmail.com

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7085025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoHeap profiler: fetch document.URL of global objects.
mikhail.naganov@gmail.com [Mon, 30 May 2011 14:31:47 +0000 (14:31 +0000)]
Heap profiler: fetch document.URL of global objects.

This allows to distinguish DOMWindow objects in browser from each other.

R=vitalyr@chromium.org,sgjesse@chromium.org
BUG=https://bugs.webkit.org/show_bug.cgi?id=61177
TEST=cctest/test-heap-profiler/DocumentURL

Review URL: http://codereview.chromium.org/7082012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoReapply change to Pass undefined to JS builtins when called with
ager@chromium.org [Mon, 30 May 2011 13:49:22 +0000 (13:49 +0000)]
Reapply change to Pass undefined to JS builtins when called with
implicit receiver.

A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.

R=fschneider@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js

Review URL: http://codereview.chromium.org/7085034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix a number of IC stubs to correctly set the call kind.
ager@chromium.org [Mon, 30 May 2011 13:23:17 +0000 (13:23 +0000)]
Fix a number of IC stubs to correctly set the call kind.

Make the call kind and call wrapper arguments explicit to force
developers to make a choice. This would have avoided the bug in the
first case.

R=fschneider@chromium.org
TEST=mjsunit/strict-mode-implicit-receiver.js

Review URL: http://codereview.chromium.org/7086029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix timeout and a small bug in a regression test.
fschneider@chromium.org [Mon, 30 May 2011 12:48:35 +0000 (12:48 +0000)]
Fix timeout and a small bug in a regression test.
Review URL: http://codereview.chromium.org/7085031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoSimple support for const variables in Crankshaft.
fschneider@chromium.org [Mon, 30 May 2011 11:31:41 +0000 (11:31 +0000)]
Simple support for const variables in Crankshaft.

The approach is to handle the common case in the optimizing
compiler and to bailout for the rare corner cases.

This is done by initializing all local const-variables with
the hole value and disallowing any use of the hole value statically.
Review URL: http://codereview.chromium.org/6026006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix JSON issue with arrays.
sandholm@chromium.org [Mon, 30 May 2011 10:47:38 +0000 (10:47 +0000)]
Fix JSON issue with arrays.
Review URL: http://codereview.chromium.org/7089003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemoved dead flags.
svenpanne@chromium.org [Mon, 30 May 2011 09:42:28 +0000 (09:42 +0000)]
Removed dead flags.
Review URL: http://codereview.chromium.org/7077028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMinor JSON cleanup. Also added comment requested for r8086.
sandholm@chromium.org [Mon, 30 May 2011 09:23:17 +0000 (09:23 +0000)]
Minor JSON cleanup. Also added comment requested for r8086.
Review URL: http://codereview.chromium.org/7086026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years ago Prepare push to trunk. Now working on version 3.4.1.
ricow@chromium.org [Mon, 30 May 2011 08:43:52 +0000 (08:43 +0000)]
 Prepare push to trunk.  Now working on version 3.4.1.
Review URL: http://codereview.chromium.org/7087025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAllocate normal register for LDoubleToI in DoToInt32 (fixes no-sse3 issue)
ricow@chromium.org [Mon, 30 May 2011 07:53:21 +0000 (07:53 +0000)]
Allocate normal register for LDoubleToI in DoToInt32 (fixes no-sse3 issue)
Review URL: http://codereview.chromium.org/7083021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemove unused DummyScope implementation.
kmillikin@chromium.org [Mon, 30 May 2011 07:38:45 +0000 (07:38 +0000)]
Remove unused DummyScope implementation.

R=lrn@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7062020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoSimplify the Scope API.
kmillikin@chromium.org [Mon, 30 May 2011 07:33:12 +0000 (07:33 +0000)]
Simplify the Scope API.

Eliminate the LocalType enum in favor of a pair of functions, one for var
and const declarations and one for parameters.  Move the responsibility for
adding a parameter variable to the Scope's internal data structure into the
Scope and out of the parser.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agolinux: extend the ifdefs in shell.cc to cover V8_SHARED too
ager@chromium.org [Mon, 30 May 2011 06:10:41 +0000 (06:10 +0000)]
linux: extend the ifdefs in shell.cc to cover V8_SHARED too

Review URL: http://codereview.chromium.org/7076030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoCorrectly set the length of string before creating filler object in the json parser...
ricow@chromium.org [Mon, 30 May 2011 06:04:36 +0000 (06:04 +0000)]
Correctly set the length of string before creating filler object in the json parser (fixes crbug 84186).

Testcase created based on the supplied test case from the bug report, but using json parse directly instead of through the chrome javascript console.
Review URL: http://codereview.chromium.org/7084023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix Win compilation issue introduced in r8081.
sandholm@chromium.org [Thu, 26 May 2011 14:41:11 +0000 (14:41 +0000)]
Fix Win compilation issue introduced in r8081.
Review URL: http://codereview.chromium.org/7074009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoDouble allocation size for special json strings on every resize (fixes
ricow@chromium.org [Thu, 26 May 2011 14:03:30 +0000 (14:03 +0000)]
Double allocation size for special json strings on every resize (fixes
crbug 83877)

The issue was that with the relatively small start and increment size of the string we created a ton of string handles when scanning a large string with special characters (500k+ in this case).

In addition, since we can not be sure the the newly allocated string
is in newspace a check is introduced and if not a filler object is
inserted instead of shrinking.
Review URL: http://codereview.chromium.org/7075009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoJSON.stringify improvement. Fast case in C++ for string arrays.
sandholm@chromium.org [Thu, 26 May 2011 13:58:48 +0000 (13:58 +0000)]
JSON.stringify improvement. Fast case in C++ for string arrays.
Review URL: http://codereview.chromium.org/7077004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoARM: Avoid using ldrd/strd with post increment
sgjesse@chromium.org [Thu, 26 May 2011 13:52:14 +0000 (13:52 +0000)]
ARM: Avoid using ldrd/strd with post increment

These instructions seems to cause problems in some situations. This reverts parts of r7873.

R=erik.corry@gmail.com

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//6962010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix stray character in last build
danno@chromium.org [Thu, 26 May 2011 12:16:13 +0000 (12:16 +0000)]
Fix stray character in last build

TBR=kmillikin@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoPrevent deopt on double value assignment to typed arrays
danno@chromium.org [Thu, 26 May 2011 12:07:22 +0000 (12:07 +0000)]
Prevent deopt on double value assignment to typed arrays

Implement truncation of double and tagged values when assigning to an element of a typed arrays in order to avoid depots.

BUG=1313
TEST=test/mjsunit/external-array.js

Review URL: http://codereview.chromium.org/6961019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRevert "Pass undefined to JS builtins when called with implicit receiver."
ager@chromium.org [Thu, 26 May 2011 11:22:29 +0000 (11:22 +0000)]
Revert "Pass undefined to JS builtins when called with implicit receiver."

Presubmit and failing test.

TBR=lrn@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7071009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd a simple test for inlining of arguments accesses.
kmillikin@chromium.org [Thu, 26 May 2011 11:17:15 +0000 (11:17 +0000)]
Add a simple test for inlining of arguments accesses.

R=whesse@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7062018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoPass undefined to JS builtins when called with implicit receiver.
ager@chromium.org [Thu, 26 May 2011 11:07:48 +0000 (11:07 +0000)]
Pass undefined to JS builtins when called with implicit receiver.

A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.

R=lrn@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js

Review URL: http://codereview.chromium.org/7068009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoDo not allow inlining functions with direct arguments access.
kmillikin@chromium.org [Thu, 26 May 2011 10:56:07 +0000 (10:56 +0000)]
Do not allow inlining functions with direct arguments access.

Our implementations of arguments without materializing the arguments
object (based on inspecting the stack frame) does not work for inlined
functions.  Guard all attempts by disallowing them if possible or else
bailing out of the optimizing compiler.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6976022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: Added the stop() instruction with same behavior as on Arm simulator.
sgjesse@chromium.org [Thu, 26 May 2011 07:46:18 +0000 (07:46 +0000)]
MIPS: Added the stop() instruction with same behavior as on Arm simulator.

The already working watchpoint break mechanism has been extended to handle "stop" instructions, with text messages.

Explanation (also in constants-mips.h):
On MIPS Simulator breakpoints can have different codes:
- Breaks between 0 and kMaxWatchpointCode are treated as simple watchpoints, the simulator will run through them and print the registers.
- Breaks between kMaxWatchpointCode and kMaxStopCode are treated as stop() instructions (see Assembler::stop()).
- Breaks larger than kMaxStopCode are simple breaks, dropping you into the debugger.

The current values are 31 for kMaxWatchpointCode and 127 for kMaxStopCode.
From the user's point of view this works the same way as the ARM stop instruction except for the break code usage detailed above.

Ported commits: r5723 (3ba78d24)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7062014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMake RegExp objects not callable.
lrn@chromium.org [Thu, 26 May 2011 07:35:09 +0000 (07:35 +0000)]
Make RegExp objects not callable.

Review URL: http://codereview.chromium.org/6930006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: port Fix GC-unsafe corner case in bit-not on ARM.
sgjesse@chromium.org [Thu, 26 May 2011 07:02:35 +0000 (07:02 +0000)]
MIPS: port Fix GC-unsafe corner case in bit-not on ARM.

Port r8055 to mips.
(5b50df9c)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7075003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoLanding http://codereview.chromium.org/7033038 for jshin.
cira@chromium.org [Wed, 25 May 2011 22:18:41 +0000 (22:18 +0000)]
Landing codereview.chromium.org/7033038 for jshin.

Make 'ignoreCase' work in collator.

BUG=28604
TEST=http://www.i18nl10n.com/chrome/coll.html
Review URL: http://codereview.chromium.org/7008023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd fast cases for flat comparison to String::Is{Ascii,TwoByte}EqualTo.
vitalyr@chromium.org [Wed, 25 May 2011 17:07:05 +0000 (17:07 +0000)]
Add fast cases for flat comparison to String::Is{Ascii,TwoByte}EqualTo.

R=ager@chromium.org

Review URL: http://codereview.chromium.org/7064017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agotools/stats-viewer: Update chromium stats table layout.
vitalyr@chromium.org [Wed, 25 May 2011 16:47:54 +0000 (16:47 +0000)]
tools/stats-viewer: Update chromium stats table layout.

R=vegorov@chromium.org

Review URL: http://codereview.chromium.org/6992068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoUntank the build.
erik.corry@gmail.com [Wed, 25 May 2011 12:40:04 +0000 (12:40 +0000)]
Untank the build.
Review URL: http://codereview.chromium.org/6992061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd comment better explaining the calling-stubs-from-stubs issue.
erik.corry@gmail.com [Wed, 25 May 2011 12:26:15 +0000 (12:26 +0000)]
Add comment better explaining the calling-stubs-from-stubs issue.
Review URL: http://codereview.chromium.org/7031046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd a comment about map collection into MarkCompactCollector::MarkUnmarkedObject.
vegorov@chromium.org [Wed, 25 May 2011 10:49:48 +0000 (10:49 +0000)]
Add a comment about map collection into MarkCompactCollector::MarkUnmarkedObject.

Review URL: http://codereview.chromium.org/6992059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix GC-unsafe corner case in bit-not on ARM
erik.corry@gmail.com [Wed, 25 May 2011 10:35:00 +0000 (10:35 +0000)]
Fix GC-unsafe corner case in bit-not on ARM
Review URL: http://codereview.chromium.org/6987009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoChange calls to undefined property setters to not throw (fixes issue 1355).
ricow@chromium.org [Wed, 25 May 2011 08:37:38 +0000 (08:37 +0000)]
Change calls to undefined property setters to not throw (fixes issue 1355).

We currently throw when there is only a getter defined on the
property, but this should only be the case in strict mode.
Review URL: http://codereview.chromium.org/7064027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoPrepare push to trunk. Now working on version 3.4.0.
danno@chromium.org [Wed, 25 May 2011 07:37:14 +0000 (07:37 +0000)]
Prepare push to trunk.  Now working on version 3.4.0.

R=ager@chromium.org

Review URL: http://codereview.chromium.org/6979008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: Fixed two bugs related to double function calls.
sgjesse@chromium.org [Wed, 25 May 2011 06:41:39 +0000 (06:41 +0000)]
MIPS: Fixed two bugs related to double function calls.

These originated from 4dfb7f2e.
This fixes cctest test-api/ConversionNumber in soft-float mode.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7068002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: port Fix calls of strict mode function with an implicit receiver.
ager@chromium.org [Wed, 25 May 2011 06:04:01 +0000 (06:04 +0000)]
MIPS: port Fix calls of strict mode function with an implicit receiver.

Port of r8040 to mips.

Original commit message:
Strict mode functions are to get 'undefined' as the receiver when
called with an implicit receiver. Modes are bad! It forces us to have
checks on all function calls.
This change attempts to limit the cost by passing information about
whether or not a call is with an implicit or explicit receiver in ecx
as part of the calling convention. The cost is setting ecx on all
calls and checking ecx on entry to strict mode functions.
Implicit/explicit receiver state has to be maintained by ICs. Various
stubs have to not clobber ecx or save and restore it.
CallFunction stub needs to check if the receiver is implicit when it
doesn't know from the context.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6992051
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMigrate flag from bit_field2 to bit_field3
danno@chromium.org [Tue, 24 May 2011 21:07:55 +0000 (21:07 +0000)]
Migrate flag from bit_field2 to bit_field3

R=ager@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7064029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoEnsure that external pixel arrays use a byte register in Crankshaft.
whesse@chromium.org [Tue, 24 May 2011 16:23:22 +0000 (16:23 +0000)]
Ensure that external pixel arrays use a byte register in Crankshaft.

BUG=v8:1406
TEST=fast/canvas/canvas-putImageData.html

Review URL: http://codereview.chromium.org/7067028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemove some dead code from full-codegen on all platforms.
whesse@chromium.org [Tue, 24 May 2011 15:11:48 +0000 (15:11 +0000)]
Remove some dead code from full-codegen on all platforms.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6966033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoPlatform and build updates for Android build
sgjesse@chromium.org [Tue, 24 May 2011 14:49:02 +0000 (14:49 +0000)]
Platform and build updates for Android build

R=ager@chromium.org

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7059015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd tests for function statements in strict mode.
lrn@chromium.org [Tue, 24 May 2011 14:02:59 +0000 (14:02 +0000)]
Add tests for function statements in strict mode.

Small fixes.
Added test for const declaration in strict mode.

TEST=preparser/strict-function-statement

Review URL: http://codereview.chromium.org/6990056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix calls of strict mode function with an implicit receiver.
ager@chromium.org [Tue, 24 May 2011 14:01:36 +0000 (14:01 +0000)]
Fix calls of strict mode function with an implicit receiver.

Only IA32 version for now. I'll start porting.

Strict mode functions are to get 'undefined' as the receiver when
called with an implicit receiver. Modes are bad! It forces us to have
checks on all function calls.

This change attempts to limit the cost by passing information about
whether or not a call is with an implicit or explicit receiver in ecx
as part of the calling convention. The cost is setting ecx on all
calls and checking ecx on entry to strict mode functions.

Implicit/explicit receiver state has to be maintained by ICs. Various
stubs have to not clobber ecx or save and restore it.

CallFunction stub needs to check if the receiver is implicit when it
doesn't know from the context.

Review URL: http://codereview.chromium.org/7039036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoModify use of RelocInfo::CODE_TARGET_WITH_ID in full-codegen to make it the same...
whesse@chromium.org [Tue, 24 May 2011 13:48:55 +0000 (13:48 +0000)]
Modify use of RelocInfo::CODE_TARGET_WITH_ID in full-codegen to make it the same on all platforms.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7063021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoUpdate gyp files with json parser.
ricow@chromium.org [Tue, 24 May 2011 13:02:01 +0000 (13:02 +0000)]
Update gyp files with json parser.
Review URL: http://codereview.chromium.org/7066019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoHandle changes to the Object prototype in fast handling of arrays
sgjesse@chromium.org [Tue, 24 May 2011 12:28:10 +0000 (12:28 +0000)]
Handle changes to the Object prototype in fast handling of arrays

R=ager@chromium.org

BUG=v8:1403
TEST=test/mjsunit/regress/regress-1403.js

Review URL: http://codereview.chromium.org//7067019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRename TypeRecording...Stub into ...Stub.
fschneider@chromium.org [Tue, 24 May 2011 12:20:16 +0000 (12:20 +0000)]
Rename TypeRecording...Stub into ...Stub.

There is no need for this long name.
Review URL: http://codereview.chromium.org/7063017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoEnhance gc-nvp-trace-processor.py:
vegorov@chromium.org [Tue, 24 May 2011 12:19:57 +0000 (12:19 +0000)]
Enhance gc-nvp-trace-processor.py:
- correctly display time spent in scavenger (it was attributed to 'other' scope).
- display time spent in 'external' scope.

Review URL: http://codereview.chromium.org/7067022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoCreate stand-alone json parser (including scanner).
ricow@chromium.org [Tue, 24 May 2011 12:16:23 +0000 (12:16 +0000)]
Create stand-alone json parser (including scanner).

The current json parser and scanner inherits fromt he normal scanners and parsers,
which are more complicated than we need for parsing json.

The supplied scanner works directly on the string supplied and has a
fast case mode for scanning only ascii characters (it will simply
create a substring or a symbol directly from the existing string). To
allow for creating symbols from a substring I have added a
SubStringAsciiSymbolKey that creates the hash based from our string
without extracting the sub-string. In case we need to add the symbol
it simply creates the symbol directly from the characters inside the
given string.
Review URL: http://codereview.chromium.org/7039037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoFix a bug in deoptimization on x64.
kmillikin@chromium.org [Tue, 24 May 2011 12:12:41 +0000 (12:12 +0000)]
Fix a bug in deoptimization on x64.

When deoptimizing to just after an ignored (because of a duplicate
property name) object literal property initializer, we incorrectly saw
the value of the initializer expression on the stack in the
unoptimized code.  The bug affected x64 only.

R=fschneider@chromium.org
BUG=v8:1404

Review URL: http://codereview.chromium.org/7066015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoChange strict mode poison pill to be the samme type error function (fixes issue 1387).
ricow@chromium.org [Tue, 24 May 2011 11:07:06 +0000 (11:07 +0000)]
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

13 years agoFix poliarty of CheckMap smi check on ia32
danno@chromium.org [Tue, 24 May 2011 08:59:51 +0000 (08:59 +0000)]
Fix poliarty of CheckMap smi check on ia32

R=karlklose@chromium.org
BUG=none
TEST=existing tests

Review URL: http://codereview.chromium.org/7067018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemove wrong assert to fix a debug crash with arguments object.
fschneider@chromium.org [Tue, 24 May 2011 08:38:42 +0000 (08:38 +0000)]
Remove wrong assert to fix a debug crash with arguments object.

We don't need to assert the existence of a length-property of the
arguments object because it is not a JSArray, but just a normal JSObject.

BUG=v8:1227
Review URL: http://codereview.chromium.org/7064020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: arch-independent changes to support mips.
sgjesse@chromium.org [Tue, 24 May 2011 07:56:20 +0000 (07:56 +0000)]
MIPS: arch-independent changes to support mips.

This change supports all non-crankshaft features except serialization.

This must be built after the changes in http://codereview.chromium.org/6966031
are landed.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7039058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoMIPS: Update for 23-May commits, and a few older ones.
sgjesse@chromium.org [Tue, 24 May 2011 07:23:32 +0000 (07:23 +0000)]
MIPS: Update for 23-May commits, and a few older ones.

Make mips-specifc changes for r7999, r8001, r8002.

Also bring in changes for older commits 7203, 7279, 7693, 7715, 7788.

Mips changes for 7715 (Arm: Support hardfloat in SCons build), and
7693 (Implement hardfloat calling convention in macro assembler and simulator)
resulted in changes to SConstruct.

BUG=
TEST=

Review URL: http://codereview.chromium.org//6966031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoInline more zone stuff.
vitalyr@chromium.org [Mon, 23 May 2011 22:23:50 +0000 (22:23 +0000)]
Inline more zone stuff.

R=ager@chromium.org

Review URL: http://codereview.chromium.org/7066004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoRemove stub call in non-VFP3 code path of external array load.
karlklose@chromium.org [Mon, 23 May 2011 16:17:40 +0000 (16:17 +0000)]
Remove stub call in non-VFP3 code path of external array load.

KeyedLoadStubCompiler::GenerateLoadExternalArray is tail-calling a stub, which it is not allowed to, because its major key is higher than InstanceOf. Instead of changing the major key I decided to provide an inline implementation.

TEST=test-api/ExternalArrays with --noenable-vfp3

R=danno@chromium.org

Review URL: http://codereview.chromium.org/7060007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAdd bit_field3 to Map objects
danno@chromium.org [Mon, 23 May 2011 15:59:38 +0000 (15:59 +0000)]
Add bit_field3 to Map objects

Reuse instance_descriptor field in the map to store additional flags when there are no descriptors. When descriptors get added to the map, move the flags to the DescriptorArray and access through indirection.

Review URL: http://codereview.chromium.org/7033024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoAvoid calling ToObject on JSFunction receiver arguments for Function.call and Functio...
whesse@chromium.org [Mon, 23 May 2011 15:17:10 +0000 (15:17 +0000)]
Avoid calling ToObject on JSFunction receiver arguments for Function.call and Function.apply.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7062007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

13 years agoEnsure SMI check for receiver in external array store stub for ARM.
danno@chromium.org [Mon, 23 May 2011 15:04:32 +0000 (15:04 +0000)]
Ensure SMI check for receiver in external array store stub for ARM.

R=ager@chromium.org
BUG=none
TEST=test/mjsunit/external-array.js

Review URL: http://codereview.chromium.org/7058011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00