christian.plesner.hansen@gmail.com
6a323d3afe
Const Correctness for String::Value
...
Patch by Patrick Gansterer <paroga@paroga.com>.
Review at http://codereview.chromium.org/199043 .
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 07:54:51 +00:00
christian.plesner.hansen@gmail.com
af6c6a5533
Api inlining. Made some core functionality available in the api and
...
made inline versions of some hot functions. Changed api to use
internal Object pointers rather than void pointers.
Speeds up getElementById by ~7%.
Review URL: http://codereview.chromium.org/173348
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:33:11 +00:00
mike@belshe.com
6f3c50460a
Update the Idle collector to do a full GC
...
after being idle for some time.
Remove the default argument from CollectAllGarbage.
Review URL: http://codereview.chromium.org/174302
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 02:54:39 +00:00
feng@chromium.org
855c654b25
Add LowMemoryNotification to the API on Android platform.
...
Android system provides a unique feature that it sends a notification to the
browser in low memory condition, and the browser cleans up cache and frees
resources. Forcing a GC in low memory condition can free DOM objects and also
can shrink the old spaces.
This patch addresses the last comment in
http://codereview.chromium.org/173016/show
Mads Ager 2009/08/19 17:24:23
I would prefer to not use the flags to signal that a compacting collection is
requested.
TBR = ager
Review URL: http://codereview.chromium.org/173102
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 00:07:19 +00:00
ager@chromium.org
0efbd40baf
Add support for forceful termination of JavaScript execution.
...
The termination is achieved by throwing an exception that is uncatchable by JavaScript exception handlers.
Review URL: http://codereview.chromium.org/174056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 15:14:11 +00:00
christian.plesner.hansen@gmail.com
11e7f2a30b
Added API call to get the stack trace for an exception
...
Added TryCatch::StackTrace that gets the stack trace for the thrown
exception.
Review URL: http://codereview.chromium.org/171042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 13:34:41 +00:00
christian.plesner.hansen@gmail.com
570788b115
Context-independent script compilation.
...
Added Script::New calls that create a new context-independent
(boilerplate) script which can be executed in any context, unlike the
current scripts which bind the context in which they're compiled.
Review URL: http://codereview.chromium.org/172043
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 11:41:00 +00:00
bak@chromium.org
7f18bef0d2
Added idle notification to the API.
...
The implementation is still empty.
Review URL: http://codereview.chromium.org/165445
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 09:35:51 +00:00
christian.plesner.hansen@gmail.com
ba974ace1b
Add api call to determine whether a string can be externalized.
...
Review URL: http://codereview.chromium.org/164393
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 10:27:35 +00:00
vitalyr@chromium.org
d6fcda0044
API: added function to find instance of template in prototype chain.
...
Also inlined Object::IsInstanceOf.
This new function is intended to be used to speed up DOM bindings.
Review URL: http://codereview.chromium.org/165044
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 13:35:21 +00:00
sgjesse@chromium.org
27ffe641d6
On Linus don't force-export V8 symbols unless v8 is built as a shared library.
...
This lands: http://codereview.chromium.org/160556 .
TBR=piman@chromium.org
Review URL: http://codereview.chromium.org/160634
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 07:59:46 +00:00
mikhail.naganov@gmail.com
5470f9b132
Add an ability to initiate GC through V8 API.
...
I'm planning to use it in DevTools heap profiler. It is a common scenario in debugging memory leaks to enforce GC, then perform an operation, then enforce GC again to check for non-collected (that is, leaked) objects. Using the existing GC extension isn't possible because it doesn't exposed in the normal operation mode of Chromium.
Review URL: http://codereview.chromium.org/159787
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 14:14:01 +00:00
mikhail.naganov@gmail.com
e97554ed10
Add generic V8 API functions for controlling profiling aspects.
...
As we'll have several aspects of heap profiling, it is more handy to control them using binary flags than by individual functions. CPU profiling represent just a particular aspect to control, so {Pause,Resume}Profiler and IsProfilerPaused are only left for compatibility.
For now, PROFILER_FLAG_HEAP_STATS and PROFILER_FLAG_JS_CONSTRUCTOR are equivalent, but later will be split.
Review URL: http://codereview.chromium.org/159581
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 11:23:36 +00:00
iposva@chromium.org
1ce28eda0b
- Expose CanvasPixelArray functionality directly in JavaScript
...
indexed property accesses.
- The IC stubs have not been updated to handle these directly, but
at least we do not have to leave the VM to access bytes.
Review URL: http://codereview.chromium.org/159263
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:43:51 +00:00
antonm@chromium.org
9acd081326
Force inlining of some handle methods.
...
Review URL: http://codereview.chromium.org/159236
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 13:36:28 +00:00
antonm@chromium.org
3c6c399381
Introduce faster utilty methods for storing and retrieving native pointers
...
in internal fields.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 10:35:15 +00:00
antonm@chromium.org
0402951844
A helper function to speed up creation of V8 wrappers for DOM Nodes.
...
Review URL: http://codereview.chromium.org/141044
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 11:52:52 +00:00
antonm@chromium.org
d62f77fd21
Lars spotted that Handle::operator -> and * are not inlined. That apparently buys us almost ~10%
...
speedup for some DOM operations.
Review URL: http://codereview.chromium.org/122038
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 19:44:48 +00:00
ager@chromium.org
24d22b567a
Introduce an API to force the deletion of a property ignoring
...
interceptors and dont-delete attributes.
Minor change to the behavior of eval: throw exception when calling
eval in a context for which the global has been detached. This
matches the behavior of both Firefox and Safari post navigation in the
browser.
Review URL: http://codereview.chromium.org/118374
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 09:46:09 +00:00
mikhail.naganov@gmail.com
064af4286e
Expose IsProfilerPaused function on the public interface.
...
This is needed for DevTools Profiler because of its asynchronous and multi-client architecture.
Review URL: http://codereview.chromium.org/115761
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 12:34:47 +00:00
ager@chromium.org
10b8928e0e
Expose the calling context through the API.
...
In C++ callbacks, we can now get the context of the javascript code
that called the callback.
Review URL: http://codereview.chromium.org/113622
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 07:44:59 +00:00
sgjesse@chromium.org
e3464bca9d
Fix compilation on MinGW
...
On MinGW _WIN32_WINNT needs to be 0x501 (Windows XP) instead of 0x500 (Windows 2000) for some TCP/IP API's to be present.
MinGW uses stdint.h whereas Visual C++ does not.
Review URL: http://codereview.chromium.org/113576
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 09:59:41 +00:00
davemoore@chromium.org
9336f58fa2
Make check in GetExternalString a runtime check instead of ASSERT.
...
This will allow us to remove the separate call to IsExternal() from our
chrome client code, speeding up the combination.
Review URL: http://codereview.chromium.org/113035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-06 18:30:37 +00:00
mikhail.naganov@gmail.com
bf63b8f173
Introduce internal Log class that handles writing log messages, enable logging to memory buffer.
...
This will enable reading profiler log in Chrome. The current implementation of memory buffer is trivial (fixed size buffer, no memory recycling) but enough to start end-to-end DevTools Profiler implementation. Later it will be enhanced.
Review URL: http://codereview.chromium.org/108011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 15:57:47 +00:00
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
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
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
asargent@chromium.org
9926c85e1f
Add to documentation for GetIdentityHash
...
Review URL: http://codereview.chromium.org/99250
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 16:39:21 +00:00
christian.plesner.hansen@gmail.com
0d21e7b3b0
review
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:34 +00:00
christian.plesner.hansen@gmail.com
c47a188fae
doc
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:22 +00:00
christian.plesner.hansen@gmail.com
d26e6dd0b4
force-set
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:11 +00:00
sgjesse@chromium.org
b8dc312b25
Make it possible to add a user data object to each script compiled.
...
Review URL: http://codereview.chromium.org/90003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 07:22:06 +00:00
erik.corry@gmail.com
b9c5232c1d
Add os.chdir and os.setenv to d8. Move system() to os.system().
...
Protect os.chdir, os.setenv, os.system against string conversion
failures. Add comment about the issue to include/v8.h.
Review URL: http://codereview.chromium.org/57005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 06:51:25 +00:00
christian.plesner.hansen@gmail.com
9142c42df2
Fixed a bunch of memory leaks in tests, including:
...
- String traversal test data (now in a zone)
- Debug message thread (now joined on exit)
- Threading test threads (now joined on exit)
- Changed message tests framework to cope with valgrind
Also, fixed a bug where we'd try to delete stack-allocated objects
when tearing down v8. Good times.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 00:24:49 +00:00
iposva@chromium.org
7b50c072f9
Add a new C++ pointer wrapping API to External to not dilute the
...
External::Cast.
Review URL: http://codereview.chromium.org/52021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 19:51:10 +00:00
iposva@chromium.org
1db91bee34
- Do not allocate proxy objects if the pointer can be wrapped in a Smi representation.
...
Review URL: http://codereview.chromium.org/42466
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 22:13:50 +00:00
mike@belshe.com
318c9eed21
Add a public API for using an empty sring.
...
v8::String::Empty()
Review URL: http://codereview.chromium.org/42423
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 23:35:09 +00:00
iposva@chromium.org
ea653021fc
- Allow hidden properties to be set on any JSObject through the V8 C++ API.
...
- Use the hidden properties to expose a IdentityHash accessor.
Review URL: http://codereview.chromium.org/50016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 18:50:00 +00:00
mike@belshe.com
c5d777338a
Expose Cloning through API.
...
Review URL: http://codereview.chromium.org/42339
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 19:24:15 +00:00
erik.corry@gmail.com
db13f13806
Don't pollute API-users' namespaces with overly generic "EXPORT" define.
...
Review URL: http://codereview.chromium.org/42334
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:54:33 +00:00
davemoore@chromium.org
46f753a184
- Added ability to call histograms from within v8
...
- Changed the StatsRates to use the new HistogramTimers
Review URL: http://codereview.chromium.org/42020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 16:06:31 +00:00
sgjesse@chromium.org
9d17b0d4c8
Whenever a script object is created it is assigned a unique id. Currently this id is assigned from an 32 bit integer counter.
...
Changed the script break points to be able to handle both break points based on script names and script ids. When break points are set through a script id the position is relative to the script itself. This is different from the script break points set through script names where the line/coulmn offset is taken into account.
This has the side effect that function break points are not converted into script break points for named scripts.
Show the script id in the D8 shell debugger when listing all scripts using the 'scripts' command.
Review URL: http://codereview.chromium.org/40317
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:10:50 +00:00
iposva@chromium.org
be6b490fb0
Remove experimental ExternalSymbolCallback feature. This is not needed
...
since we can now transform String objects to be external when needed.
Review URL: http://codereview.chromium.org/21285
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 16:58:55 +00:00
iposva@chromium.org
1bf2c7405e
Allow the morphing of strings to external strings to avoid having to
...
create copies in the embedding code (aka WebKit V8 bindings) on every
external use.
Review URL: http://codereview.chromium.org/21117
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 23:52:52 +00:00
ager@chromium.org
05a56bf1ea
Add explicit null checks after string conversions in the shells.
...
This fixes issue 224.
Review URL: http://codereview.chromium.org/20081
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 13:53:41 +00:00
mike@belshe.com
75037cbd6e
Enable programmatic access to Profile pause/resume
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 19:47:00 +00:00
iposva@chromium.org
e718576d4f
Split handle scopes into an internal version and a version accessible
...
through the API. This allows us to verify state on entry through the API.
In this change verification in the API entry is checking that the current
thread holds the V8 lock when a HandleScope is instantiated if a v8::Locker
has ever been used by the V8 instance.
Review URL: http://codereview.chromium.org/18707
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 17:22:23 +00:00
christian.plesner.hansen@gmail.com
569fb985ce
Added more constness to the api. There are still some methods back
...
that could be const but aren't, but now at least all the obvious ones
should be.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 11:35:34 +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