Commit Graph

1041 Commits

Author SHA1 Message Date
deanm@chromium.org
b432613622 Use our own macros for 64-bit constants.
Review URL: http://codereview.chromium.org/109017


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 10:21:28 +00:00
ager@chromium.org
5a4e24fe0f Revert workaround for http://crbug.com/9746.
Review URL: http://codereview.chromium.org/109015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 10:15:05 +00:00
lrn@chromium.org
3fa2a67ffb Changed definition of INT64_C and UINT64_C to use the one in stdint.h.
Since Chromium build system appears to define __STDC_CONSTANT_MACROS, we might as well use the macro definitions from stdint.h in all cases.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 09:50:29 +00:00
sgjesse@chromium.org
3cdb194c56 Add the ability to set embedder data on created contexts from the API.
Expose the active context where a break event occoured through the debug message handler.
Review URL: http://codereview.chromium.org/109013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 09:38:45 +00:00
kmillikin@chromium.org
74472a1bab Some cleanup of the mark-sweep/compact collector following the symbol
table debacle.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 09:26:06 +00:00
ager@chromium.org
4973c84241 Prepare to push version 1.2.2 to trunk.
Review URL: http://codereview.chromium.org/109005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 07:08:56 +00:00
kmillikin@chromium.org
abfee85871 Clean up comment.
TBR=iposva@chromium.org
Review URL: http://codereview.chromium.org/108003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 05:17:39 +00:00
kmillikin@chromium.org
3af69aed22 Improved, safer handling of the symbol table. The symbols themselves
are not treated as roots, but all their subparts are.
Review URL: http://codereview.chromium.org/108002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 05:13:09 +00:00
erik.corry@gmail.com
282bc7a7b4 Reverty 1842 (see http://code.google.com/p/chromium/issues/detail?id=1717 )
Review URL: http://codereview.chromium.org/99346

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 19:35:46 +00:00
deanm@chromium.org
4a4f95bddd Fix a guard style inconsistency in regexp-stack.h.
Two spaces before the endif guard comment.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 19:31:36 +00:00
kmillikin@chromium.org
e01f3a9ee8 More special handling of the symbol table during garbage collection.
Mark all objects reachable from the symbols except the symbols
themselves as live (and reachable from strong roots).  This ensures
that if the symbol itself remains alive for any reason, and if it was
a sliced string or cons string backed by an external string, then the
external string will be strongly reachable and therefore not get a
weak reference callback.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 18:47:50 +00:00
deanm@chromium.org
eb906555fc Cleanup include guards:
- Fix some typos / guards that didn't match the filename.
- Fix some style inconsistencies.
- Add guards to files that were missing them.
- Add the directory name to the guard.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 13:36:43 +00:00
whesse@chromium.org
aa5f53101f Include 64-bit pointer and constant types in include/v8.h.
Make some definitions in globals.h 64-bit safe
Review URL: http://codereview.chromium.org/100336

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 13:29:29 +00:00
lrn@chromium.org
d423dea519 Changed some int casts to intptr_t.
Removed a drop in an ocean of compile errors in x64 mode.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 13:11:38 +00:00
erik.corry@gmail.com
8a15c49974 Fix http://code.google.com/p/chromium/issues/detail?id=1717
undeletable functions on some prototypes.
Review URL: http://codereview.chromium.org/100335

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 12:34:20 +00:00
lrn@chromium.org
32686a11f0 Added empty files in the x64 directory.
Added initially empty files for x64 development.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 07:16:10 +00:00
feng@chromium.org
ecd705813f A simple fix of issue http://code.google.com/p/chromium/issues/detail?id=3285
NPN_Construct allows a NPObject to be called as a construct. For example, the
test case

var s = new app.Packages.java.lang.Integer(5);

app.Packages.java.lang.Integer is a NPObject, and it implements NPN_Construct.

This fix allows a JSObject created by an API function be called as a construct
if it can be called
as a function. This is done by generating the same code for
var s = new app.Packages.java.lang.Integer(5); as
var s = app.Packages.java.lang.Integer(5);

and the caller handles both case correctly. A more sophiscated fix is to one
extra JSConstructCall
frame and allow CallAsConstructor in Builtin::HandleApiCallAsFunction.

This change itself shouldn't affect the semantic of normal case such as:

var a = {};
var s = new a();

A TypeError exception will be thrown in CALL_NON_FUNCTION (runtime.js).

Another part of fix is in the binding code, V8NPObject, which makes
NPN_InvokeDefault or NPN_Construct
call depending on which function is available. 
Review URL: http://codereview.chromium.org/100243

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 19:01:19 +00:00
whesse@chromium.org
1ddaea61be Stop inlining of list reallocation in virtual frames.
Review URL: http://codereview.chromium.org/100253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 14:37:28 +00:00
erik.corry@gmail.com
7fa09c0aca Add change accidentally omitted from last changelist.
Review URL: http://codereview.chromium.org/100252

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 12:20:31 +00:00
erik.corry@gmail.com
ad23017469 When strings can change from an ASCII representation to a
UC16 representation we need to be careful about flat strings.
Flat strings can be sliced or cons strings that have a flat
string under them, so when we ask a flat cons or a slice whether
it is ASCII or not we should ask the underlying string about
its representation.  This should fix
http://code.google.com/p/chromium/issues/detail?id=10971
Review URL: http://codereview.chromium.org/100249

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 11:16:29 +00:00
lrn@chromium.org
83d1d02df7 Made sort on non-arrays also affect elements on the prototype, for JSC compatability.
Made sort on non-objects with inherited elements JSC compatible.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 10:06:55 +00:00
sgjesse@chromium.org
a470847226 Added better version information
The current version is now held in src/version.cc in a number of defines which needs to be modified when changing version.

The following defines make up the version information:

  MAJOR_VERSION
  MINOR_VERSION
  BUILD_NUMBER
  PATCH_LEVEL
  CANDIDATE_VERSION

The first four are numbers and the fifth is a boolean. Besides these five the define

  SONAME

can be used to set a specific soname when building the a shared library (see below). This will most likely be used on stable branches where binary compatibility is ensured between different versions. This define is a string.

This version information is now read by the SCons build to support setting the soname for a Linux shared library. This requires passing the option soname=on to the SCons build.

When soname=on is specified the soname for the shared library can be set in two different ways. Either it will be the full versioned library name (e.g. libv8-1.2.2.so) or a specific soname defined in src/version.cc. Whenever a shared library is build with an soname the filename of the library will hold the full version name (e.g. libv8-1.2.2.so).

I did not update the xcode project with the new files.

BUG=151
Review URL: http://codereview.chromium.org/100104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:29:15 +00:00
whesse@chromium.org
714e525b40 Improve register allocation of left shift operation. Add tests
for all shift operations.
Review URL: http://codereview.chromium.org/101016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:21:50 +00:00
asargent@chromium.org
ec3beee2bf Make Object::GetIdentityHash() never return 0.
This is convenient when using identity hashes in data structures that
want to reserve 0 as a sentinel value, such as WebKit's WTF::HashMap.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 21:44:13 +00:00
lrn@chromium.org
ea56336518 Create build structure for X64.
Possible to attempt to build for X64.
Build will be unsuccessful, since all x64 source files are
missing and pointers are reinterpreted as integers everywhere.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 13:11:48 +00:00
sgjesse@chromium.org
2beedf1181 Create a transition API for the debug message handler.
Kept the previous message handler API to avoid breaking clients depending on it.

The new message handler API uses a new name ending with 2.
Review URL: http://codereview.chromium.org/100158

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 12:54:07 +00:00
erik.corry@gmail.com
9a9e09ee73 Unbreak IA32 generated code coverage.
Review URL: http://codereview.chromium.org/100156

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 11:04:28 +00:00
sgjesse@chromium.org
f8319c3cba Re-submit http://codereview.chromium.org/99122 after fixing compilation issues.
TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/100155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 09:04:20 +00:00
sgjesse@chromium.org
974734bedb Reverting 1811.
Review URL: http://codereview.chromium.org/99175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 08:33:01 +00:00
sgjesse@chromium.org
95288e916e Changed the debugger message API to receive an object instead of a JSON string.
The object delivered to the debug message handler contains additional information on the current break handling the messages.

Clients which require just JSON message parsing can simply get the JSON using the GetJSON message on the message object to still have the previous behaviour.

  NewMessageHangler(const v8::Debug::Message& message) {
    v8::String::Value val(message.GetJSON());
    OldMessageHandler(Vector<uint16_t>(const_cast<uint16_t*>(*val), val.length()));
  }

Refactored some of the debugger code to use internal handles instead of API handles. Also changed Object to JSObject is some places.

The access to the active context when the break occurred is still not implemented. I will add this in a new CL, as this one is quite big already.
Review URL: http://codereview.chromium.org/99122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 08:23:58 +00:00
whesse@chromium.org
bd45424f02 Fix lint error
Review URL: http://codereview.chromium.org/100105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 15:14:44 +00:00
whesse@chromium.org
62c4153442 Change MergeTo code for virtual frames to use register indices.
Review URL: http://codereview.chromium.org/99052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 13:53:15 +00:00
kmillikin@chromium.org
aa04659a82 Add stubbed-out versions of missing member functions on ARM.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 10:53:47 +00:00
kmillikin@chromium.org
d30bc90b9c Inline the inobject property case for named property loads.
Review URL: http://codereview.chromium.org/99120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 10:40:36 +00:00
yurys@chromium.org
c56b22c72a 1. Send 'afterCompile' event to the debug message handler.2. Process messages from the debugger command queue on each event not only break and exception.3. auto_continue is always true for compilation events.
Review URL: http://codereview.chromium.org/100034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 12:38:20 +00:00
lrn@chromium.org
889eac7f13 Fix Issue 326. Handle sorting of non-array objects correctly.
Change handling of sorting to be the same for all JS-arrays.
Collect undefined values as well while removing holes.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 11:16:59 +00:00
erik.corry@gmail.com
b1d09b32f9 Remove dependency on libstdc++ from test framework.
Review URL: http://codereview.chromium.org/99051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 10:52:44 +00:00
erik.corry@gmail.com
22d6cc9d4b Lint.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 09:27:18 +00:00
ager@chromium.org
f6bafbfb09 Prepare push of version 1.2.1 to trunk. The main reason for this push
is to get the chromium V8-latest builder working again and to move the
gyp file used for the chromium build to V8 to make it easier to roll
V8 DEPS.
Review URL: http://codereview.chromium.org/99049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 09:14:19 +00:00
erik.corry@gmail.com
f08b2a8898 Fix bugs 145 and 323, preemption and apply on ARM.
Review URL: http://codereview.chromium.org/93121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 07:03:10 +00:00
christian.plesner.hansen@gmail.com
4a909a7a62 - When cloning maps to set the 'lazy loading' bit remember to clone
the properties as well.  This fixes some failing tests.
- Moved json parsing into native code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:45:29 +00:00
sgjesse@chromium.org
8fefc769f5 Removed the debug message thread.
The debug message thread was introduced to make it possible to have the message handler callback be called from a different thread than the thread running V8 where the debug event occoured, but it never had any practical use, and prevents providing information to the message handler which is only available from the V8 thread.

In the future any thread decoupling will have do be done by the embedder.

This also removes the queue used for outbound messages.

Renamed the class Message to CommandMessage as it is only used for debugger commands from the client. Related message queue classes has also been renamed.
Review URL: http://codereview.chromium.org/93118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:05:40 +00:00
kmillikin@chromium.org
cc0c8d178f Materializing a frame element on the stack by pushing it can cause the
stack pointer to change by more than one in a corner case.  If we push
a constant smi larger than 16 bits, we push it via a temporary
register.  Allocating the temporary can cause a register to be spilled
from the frame somewhere above the stack pointer.

As a fix, do not use pushes to materialize ranges of elements of size
larger than one.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 11:26:49 +00:00
christian.plesner.hansen@gmail.com
1f7e96743d - Extended lazy loading to general objects, not just functions.
- Added lazily loaded JSON object.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 08:13:09 +00:00
lrn@chromium.org
a4d756a1c8 Move backend specific files to separate directories.
Move ia32 and arm specific files to subdirectories to make it easier to add more backends.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 12:06:38 +00:00
erik.corry@gmail.com
e5a1973d3c 2nd try at fixing coverage of inline keyed access on IA32.
Review URL: http://codereview.chromium.org/92067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 07:52:38 +00:00
ager@chromium.org
35e78919eb Prepare to push version 1.2.0 to trunk. Now worker on version 1.2.1.
Review URL: http://codereview.chromium.org/92066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 07:32:25 +00:00
erik.corry@gmail.com
9425b17b8e Remove if inside contradictory if.
Review URL: http://codereview.chromium.org/93059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 05:45:40 +00:00
pfeldman@chromium.org
a3a0d64305 DevTools: Add support for eventless host message dispatching.
Review URL: http://codereview.chromium.org/87026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:16:50 +00:00
sgjesse@chromium.org
60f13875f1 Use CollectAllGarbage for the gc() extension.
Review URL: http://codereview.chromium.org/5666

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:00:12 +00:00