Commit Graph

158 Commits

Author SHA1 Message Date
ager@chromium.org
17573d771a Landing for Justin Schuh.
Add 128MB limit for executable pages.

BUG=http://code.google.com/p/v8/issues/detail?id=925
TEST=None.
TBR=jschuh@chromium.org
Review URL: http://codereview.chromium.org/4634003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-10 08:38:42 +00:00
lrn@chromium.org
455cfe5932 Make presubmit lint the "include" dir.
Make include dir content pass lint.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-04 10:27:39 +00:00
lrn@chromium.org
efe74b695d Extract essential type declarations into separate file.
Review URL: http://codereview.chromium.org/4320004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-04 08:52:49 +00:00
serya@chromium.org
fbdcbdf748 Refactoring of v8:Arguments similary we did with v8::AccessorInfo (http://codereview.chromium.org/242050). GC-controlled values moved to a separate array.
Review URL: http://codereview.chromium.org/4117010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-01 10:51:44 +00:00
serya@chromium.org
0ea6c1e09f Optimizing HandleScope. Also fixed HandleScope destruction when API getter throws an exception.
Review URL: http://codereview.chromium.org/3792003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-21 14:21:00 +00:00
vitalyr@chromium.org
2ffa84ad4d Fix typo in the spec reference.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-05 12:01:46 +00:00
vitalyr@chromium.org
91b9a92336 Addressing Mads' comments from http://codereview.chromium.org/3585010/show.
Review URL: http://codereview.chromium.org/3613009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-05 11:51:41 +00:00
yurys@chromium.org
eb24a86e1b StackTrace should provide access to //@ sourceURL=... value
Review URL: http://codereview.chromium.org/3602013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-05 08:53:51 +00:00
vitalyr@chromium.org
b999ae3cbd API: expose RegExp.
Review URL: http://codereview.chromium.org/3585010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-04 15:04:16 +00:00
mikhail.naganov@gmail.com
228d56bd8e Add support for abortion in v8::OutputStream.
It's a good idea to allow receiver to interrupt data transmission.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-14 15:11:24 +00:00
mikhail.naganov@gmail.com
2388079051 Implement heap snapshots serialization into JSON. API is designed
to avoid storing serialized snapshot on VM, instead it is emitted
using output stream interface.

The size of JSON emitted is roughly equal to used heap size
(when stored as an ASCII string).

Now a whole heap snapshot can be serialized and transmitted outside
VM. This makes possible:
  - implementing non-async UI for heap snapshots inspection;
  - storing heap snapshots for further inspection;
  - remote profiling (we can even implement a snapshotting mode
    where a snapshot isn't even stored in VM, only transmitted --
    good for mobile devices);
  - creating tools for outside heap snapshots processing, e.g.
    converting to HPROF.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-14 11:49:06 +00:00
sgjesse@chromium.org
d3e457303e Add API callback for tracking allocated memory
Allows the host application to provide a mechanism for notification and custom logging through a callback (set through the API V8::AddMemoryAllocationCallback and removed through V8::RemoveMemoryAllocationCallback), when V8 allocates ro frees memory. 

This replaces the current histogram data "V8.ExecutableMemoryMax" by allowing usage data to be logged by the application as required rather than always through V8. 

BUG=http://crbug.com/54222
TEST=Set the callback function with the API and cause V8 to allocate memory.

Patch by Paul Mehta <pmehta@chromium.org>

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-03 11:31:58 +00:00
antonm@chromium.org
40788b57c9 Remove unused typedef.
Review URL: http://codereview.chromium.org/3164022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-18 13:29:20 +00:00
antonm@chromium.org
0d8ec2a8d8 Remove temporary support for two indexed property query APIs.
Review URL: http://codereview.chromium.org/3143015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 11:53:52 +00:00
antonm@chromium.org
57769489d5 First phase of migration to new indexed property query callbacks.
Eventually indexed property query callbacks will return attributes
(as an integer) or an empty handle if property is not intercepted.

To gradually migrate to this new API, USE_NEW_QUERY_CALLBACK
macro would control if old or new style API is used.

So the migration plan is:

1) introduce new API which should be explictily enabled;
2) switch to new API defining USE_NEW_QUERY_CALLBACK before
include of <v8.h> (that would require changes to client code as well)
3) remove old API from v8
4) remove #define USE_NEW_QUERY_CALLBACK from clients.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-10 10:05:18 +00:00
antonm@chromium.org
59645c6a19 Add v8::Value::IsRegExp method.
Patch by Vlad Burlik.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-10 09:53:56 +00:00
antonm@chromium.org
793d0a92b9 Add a check that weak object handle is not in NEAR_DEATH state after weak callback invocation.
If object enters NEAR_DEATH state, it must be explicitly cleared and/or disposed, otherwise
it would retain JS object forever.  Note as well that parameter is reset to NULL on first
invocation so weak handle callback would be in hard situation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 13:26:25 +00:00
ager@chromium.org
35a80e1624 Landing for hans@chromium.org.
TYPE_CHECK in v8.h should assign to volatile qualified null-pointer.

Unless the pointer is volatile qualified, Clang will warn that LLVM
removes the assignment during optimization. This is not a problem as
that code should never execute, but the warning is treated as an error
when building Chromium, and thus stops the build.

Code review URL: http://codereview.chromium.org/3005010/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 09:51:33 +00:00
yurys@chromium.org
abaf8347a5 Allow to capture stack trace for uncaught exceptions
Review URL: http://codereview.chromium.org/2961003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 13:17:27 +00:00
ager@chromium.org
a835641dee Landing for victorw@chromium.org.
Fix issues so v8 could be built as a DLL.

-. get rid of all the compiler warning by moving dllexport/dllimport
to the individual members for classes which have inline members.

-. update v8 gyp to build v8.dll for chromium multi-dll version (win
and component==shared_library)

Note: most of the code are contributed by sjesse.

Code review URL: http://codereview.chromium.org/2882009/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 07:39:42 +00:00
sgjesse@chromium.org
685cae6021 API: Resolve linker issues with using V8 as a DLL
This changes the way the constants kJSObjectType, kFirstNonstringType and kProxyType are made available to the inlined part of the V8 API. This change to fixed constants resolves linker this linker error Windows

error LNK2001: unresolved external symbol "public: static int v8::internal::Internals::kJSObjectType" (?kJSObjectType@Internals@internal@v8@@2HA)

when linking against a V8 DLL.

This change also makes it possible to build all the C++ tests with ENABLE_DEBUGGER_SUPPORT not defined. Now C++ tests run ENABLE_DEBUGGER_SUPPORT not defined, and only the JavaScript tests which tests the debugger fails when ENABLE_DEBUGGER_SUPPORT is not defined.
Review URL: http://codereview.chromium.org/2820016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-18 10:52:59 +00:00
antonm@chromium.org
52975ae407 Remove old named property query API.
Review URL: http://codereview.chromium.org/2742007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 17:01:02 +00:00
sgjesse@chromium.org
76e24831a6 API: Added functions to retreive information on indexed properties managed by the embedding layer
BUG=737
TEST=test-api/PixelArrayInfo, test-api/ExternalArrayInfo
Review URL: http://codereview.chromium.org/2818003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:09:27 +00:00
sgjesse@chromium.org
c7ab2b6aa3 Remove the SetExternalStringDiposeCallback API
Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object.
Review URL: http://codereview.chromium.org/2658008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 09:35:47 +00:00
ager@chromium.org
6dc72b690c Add an overloaded PreCompile method that takes a Handle<String>.
Code review URL: http://codereview.chromium.org/2633004/show


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 06:20:49 +00:00
sgjesse@chromium.org
09acdc8446 Add an API to control the disposal of external string resources
A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine.
Review URL: http://codereview.chromium.org/2645004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:49:07 +00:00
antonm@chromium.org
12f6306420 First phase of migration to new named property query callbacks.
Eventually named property query callbacks will return attributes
(as an integer) or an empty handle if property is not intercepted.

To gradually migrate to this new API, USE_NEW_QUERY_CALLBACK
macro would control if old or new style API is used.

So the migration plan is:

1) introduce new API which should be explictily enabled;
2) switch to new API defining USE_NEW_QUERY_CALLBACK before
  include of <v8.h> (that would require changes to client code as well)
3) remove old API from v8
4) remove #define USE_NEW_QUERY_CALLBACK from clients.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:49:44 +00:00
dimich@chromium.org
ed90d5648b Remove unused tpedef.
Review URL: http://codereview.chromium.org/2560002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 07:53:40 +00:00
vitalyr@chromium.org
26be30912d Fix generated code for String.charCodeAt.
Review URL: http://codereview.chromium.org/2468001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 14:08:19 +00:00
ager@chromium.org
a7bba921c4 Update comment in the API to explicitly state that the handle returned
from Context::New is persistent and has to be disposed at some point
in order to allow garbage collecting the context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 11:28:14 +00:00
antonm@chromium.org
897f7dedc1 Allow to define accessors on objects.
Currently one can only define accessors on object templates.  This patch
allows to create accessors on the fly.

These accessors could control access to elements as well.  This element
support is somewhat rudimentary and may require future work (for example,
we probably don't want to convert index into a string.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 12:14:49 +00:00
ager@chromium.org
ab6055d85d Landing patch by tonyg@chromium.org:
Changing ScriptData API to serialize its internal representation to a
const char* array.

This decouples the API from the internal representation and avoids the need for
callers to serialize themselves.

As a side-effect, ScriptData::New() no longer assumes ownership of its input.
This shouldn't matter as typical usage patterns for the old API would have
required a copy prior to calling ScriptData::New().

Review URL: http://codereview.chromium.org/2118010/show


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 06:38:19 +00:00
ager@chromium.org
e2014fb1a3 Export SetResourceConstraints so it can be used with
visibility=hidden.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 06:24:18 +00:00
sgjesse@chromium.org
f5b5edf2a3 Adds C++ API for retrieving a stack trace without running JavaScript
This API is extensible, and parameterized with flags so that callers can specify what subset of information they want to capture for each stack frame. 

Patch by jaimeyap, see http://codereview.chromium.org/1694011 for details.
Review URL: http://codereview.chromium.org/2028001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 07:32:44 +00:00
serya@chromium.org
16d3811d50 Changing string length field type from int to SMI. It will make it be a regular field. Code generated in EmitNamedLoad could be patched for faster access to string.length.
Review URL: http://codereview.chromium.org/1706013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 14:49:50 +00:00
antonm@chromium.org
0676163f52 Fix copy paste: IsUint32() checks if value is unsigned, not signed.
Review URL: http://codereview.chromium.org/1762008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 13:02:23 +00:00
antonm@chromium.org
97f6a6a7f7 Update document to descirbe semantics of hints.
Review URL: http://codereview.chromium.org/1658002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 15:57:27 +00:00
antonm@chromium.org
6e8c85dc84 Expose a hint which communicates that string might be written many times.
Review URL: http://codereview.chromium.org/1609021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 17:00:33 +00:00
antonm@chromium.org
c898c7ae03 Landing http://codereview.chromium.org/1594017 for Ryan.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 18:23:10 +00:00
antonm@chromium.org
d73f9f0f33 Update doc as well.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 18:04:45 +00:00
antonm@chromium.org
e116cce61b Landing http://codereview.chromium.org/1539013 for ry@tinyclouds.org.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 17:58:43 +00:00
vitalyr@chromium.org
6fbad6e230 Simplify passing of AccessorInfo to interceptors:
* Use slots on the native stack when possible instead of Relocatable.
 * Got rid of a gap in AccessorInfo fields.
 * Added test for non-cacheable post-interceptor lookup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 17:08:22 +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
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
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
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
kasperl@chromium.org
95964bd95f Let the callers of V8::ContextDisposedNoticication() know
how many pending context disposals there are.
Review URL: http://codereview.chromium.org/669266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 11:19:20 +00:00
ager@chromium.org
fe3b875577 Add IsExecutionTerminating api method.
IsExecutionTerminating returns true if a termination exception is
currently being propagated.  C++ code should not reenter V8 when
IsExecutionTerminating returns true.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 12:13:04 +00:00
lrn@chromium.org
d51f2c96cb Added implementation if Uint32::Value.
Review URL: http://codereview.chromium.org/661275

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 13:44:20 +00:00
vitalyr@chromium.org
9f681fa9d6 Small API improvements:
* Added Get and Set taking uint32_t for faster and more convenient
   access to elements.

 * Added less verbose casting for handles. Now instead of
       v8::Local<v8::String>::Cast(args[0])
   one can write
       args[0].As<v8::String>().

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 18:47:03 +00:00