Commit Graph

138 Commits

Author SHA1 Message Date
kasperl@chromium.org
e9e8628380 Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge until we have a fix
for the crashers we see on the distributed test infra-
structure.

We know that revision 1383 is causing issues, but I 
had to revert some of the other recent RegExp changes
in order to get this part out.
Review URL: http://codereview.chromium.org/39186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 15:23:17 +00:00
olehougaard
7bd50d046d Fixed issue 253. No longer assuming that the target of a property lookup is a JSObject.
Review URL: http://codereview.chromium.org/39126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 11:57:24 +00:00
christian.plesner.hansen@gmail.com
a4d8eadc69 all-in-one
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 09:09:07 +00:00
erik.corry@gmail.com
5b8c63f9d5 Avoids allocating a JSArray of capture information on each non-global
regular expression match.
Also moves all last-match information into one place where it can be
updated from C++ code (this will be used in another afsnit).
Review URL: http://codereview.chromium.org/28184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 10:04:34 +00:00
olehougaard
e3c0ae62af Go into slow case when encountering object initialization on the top level to optimize performance of code like
C.prototype.x = ...;
C.prototype.y = ...;
...
C.prototype.z = ...;
Review URL: http://codereview.chromium.org/27128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:54:22 +00:00
iposva@chromium.org
c093e94546 - Pass the knowledge whether the old GC is compacting to the GC prologue and epilogue. This allows us to skip frame cooking and uncooking when doing a mark-sweep GC.
- Add the ability for the code to refer to its code object by adding a handle to the code object in the MacroAssembler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:52:15 +00:00
ager@chromium.org
0c7af39737 Speed up access to global variables from eval scopes. Traverse the
surrounding context to figure out if the variable could be global.  If
the variable could be global we check context extension objects at
runtime and use a global LoadIC if no variables have been introduced
by eval.

Fix crash bug when loading function arguments from inside eval.  The 
shadowed variable in the DYNAMIC_LOCAL case does not rewrite to a slot in 
that case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:11:53 +00:00
sgjesse@chromium.org
969d43e785 Changed all log messages to be handled through the LogMessageBuilder instead of through fprintf directly to the log file.
Added a flag for the runtime %Log call and fixed its arguments checking. Use of %Log is only for debugging.
Review URL: http://codereview.chromium.org/21406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 12:49:35 +00:00
ager@chromium.org
d81fad1766 Fix debugger function that treated retry-after-gc failure as an
exception.

Minor indentation cleanup.
Review URL: http://codereview.chromium.org/20404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-16 13:31:13 +00:00
sgjesse@chromium.org
d131ecf3dd Changed the debugger API to allow only one debug event listener to be registered. The public API now only has SetDebugEventListener instead of AddDebugEventListener and RemoveDebugEventListener.
Moved the registrered debug event listener from the context to a global handle in the Debugger class. Storing it in the context did not make much sense.

Changed a lot of tests to handle the API change.

BUG=1242707
Review URL: http://codereview.chromium.org/19753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 07:59:12 +00:00
ager@chromium.org
c33e51681f Fix issue 221:
http://code.google.com/p/v8/issues/detail?id=221

The attempt to resolve 'eval' went into an infinite loop.  Also, we
need to throw a reference error in case 'eval' cannot be resolved.
Review URL: http://codereview.chromium.org/19536

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 13:18:20 +00:00
sgjesse@chromium.org
9f5ad905cb Skip the context extension object when locating objects referenced from another object (the right way).
BUG=211
Review URL: http://codereview.chromium.org/18857

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-28 06:28:13 +00:00
iposva@chromium.org
ff3433d0fd - Preserve bootstrapper state across thread switches (fixes issue 143).
- Make sure stack guards are properly setup even when preemption is active.
- Fix missing v8::Locker and v8::Unlocker use in d8.cc.
- Threads forked in d8 do get their own context setup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:09:46 +00:00
ager@chromium.org
524e34b8f8 Fix issue 192 by propagating out exceptions from object literal
boilerplate creation.

Removed declaration of unused and unimplemented function.
Review URL: http://codereview.chromium.org/18749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:10:26 +00:00
erik.corry@gmail.com
50e5ad72cb Fix bug where strings were not flattened before regexp.
Review URL: http://codereview.chromium.org/18552

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 08:35:41 +00:00
ager@chromium.org
c23dbc1928 Fix handling of const initialization. We did not handle the fact that
a const variable can be deleted between its declaration and its
initialization.

This fixes issue 189:

  http://code.google.com/p/v8/issues/detail?id=189

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 13:53:06 +00:00
sgjesse@chromium.org
0dab442be9 Added handling of hidden prototype objects when collecting local properties for an object mirror. The property names provided by an object mirror now includes all properties from the object and any hidden prototypes merged together.
Changed the name of Runtime_GetPrototype to Runtime_DebugGetPrototype to indicate that it is a debugger related function and changed its implementation to do the correct __proto__ lookup.

Added some more information to the Map debug print.
Review URL: http://codereview.chromium.org/18658

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 13:20:31 +00:00
sgjesse@chromium.org
2a5955a4fc Changes to the mirror handling
When getting properties for the global object proxy the properties from the global object are returned.

Script objects now have handles and are serialized by reference.

Added special handling for NaN.
Review URL: http://codereview.chromium.org/18445

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-21 09:32:07 +00:00
sgjesse@chromium.org
f5f1cd2921 Changes to the V8 debugger support which otherwise caused problems with Chrome.
Added quoting of the name of the ref property using {"ref":1} instead of {ref:1}. The Chrome C++ JSON parser implementation requires quoted property names.

Changed the JSON format for non finite numbers. The previous formatting using NaN, Infinite and -Infinite caused the Chrome C++ JSON parser implementation to fail. Values "NaN", "Infinite" and "-Infinite" (incuding quotes) are now used.

Reverted changes to DebugLookupResultValue (runtime.cc) from http://codereview.chromium.org/17377. The change caused callback into Chrome with the current V8 context expected to have a DOM Window global object. This is not the case when the debugger context is the active context. This causes properties from interceptors and accessors to be reported as undefined in the debugger.
Review URL: http://codereview.chromium.org/18194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-19 15:21:41 +00:00
ager@chromium.org
47d1298236 Change the handling of catch blocks to use context extension objects
instead of normal JSObjects.

This ensures that __proto__ and accessors on the Object prototype do
not interfere with catch scopes.  Also, it fixes the bug that catch
variables were not DontDelete (issue 74).

Next step is to create special lookup routines for context extension
objects and remove the special handling of context extension objects
from the general javascript object lookup routines.
Review URL: http://codereview.chromium.org/18143

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 09:42:08 +00:00
deanm@chromium.org
b7c1200462 Fix a bunch of spelling mistakes :\
Review URL: http://codereview.chromium.org/18094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:08:34 +00:00
feng@chromium.org
2cb36759ba Fix issue 6264 with a test case.
The problem is that Disable/EnableAccessCheck on an object may chnage its constructor's behavior
if object's map is the same as constructor's initial map. By copying maps, the constructor's
initial map is not changed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 17:39:23 +00:00
sgjesse@chromium.org
25112aba44 Refactored the mirror representation of properties. Removed the AssessorMirror and InterceptorPropertyMirror and moved all reflection for properties to PropertyMirror. From a PropertyMirror it can be checked whether a property has getter/setter defined in JavaScript and information on the getter/setter functions are now available. If calling the getter resulted in an exception this is reflected as well.
Properties from interceptors are also reflected through PropertyMirror as the distinction did not make sense seen from a JavaScript debugging perspective. The isNative function on a PropertyMirror can be used to check whether a property is defined natively by the host (or V8).

Simplified the local property lookup in the debug runtime call to just call GetProperty as the property is known to be a local property.
Review URL: http://codereview.chromium.org/17377

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 14:38:44 +00:00
ager@chromium.org
12854e6c67 Allocate as many object-literal properties as possible inobject.
This can lead to large objects which wastes a lot of space if we normalize properties.  We therfore clear the inobject properties when normalizing properties.  This is done by adjusting the instance size in the new map and overwriting the inobject properties with a filler.
Review URL: http://codereview.chromium.org/17308

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-12 10:59:58 +00:00
christian.plesner.hansen@gmail.com
afcc36a417 Added runtime call to the logging infrastructure. Made some changes
to the way regexps are being logged.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 13:24:52 +00:00
sgjesse@chromium.org
6c7a746c5d Refactored the code for handling debug step in in the runtime system into one function. For constructors this also means that step in will no longer step into the code for the builtins context.
Review URL: http://codereview.chromium.org/15035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 14:32:49 +00:00
olehougaard
392e6f849b Fixing a subtle bug in receiver resolution when a thrown and caught function is called from a catch-block.
Second attempt - now with better memory efficiency.
Review URL: http://codereview.chromium.org/14834

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 11:28:13 +00:00
lrn@chromium.org
4fe637066d Minor changes, mostly cosmetic, in string search.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 09:53:06 +00:00
sgjesse@chromium.org
2d66455dc0 Give an error when setting break points in functions either defined through the API or in functions which are part of the V8 builtins.
BUG=178
Review URL: http://codereview.chromium.org/13785

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-15 09:15:05 +00:00
lrn@chromium.org
3b968e0207 Preemption code for irregexp-native-ia32. Regexps can not only succeede or
fail, but also report a thrown exception.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 10:49:00 +00:00
sgjesse@chromium.org
d63a3e13e6 Changed the debugger break handling to support situations where there are no stack frames. This can happen when an exception is thrown when compiling code.
This is related to Chromium issue 5349 (http://code.google.com/p/chromium/issues/detail?id=5349).
Review URL: http://codereview.chromium.org/13720

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 08:03:24 +00:00
ager@chromium.org
4f15a008f6 Make sure that the generic stubs for keyed load and store and for
dictionary probing respects access check bit.
Review URL: http://codereview.chromium.org/13663

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-10 08:05:10 +00:00
lrn@chromium.org
9aaa8d985b Builds on Windows too.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 10:19:10 +00:00
lrn@chromium.org
70a3ba75be Optimization of single character indexOf. Gives small improvement on GCC4.2, but large improvement on GCC 4.3 (which was much worse on that particular code).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 09:50:39 +00:00
olehougaard
2b72eeedfb Change implementation of eval to make an exact distinction between direct eval and aliased eval.
Review URL: http://codereview.chromium.org/12673

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 13:55:06 +00:00
christian.plesner.hansen@gmail.com
b57b4a15cd Merge regexp2000 back into bleeding_edge
Review URL: http://codereview.chromium.org/12427

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 11:07:48 +00:00
ager@chromium.org
95d1d40077 Revert r819, 821, and 822 which caused a big performance regression
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 15:01:41 +00:00
olehougaard
3877c91a19 Fixing the detection of aliased eval so that it is exact.
Fixing the semantics of aliased eval so that it is conformant.
Review URL: http://codereview.chromium.org/11563

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 12:49:57 +00:00
ager@chromium.org
9ee294b302 Explicitly change a floating point division with a constant into a
multiplication by its inverse.

In optimized builds GCC does this on its own, but this may be useful
when using other compilers.
Review URL: http://codereview.chromium.org/11524

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 11:33:50 +00:00
olehougaard
27e4365aba Fixing wrong reference to this in eval.
Review URL: http://codereview.chromium.org/11227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-18 10:02:37 +00:00
olehougaard
4c9102021d Changing the semantics of cross-frame eval to be compatible with Safari and Firefox.
Review URL: http://codereview.chromium.org/11601

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-18 08:43:58 +00:00
feng@chromium.org
736c7a9d35 Some debugging support fixes on ARM simulator port.
1) Let SaveContext remember the top JS frame stack pointer so it works in simulator where C stack and JS stack are separated;
2) Use the new calling convension in %DebugBreakCallHelper function;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 17:44:16 +00:00
kasperl@chromium.org
7940adb1ec Track loop nesting across function calls when the function
is called through an IC the first time.
Review URL: http://codereview.chromium.org/10746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 05:50:52 +00:00
erik.corry@gmail.com
b4e7335c0c Removed some unsafe uses of StringShape.
Simplified some uses of StringShape.
Removed unused function SlicedStringFlatten.
Review URL: http://codereview.chromium.org/9408

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 10:26:08 +00:00
ager@chromium.org
439f3e6708 Do not put failures in handles.
Assert in the Handle constructor that the object is not a failure.

I have run our own tests in debug mode and the WebKit layout tests in
debug mode and there are no regressions.
Review URL: http://codereview.chromium.org/9114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 16:23:56 +00:00
lrn@chromium.org
4e3bbd8247 If a HeapNumber is the incoming value, it must be converted to Smi before
checking. This is not done in a fast way.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 13:33:13 +00:00
erik.corry@gmail.com
c390485090 Fix place where linter complains about lonely {
Fix place where ARM compiler loses track of whether variables were initialized.
Review URL: http://codereview.chromium.org/9244

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 12:08:01 +00:00
erik.corry@gmail.com
eca89dc765 Create an abstraction for the string type flags so that they can be cached.
Read the objects.h change first to understand what's going on here.
Review URL: http://codereview.chromium.org/9038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 10:16:05 +00:00
olehougaard
bf3efa1c72 Fixing propertyIsEnumerable for properties that are *both* enumerable and read-only.
Review URL: http://codereview.chromium.org/8962

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 11:53:29 +00:00
olehougaard
77a92988d2 Introduce access control in propertyIsEnumerable.
Also, fix JSObject::getPropertyAttribute() so it deals correctly with access control modifiers.
Review URL: http://codereview.chromium.org/8834

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 09:42:14 +00:00