Commit Graph

1155 Commits

Author SHA1 Message Date
antonm@chromium.org
9477ea8735 Fix LargeObjectSpace::Contains to check if addr is in new space.
Otherwise page header check is not quite robust: if there is a smi
at the same offset as Page::is_normal_page field, wrong result would
be returned.

That shouldn't be the problem for paged spaces as objects in those
pages do not span page boundaries and thus cannot mess with ::is_normal_page field.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 13:10:50 +00:00
sgjesse@chromium.org
6a63910650 Re-apply "Inline floating point compare"
This re-applies r4220 and r4233, which was reverted in r4254 due to a bug. This bug has now been fixed, with the only change being line 2884 changed from

  __ SmiTag(left_side->reg());

to

  __ SmiTag(operand->reg());

Added a regression test.

BUG=http://crbug.com/39160
TEST=test/mjsunit/regress/regress-crbug-39160.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:04:34 +00:00
whesse@chromium.org
244513555c Avoid calling ToRegister(register) when result is in register already, and register is shared.
Review URL: http://codereview.chromium.org/1325004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 11:52:42 +00:00
ager@chromium.org
652335b995 Implement support for reattaching a global object to a context. This
can be used to use the same global object for different contexts at
different points in time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 13:24:46 +00:00
pfeldman@chromium.org
54f0a5b221 Expose debug context into the native code. This change is doing several things:
1) Exposes Local<Context> v8::Debug::GetDebugContext().
Rationale: We can already get debugger context instance using various workarounds,
so exposing it explicitly in the API only makes things more clear.

2) Removes debugger.HasJavaScriptFrames() requirement for entering debugger context.
Rationale: Sometimes we'd like to call into debugger from the external native code.

3) Makes Debugger v8::Debug::Call execute on debugger context's global object.
Rationale: This is somewhat arguable, but temporary measure. We've agreed that we
should introduce a DebugAPI object that would expose necessary API in the debug-delay.
The problem is that it would take some time to define this API and it is not really
convenient to do that on the v8 land given the difference in v8 / host lifecycle.
The plan is to compose this API as a Debug.* wrapper outside v8 by means of exposing
debugger context's global object here, and once API settles down, upstream it to v8 and
start making Debug::Calls on this new DebugAPI object instead.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 13:09:02 +00:00
ager@chromium.org
71e792a82c Revert revisions 4241, 4243 and 4247 because of Windows build errors
and test failures.

TBR=serya@chromium.org
Review URL: http://codereview.chromium.org/1269003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 11:48:01 +00:00
serya@chromium.org
b5127faa57 Fix conform test.
Review URL: http://codereview.chromium.org/1217007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 11:11:33 +00:00
serya@chromium.org
2bd9919788 StringToDouble rewritten not using String::Get and memory allocations.
It converts the number to "canonical" form removing insignificant digits,
leading zerroes and spaces what guarantees to fit a fixed size buffer and
does not changes result of strtod.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 08:51:03 +00:00
mikhail.naganov@gmail.com
ea6221d4e6 Add comments to test-log-stack-tracer.
Review URL: http://codereview.chromium.org/1181001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 08:46:17 +00:00
oleg@chromium.org
2b5c05ed79 Make the new Date test independent of the timezone in which it is run.
Review URL: http://codereview.chromium.org/1084018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 15:28:58 +00:00
whesse@chromium.org
c3b5e22764 Fix an error in optimized modulus operator, add unit test.
Review URL: http://codereview.chromium.org/1118008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 15:18:00 +00:00
sgjesse@chromium.org
01bcdbcdb1 MIPS simple function calls
This lands http://codereview.chromium.org/1018001.

Patch by Alexandre Rames <alexandre.rames@gmail.com> from Sigma Designs Inc.

Mads, please just have to look at the new flag --disable-native-files (two files not in the mips directory).
Review URL: http://codereview.chromium.org/1140004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 15:04:45 +00:00
oleg@chromium.org
fe6522e80d Fix bug http://code.google.com/p/v8/issues/detail?id=659. Move the limits check for date before the time zone offset is applied.
Review URL: http://codereview.chromium.org/1075016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 14:47:02 +00:00
mikhail.naganov@gmail.com
4d1f8cbfd6 New GCCallbacks with additional parameters.
Author: Ilya Tikhonovsky <loislo@chromium.org>
Original issue: http://codereview.chromium.org/1094002

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 13:11:44 +00:00
mikhail.naganov@gmail.com
17665cafbe Fix issue 658: update test-log-stack-tracer after r4211.
It appears that semi-automatic changes made to test's code were
incorrect. v8::Script::Compile returns wrapped JSFunction,
not SharedFunctionInfo.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 12:42:47 +00:00
kasperl@chromium.org
7d6a3b433f Merge the partial_snapshots branch back into bleeding_edge. For
now, the custom call generator stuff is disabled.
Review URL: http://codereview.chromium.org/1094014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 11:40:38 +00:00
iposva@chromium.org
a1ec99c05d - Remove function boilerplate objects and use SharedFunctionInfos in
their place.
- Add one field to the SharedFunctionInfo to remember the number of
  literals used in this function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 06:04:44 +00:00
mikhail.naganov@gmail.com
71754ebe81 Add multithreading test for SamplingCircularQueue, fix implementation.
This is for the case of Linux, where sampling is done using SIGPROF
signal handler which is executed in the context of an interrupted
thread. In this case, my previous implementation with TLS doesn't
work.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-22 14:23:45 +00:00
fschneider@chromium.org
03089b6644 Fix code generation for fast smi loops to support parameters as well.
This change fixes an assert we hit when we recognized a fast smi loop
with a parameter as the loop variable.

BUG=650


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-22 11:55:12 +00:00
mikhail.naganov@gmail.com
89b040894e Add a few tests to ProfilerEventsProcessor.
Review URL: http://codereview.chromium.org/1084009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 13:51:01 +00:00
floitschV8@gmail.com
05beab6b1f Rename files containing underscores.
Review URL: http://codereview.chromium.org/1102002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:15:24 +00:00
mikhail.naganov@gmail.com
9582645a02 Add basic C++ implementation of CPU profiler.
Review URL: http://codereview.chromium.org/1079006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 09:46:53 +00:00
fschneider@chromium.org
ec974ddb50 Fix bug when generating a fast smi loop.
We may encounter an invalid frame after generating code
for the loop body in case the loop body ends in an unconditional
return. Before setting the type information for the loop variable
we need to check for a valid frame.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 14:32:02 +00:00
floitschV8@gmail.com
9e84308722 Rename grisu to fast-dtoa. Get rid of template.
Review URL: http://codereview.chromium.org/1032007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 13:19:59 +00:00
oleg@chromium.org
825a5d741f Improve Math.round(). Fix the bug in r4146. Further improve performance by checking the exponent instead of comparing doubles. Add several tests for numbers near the limits of SMI and several tests from WebKit.
Review URL: http://codereview.chromium.org/1008004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 13:00:57 +00:00
fschneider@chromium.org
34faea85db Add test cases for fast smi loops.
Review URL: http://codereview.chromium.org/1014007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:08:24 +00:00
fschneider@chromium.org
e090f46a55 Fix type propagation rules for count operation.
Also treat const-variables as not side-effect free.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 16:39:29 +00:00
sgjesse@chromium.org
1963ffba99 Don't generate inline constructors if this.__proto__ is assigned.
BUG=http://code.google.com/p/v8/issues/detail?id=646
TEST=test/mjsunit/regress/regress-646.js
Review URL: http://codereview.chromium.org/1023008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:23:53 +00:00
mikhail.naganov@gmail.com
d2188658ca Re-apply r4159 now with working test on x64
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:15:42 +00:00
fschneider@chromium.org
9f318feb93 Revert r4159 because of x64 test failures.
Review URL: http://codereview.chromium.org/1049003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:04:07 +00:00
mikhail.naganov@gmail.com
ce9298029d Implement circular queues for the C++ version of CPU profiler.
Circular queues serve as a transport for communicating between
VM, stack sampler and analyzer threads. Logging requirements
for VM and stack sampler are completely different, that's why
I introduced two different versions of CQs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:25:10 +00:00
sgjesse@chromium.org
a43c533d2f Make the C++ tests run without SSE2 support.
Review URL: http://codereview.chromium.org/982007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 10:28:44 +00:00
erik.corry@gmail.com
889cbe55b8 Fix a bug in the regexp caching. Also add a few more places to
cache.  We now cache most of the places where Opera cache and
one or two where they do not cache for some reason.  Since
these optimizations aren't necessarily useful on real code we
may remove them if and when the Dromaeo website makes the
benchmarks harder to game.
Review URL: http://codereview.chromium.org/995005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 10:23:06 +00:00
erik.corry@gmail.com
e1c486c313 Keep more track of whether code is from the built
in .js files in V8.  This change gets bleeding edge
a tiny bit closer to the partial snapshots branch.
Review URL: http://codereview.chromium.org/1052003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 08:14:59 +00:00
fschneider@chromium.org
9202e05016 Fix bug in the count operation where we statically know the input is a smi.
Even if we know that the input to a count operation is a smi we still need to check if the result overflowed (and becomes a heap number).

Also fix the smi loop analysis to take two border cases correctly into account.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 16:03:40 +00:00
peter.rybin@gmail.com
ad876956c0 LiveEdit: patch positions in function
Review URL: http://codereview.chromium.org/914003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 21:06:51 +00:00
antonm@chromium.org
14547ef434 Just grow elements if they happen to be at the edge of new space.
Review URL: http://codereview.chromium.org/945002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 15:16:04 +00:00
mikhail.naganov@gmail.com
12d252eb81 Start migrating profiles processing to C++.
Adding code for maintaining (address -> name) mapping and building
call trees.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 14:11:19 +00:00
antonm@chromium.org
7f1eda50cc Implement a custom call compiler for Array.pop.
Review URL: http://codereview.chromium.org/870007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 13:45:31 +00:00
fschneider@chromium.org
d0908674fa Fix bug in assigned variables analysis.
Property stores were not visited correctly by the visitor.
I fixed this issue by visiting property stores by visiting 
receiver and key directly (and not calling visit on the lhs property
 ast node)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 13:12:08 +00:00
fschneider@chromium.org
d896e4f6f2 Fix treatment of const variables in assigned variable analysis.
Const variables are not considered as trivial sub-expressions since
we have the check for the hole value as a side-effect.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 10:20:31 +00:00
antonm@chromium.org
de070ccfa6 First take on custom call generators.
Review URL: http://codereview.chromium.org/669061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 16:24:31 +00:00
floitschV8@gmail.com
8814064337 Fast double-to-ascii conversion.
Review URL: http://codereview.chromium.org/866002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 14:49:35 +00:00
antonm@chromium.org
21af2c360a Reland 4068 which wrapped Array methods into native builtins (reverted in 4075).
Review URL: http://codereview.chromium.org/857002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 13:13:21 +00:00
sgjesse@chromium.org
8f76082701 Fix presubmit error
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/867002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:49:47 +00:00
mikhail.naganov@gmail.com
c413105da7 Make the assumption on the minimum buffer size for GetLogLines explicit.
Review URL: http://codereview.chromium.org/799008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:48:01 +00:00
sgjesse@chromium.org
e5f27966dc Add fuzzing support for inline runtime functions
The inline runtime functions are now included in the fuzzing of the natives. The chack for the expected number of arguments passed have been moved to the parser which will generate a syntax error if a runtime function (either C++ or inline) is called with a different number of arguments than expected.
Review URL: http://codereview.chromium.org/573056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:27:12 +00:00
sgjesse@chromium.org
b0c9738f77 Fix code cache lookup for keyed IC's
For keyed IC's the name is not necessarily a string.

BUG=http://crbug.com/37853
TEST=test/mjsunit/regress/regress-crbug-37853.js
Review URL: http://codereview.chromium.org/872001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 08:52:31 +00:00
serya@chromium.org
4fd99d23cc Math.abs rewrited to not use Runtime.
Review URL: http://codereview.chromium.org/799006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 08:31:15 +00:00
floitschV8@gmail.com
088afd03a6 Revert grisu commits.
Review URL: http://codereview.chromium.org/804005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 21:26:32 +00:00