Commit Graph

138 Commits

Author SHA1 Message Date
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
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
feng@chromium.org
de06f3092c Avoid using sprintf_s, which is windows-only.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:42:51 +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
christian.plesner.hansen@gmail.com
37a50a8059 Fixed test failure caused by being more conservative in estimating the
length of expressions containing backreferences.  Bad plesner for
forgetting to run the tests before submitting!


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 11:48:52 +00:00
christian.plesner.hansen@gmail.com
d6e6508bd7 Added clearing of captures before entering the body of a loop. This
also revealed a bug or two that had to be fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 11:32: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
olehougaard
ce673ec9ad Avoiding the assumption that the pc pointer of RelocInfo points to the word containing the target address. It wasn't true for ARM. (One step closer to serialization on ARM).
Review URL: http://codereview.chromium.org/17376

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 14:38:12 +00:00
lrn@chromium.org
0fad625991 Unsigned number can't be negated in the VisualStudio compiler.
Fixed a few earlier review comments that had slipped through.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 09:23:26 +00:00
lrn@chromium.org
21d2865757 Separately growing stack for irregexp ia32 backtrack stack.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-12 13:05:23 +00:00
christian.plesner.hansen@gmail.com
4a16e4928a Added check that bails out of a repetition when the body is empty.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 12:40:47 +00:00
ager@chromium.org
3f383346aa Inline array loads in loops directly in the code instead of always
calling a stub.  The map to check against is unknown when generating
the code, so we patch the map check in the IC initialization code.

Loop nesting is currently not tracked on ARM.  I'll file feature
request bug reports for implementing this on ARM and add the number to
the TODOs before I commit.
Review URL: http://codereview.chromium.org/16409

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-22 12:56:32 +00:00
iposva@chromium.org
358591f9ea Fix issue 142:
- Removed the potential for a NULL pointer access in
  ContextSwitcher::PreemptionReceived.
- Removed a leak of the semaphore in the ContexSwitcher thread, by removing
  the need for this semaphore entirely.
- Added a regression test case which will catch accesses to the ContextSwitcher
  singleton after it has been stopped.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 17:40:02 +00:00
christian.plesner.hansen@gmail.com
5d3cc28967 Fixed bug in interest propagation caused by following the loop edge
out of a loop choice node before the continuation edge.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 13:16:38 +00:00
lrn@chromium.org
00122b76d0 Each RegExtTree node can now report the min and max size of strings it can match.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 10:59:14 +00:00
lrn@chromium.org
028e3414f2 Removed rep-cmps{w,b} from CheckCharacters to improve performance.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-16 14:21:00 +00:00
lrn@chromium.org
5d2fd5cbaa Regexp-IA32 tests doesn't work with snapshots.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 11:40:03 +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
lrn@chromium.org
09e3c76137 Quantified look-aheads are sometimes removed entirely, leaving only a
single atom node. A flag was not set in this case, leading the wrapper
code to think the pattern was equal to the atom and use the pattern
in the indexOf operation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 10:22:56 +00:00
deanm@chromium.org
6297a19160 Improve mark-compact object grouping interface.
The main goal was to improve O(n^2) behavior when there are many object groups.  The old API required the grouping to be done on the v8 side, along with a linear search.  The new interface requires the caller to do the grouping, passing V8 entire groups at a time.  This removes the group id concept on the v8 side.

  - Changed AddObjectToGroup to AddObjectGroup.
  - Removed the group id concept from the V8 side.
  - Remove a static constructor while I'm here, lazily initialize
    the object groups list.
  - Cleaned up return by non-const references to return pointers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:20:04 +00:00
christian.plesner.hansen@gmail.com
ff3e30ae11 - Added lookbehind propagation for the initial node; now, if the
initial node is interested in what precedes it the automaton is
  given an initial all-consuming character class that determines it.
- Added verification of some node information invariants.  We now
  check that if a node expresses interest in what precedes it that
  information is available to it after assertion expansion.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:13:13 +00:00
ager@chromium.org
e8b56e6f95 Make sure that the API does not change templates pass in from the
user.  The API should never change templates behind the back of the
user.
Review URL: http://codereview.chromium.org/13741

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:09:51 +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
olehougaard
90611c0ef7 Removed a few calls to Top::ReportPendingMessages() that caused the messages to be reported prematurely and not at the C++/JS boundary.
Review URL: http://codereview.chromium.org/13287

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 13:18:33 +00:00
sgjesse@chromium.org
bbbab4821c Refactor the convertion of a target address into a code object from the debugger to the Code class.
Review URL: http://codereview.chromium.org/13285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 12:53:59 +00:00
olehougaard
ccf388fc64 Fixing a bug where a try-finally block obscured a try-catch block when registering an external try-catch handler.
Review URL: http://codereview.chromium.org/13658

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 10:16:38 +00:00
lrn@chromium.org
5178af89fa Irregexp is specialized on subject character type.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 12:43:01 +00:00
erik.corry@gmail.com
ba09ec5e89 Irregexp:
* Facility for generating a node several ways.  This allows
  code to be generated for a node knowing where it is trying
  to match relative to the 'current position' and it allows
  code to be generated that knows where to backtrack to.  Both
  allow dramatic reductions in the amount of popping and pushing
  on the stack and the number of indirect jumps.
* Generate special backtracking for greedy quantifiers on
  constant-length atoms.  This allows .* to run in constant
  space relative to input string size.
* When we are checking a long sequence of characters or character
  classes in the input then we do them right to left and only the
  first (rightmost) needs to check for end-of-string.
* Record the pattern in the profile instead of just <CompiledRegExp>
* Nodes no longer contain an on_failure_ node.  This was only used
  for lookaheads and they are now handled with a choice node instead.
Review URL: http://codereview.chromium.org/12900

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 09:22:12 +00:00
olehougaard
89855a08d9 Fixing exception reporting so that a verbose TryCatch handler works again.
Review URL: http://codereview.chromium.org/13173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 13:30:55 +00:00
lrn@chromium.org
ed4e792cd5 Makes irregexp-ia32 feature complete wrt. regexps.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 09:18:55 +00:00
olehougaard
30204a0c00 Added reporting compilation errors.
Review URL: http://codereview.chromium.org/13125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 08:35:52 +00:00
ager@chromium.org
15e98d12e6 Pull out revision 915 and 916 to get a green builder. I believe the
issue has been resolved and these changes can go back in along with
the fix tomorrow.

TBR=olehougaard
Review URL: http://codereview.chromium.org/12945

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 14:35:31 +00:00
olehougaard
cb6a3e2f0a Reporting uncaught errors at the boundary between C++ and JS instead of trying to guess whether they get caught at the time of the throw.
Review URL: http://codereview.chromium.org/12901

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 08:47:31 +00:00
lrn@chromium.org
dd9be4ef58 Matching a back-reference must handle unbound start-register (but can assume that if start register is bound, then end register is bound too).
After matching a back reference, the character position is advanced past
the match


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 13:24:34 +00:00
christian.plesner.hansen@gmail.com
12774ab2d8 Fixed issue where regexps were parsed without having set up a zone
scope, leading to zone exhaustion.  Added assertion that a zone scope
exists on zone allocation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 14:00:24 +00:00
christian.plesner.hansen@gmail.com
917e91d1f2 - Added some expansion of assertions.
- Splitting of character classes into word and non-word parts.
- A bunch of refactorings.
- Made dispatch table construction lazy.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 15:42:35 +00:00
christian.plesner.hansen@gmail.com
5c39d9c741 Added checking in the regular expression parser that we're below the
stack limit and that the zone allocation limit hasn't been met.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 15:32:20 +00:00
lrn@chromium.org
b07b40b335 Allow the non-spec [a-\d] (i.e., ending a range with a character class) in RegExps.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 14:29:28 +00:00
lrn@chromium.org
0269851619 Fixes (last?) bugs in regexp-ia32 core functionality. All tests run!
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 09:57:14 +00:00
ager@chromium.org
2c2ae533ec Remove a couple of instances of wchar_t after counters change.
Review URL: http://codereview.chromium.org/12820

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 07:56:57 +00:00
erik.corry@gmail.com
49d05495d8 * Remove an unused layer of abstraction by not having both a macro assembler and
an assembler when compiling to bytecode.  This fixes
  http://code.google.com/p/v8/issues/detail?id=165
* Preload the 'current character' register when starting a match (byte code only
  at the moment).
Review URL: http://codereview.chromium.org/10995

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 10:37:06 +00:00
erik.corry@gmail.com
4722a886ec Implement $ for non-multiline.
Review URL: http://codereview.chromium.org/10992

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 08:53:53 +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
lrn@chromium.org
1a9e303e89 Made char comparisons work
Tracer for regexp macro-assembler instructions


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 13:54:31 +00:00
christian.plesner.hansen@gmail.com
7bdb653065 Fixed lint error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 11:20:05 +00:00
christian.plesner.hansen@gmail.com
4213b46b1d Fixed some assertion propagation issues and added non-multiline $
propagation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 10:35:06 +00:00
erik.corry@gmail.com
ef59fde8de Fix native code Irregexp on MacOSX.
Review URL: http://codereview.chromium.org/10984

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 09:27:30 +00:00
sgjesse@chromium.org
80c0290714 Added a debugger call to run a JavaScript function in the debugger. When called the debugger will be entered and the JavaScript function will be called with the debugger ExecutionState object as its first parameter.
This makes it possible to get information like current line number, current script resource, backtrace information etc. which is not part of the normal API.
Review URL: http://codereview.chromium.org/12472

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 08:01:27 +00:00