ager@chromium.org
645bb1b1ba
Add GetPropertyAttribute method for Object in the API
...
Patch by Peter Varga.
BUG=none
TEST=cctest/test-api/PropertyAttributes
Review URL: http://codereview.chromium.org/7321006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 17:44:57 +00:00
ager@chromium.org
78f173c47b
Introduce a random entropy source which can optionally be provided at initialization.
...
BUG=89462
Review URL: http://codereview.chromium.org/7395012
Patch from Chris Neckar <cdn@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-17 09:16:28 +00:00
vegorov@chromium.org
615add8463
Expose APIs for detecting boxed primitives, native errors and Math.
...
While implementing structured clone I found that I need support
for detecting and creating objects using the builtin Number, String
and Boolean constructors; this CL adds this support. I also need
to be able to detect entities of "native object type (e.g., Error)",
hence the new IsNativeError() calls.
(ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data )
Patch by Luke Zarko.
Review URL: http://codereview.chromium.org/7344013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:00:04 +00:00
mikhail.naganov@gmail.com
5c57d0d643
Remove support for logging into a memory buffer.
...
The only usage of it was in logging tests, I've switched them for
using a file.
I've left out support for "--logfile=*" for now, as Chromium uses it.
Will be removed after the next V8 roll.
R=sgjesse@chromium.org
BUG=859
TEST=mjsunit/log-*
Review URL: http://codereview.chromium.org/7310025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:31:22 +00:00
mikhail.naganov@gmail.com
33177880c8
Remove "modules" and "tags" of the logging CPU profiler.
...
Modules now makes a little sense, as there is only one module.
Tags was a simplistic attempt of supporting nested profiles.
R=sgjesse@chromium.org
BUG=859
Review URL: http://codereview.chromium.org/7276046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 09:35:16 +00:00
mikhail.naganov@gmail.com
f4bf8f8fee
Remove obsolete aggregating and non-working producers heap profilers.
...
2000 LOC are gone!
R=sgjesse@chromium.org
BUG=1481
Review URL: http://codereview.chromium.org/7247018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 11:38:47 +00:00
jkummerow@chromium.org
1e1387f12c
Add possibility to configure 'prototype' property via FunctionTemplate
...
BUG=v8:1479
TEST=test-api/SetPrototypeProperties
Review URL: http://codereview.chromium.org/7229007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 12:39:45 +00:00
mikhail.naganov@gmail.com
bf9b2f8c2c
Heap profiler: add an ability to iterate over snapshot's nodes.
...
This is a preparation for removing aggregated heap snapshots.
W/o this API, counting object instances in a snapshot is very hard.
R=sgjesse@chromium.org
BUG=1481
TEST=cctest/test-heap-profiler/NodesIteration
Review URL: http://codereview.chromium.org/7204040
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-21 08:02:34 +00:00
ager@chromium.org
b7a93d417d
Add GetOwnPropertyNames method for Object in the API
...
Patch by Peter Varga.
BUG=none
TEST=cctest/test-api/PropertyEnumeration
Review URL: http://codereview.chromium.org/7129058
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:33:55 +00:00
mikhail.naganov@gmail.com
508b22c436
"Deiceolate" Thread classes.
...
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.
This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.
As a side effect, we have also fixed the DebuggerAgent test.
Thanks to Vitaly for help in fixing isolates handling!
R=vitalyr@chromium.org
BUG=none
TEST=none
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
mikhail.naganov@gmail.com
47248cc5fe
Revert accidental r8254..r8256
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
e1db94c0cb
trying to fix test
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:36:35 +00:00
danno@chromium.org
4de3bb500c
Implement core support for FixedDoubleArrays.
...
Under a flag without IC or Crankshaft support.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7089002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 10:03:35 +00:00
vitalyr@chromium.org
7ff41d4322
Reduce TLS overhead in v8::TryCatch.
...
R=vegorov@chromium.org
BUG=v8:1426
Review URL: http://codereview.chromium.org/6982059
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 15:01:52 +00:00
mikhail.naganov@gmail.com
3b2470d296
Fix presubmit errors catched by a more recent version of cpplint.py.
...
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].
BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).
AFTER an access control section there should be no blank line.
TBR=ager@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
mikhail.naganov@gmail.com
2373771d2e
Fix presubmit after r8189
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 20:58:25 +00:00
mikhail.naganov@gmail.com
f1309b0417
Compress sources of JS libraries in addition to the snapshot.
...
This saves ~170K on current sources.
R=sgjesse@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7066048
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 20:47:30 +00:00
jkummerow@chromium.org
c0a0c82b70
Per-Isolate cache for polymorphic stubs
...
BUG=1385
TEST=Existing tests still pass; running d8 with --dump-counters shows fewer polymorphic stubs being compiled
Review URL: http://codereview.chromium.org/7094003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 13:15:11 +00:00
rossberg@chromium.org
670f947a5c
Implement set trap for proxies, and revamp class hierarchy in preparation:
...
- Introduce a class JSReceiver, that is a common superclass of JSObject and
JSProxy. Use JSReceiver where appropriate (probably lots of places that we
still have to migrate, but we will find those later with proxy test suite).
- Move appropriate methods to JSReceiver class (SetProperty,
GetPropertyAttribute, Get/SetPrototype, Lookup, and so on).
- Introduce new JSFunctionProxy subclass of JSProxy. Currently only a stub.
- Overhaul enum InstanceType:
* Introduce FIRST/LAST_SPEC_OBJECT_TYPE that ranges over all types that
represent JS objects, and use that consistently to check language types.
* Rename FIRST/LAST_JS_OBJECT_TYPE and FIRST/LAST_FUNCTION_CLASS_TYPE
to FIRST/LAST_[NON]CALLABLE_SPEC_OBJECT_TYPE for clarity.
* Eliminate the overlap over JS_REGEXP_TYPE.
* Also replace FIRST_JS_OBJECT with FIRST_JS_RECEIVER, but only use it where
we exclusively talk about the internal representation type.
* Insert JS_PROXY and JS_FUNCTION_PROXY in the appropriate places.
- Fix all checks concerning classification, especially for functions, to
use the CALLABLE_SPEC_OBJECT range (that includes funciton proxies).
- Handle proxies in SetProperty (that was the easiest part :) ).
- A few simple test cases.
R=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/6992072
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 16:38:40 +00:00
erik.corry@gmail.com
7a1a72c701
Revert 8122 (stub call asserts) while test failures are investigated.
...
Review URL: http://codereview.chromium.org/7050039
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 15:21:25 +00:00
erik.corry@gmail.com
c5fc4b9099
Add asserts and state tracking to ensure that we do not call
...
into C++ without having a valid stack frame that can be
traversed at GC.
Also add asserts to track that we do not try to generate a stub
while we are generating a stub, since the stub creation code is
not GC safe.
Review URL: http://codereview.chromium.org/7084032
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 12:38:45 +00:00
rossberg@chromium.org
abd77ad439
Rename Proxy class to Foreign, to avoid confusion with Harmony proxies.
...
Also fix grokdump, which was off by one after intro of JSProxy type.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 11:47:34 +00:00
dslomov@chromium.org
c5c57d722a
Put 7942 "Per-isolate embedder-specific data" back
...
TBR=
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 23:26:38 +00:00
dslomov@chromium.org
3d5d169275
Revert "Per-isolate embedder-specific data"
...
This reverts commit 42f5dc01fb9adbf55242da9f6515e9a37132217b.
Checking if this helps webkit-tests
TBR=dslomov@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 22:35:41 +00:00
dslomov@chromium.org
469c55f058
Per-isolate embedder-specific data
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6975020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 16:20:45 +00:00
vegorov@chromium.org
925107046e
Extend Handle API with MarkIndependent.
...
Garbage collector is free to ignore object groups for independent handles and can collect then in minor collections.
Review URL: http://codereview.chromium.org/7031005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 12:18:19 +00:00
mikhail.naganov@gmail.com
c5ff1f2155
Fix typos in include/*.h inline documentation.
...
Patch by Nicolas Kaiser <nikai@nikai.net>
R=sgjesse@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7030008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 06:36:43 +00:00
rossberg@chromium.org
e14402b1df
A first skeleton for introducing Harmony proxies.
...
1) Add new type JSProxy for representing proxy objects.
Currently devoid of functionality, i.e., all properties are undefined.
2) Some rudimentary global $Proxy functions to create proxies.
Next step: Hook up getProperty and getOwnProperty handlers. Will probably
require introducing a new LookupResult type, which is a mixture of
INTERCEPTOR (handles any property) and CALLBACK (calls back to JS).
Can we unify this somehow?
TODO: Should probably rename existing Proxy type to something like
"Foreign", to avoid confusion.
Review URL: http://codereview.chromium.org/6932068
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 10:58:25 +00:00
ager@chromium.org
8033be880e
Add IsCallable method for Object in the API
...
Patch by Peter Varga.
BUG=none
TEST=cctest/test-api/CallableObject
Review URL: http://codereview.chromium.org/6964005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 15:24:48 +00:00
lrn@chromium.org
1a169aa3f0
Strict mode detection in preparser.
...
Handle octal escapes in everything but RegExps.
Extend preparser test suite to test whether the preparser reports
exceptions to throw.
TEST=preparser/*
Review URL: http://codereview.chromium.org/6927075
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 11:41:15 +00:00
ager@chromium.org
cf19179266
Implement CallAsConstructor method for Object in the API
...
Patch by Peter Varga.
BUG=v8:1348
TEST=cctest/test-api/ConstructorForObject
Review URL: http://codereview.chromium.org/6902108
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 11:07:52 +00:00
dslomov@chromium.org
2500f14868
This implements per-isolate locking and unlocking, including tests
...
BUG=
TEST=
Committed: http://code.google.com/p/v8/source/detail?r=7734
Committed: http://code.google.com/p/v8/source/detail?r=7784
Review URL: http://codereview.chromium.org/6788023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 18:55:31 +00:00
dslomov@chromium.org
6e4629a81c
Revert "This implements per-isolate locking and unlocking, including tests"
...
This reverts commit 1aa40d0c278e195e9e69dcf8b29a212aa1817c0b.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 22:35:42 +00:00
dslomov@chromium.org
d54fe47fad
This implements per-isolate locking and unlocking, including tests
...
BUG=
TEST=
Committed: http://code.google.com/p/v8/source/detail?r=7734
Review URL: http://codereview.chromium.org/6788023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 21:04:32 +00:00
ager@chromium.org
82a04c7fdc
Add CallAsFunction method to the Object class in the API
...
Patch by Peter Varga.
BUG=v8:1336
TEST=cctest/test-api/CallAsFunction
Review URL: http://codereview.chromium.org/6883045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 13:03:08 +00:00
ager@chromium.org
24f19608d4
Actually revert "Add Call method to the Object class in the API"
...
Tests are failing in debug mode.
This also reapplies the change "Make Date and RegExp inherit from
Object in the API" that I accidentally reverted.
R=sgjesse@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6927009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:07:09 +00:00
ager@chromium.org
26c775da94
Revert "Make Date and RegExp inherit from Object in the API."
...
Tests are failing in debug mode.
R=sgjesse@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6930004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:51:07 +00:00
ager@chromium.org
b8cdecb517
Add Call method to the Object class in the API
...
Patch by Peter Varga.
BUG=v8:1336
TEST=cctest/test-api/CallAsFunction
Review URL: http://codereview.chromium.org/6883045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:03:49 +00:00
ager@chromium.org
87f225936f
Make Date and RegExp inherit from Object in the API.
...
They are objects and the API inheritance hierarchy should reflect that.
R=sgjesse@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6929008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 07:28:27 +00:00
ager@chromium.org
8aeaa5e90a
Implement API to disallow code generation from strings for a context.
...
R=sgjesse@chromium.org
BUG=v8:1258
TEST=test-api/AllowCodeGenFromStrings
Review URL: http://codereview.chromium.org/6905167
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 05:40:47 +00:00
dslomov@chromium.org
7088aea3eb
Revert "This implements per-isolate locking and unlocking, including tests"
...
This reverts commit 76c78febb70e75b18214f5fe45de95c7fb515386.
This change has broken test-thread-termination/TerminateMultipleV8Threads
TBR=vitalyr
Review URL: http://codereview.chromium.org/6903154
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 22:16:45 +00:00
dslomov@chromium.org
f4c120d615
This implements per-isolate locking and unlocking, including tests
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6788023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 21:26:03 +00:00
mikhail.naganov@gmail.com
ec58c05f4e
Add support for startup data (snapshot) compression.
...
This is for mobile platforms where application footprint size is
important. To avoid including compression libraries into V8, we assume
that the host machine have them (true for Linux), and rely on embedder
to provide decompressed data.
Currently, only snapshot data can be comressed. It is also possible to
compress libraries sources, but it is more involved and will be
addressed in another CL.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6901090
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:08:33 +00:00
karlklose@chromium.org
32732fbc86
Expose hasOwnProperty() through API.
...
BUG=http://code.google.com/p/v8/issues/detail?id=1342
TEST=test-api/HasOwnProperty
Review URL: http://codereview.chromium.org/6903059
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 09:27:40 +00:00
jkummerow@chromium.org
bc8f6943bb
Support Float64Arrays
...
BUG=None
TEST=mjsunit/external-arrays.js; updated cctest; existing unit tests
Review URL: http://codereview.chromium.org/6879009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-21 07:15:43 +00:00
mikhail.naganov@gmail.com
690093effe
Mark single-argument inline constructors as 'explicit'.
...
There is currently a bug in cpplint.py hiding this problem.
R=sgjesse@chromium.org
BUG=1304
TEST=none
Review URL: http://codereview.chromium.org/6820028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 11:38:34 +00:00
lrn@chromium.org
c7c57227dd
Make preparser api be exported in shared libraries.
...
Adds missing V8EXPORT declarations to types in v8-preparser.h.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6812012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 08:41:37 +00:00
antonm@chromium.org
56b53dd5dc
Introduce v8::Object::CreationContext method.
...
That allows to find out a global context in which the object
was created.
Review URL: http://codereview.chromium.org/6759054
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 12:17:20 +00:00
lrn@chromium.org
4e502c5e5a
PreParser build fix
...
Patch from Peter Varga <pvarga@inf.u-szeged.hu>.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6773009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 10:13:11 +00:00
mikhail.naganov@gmail.com
2d95ed4b25
Remove snapshots-related code that is implemented in DevTools heap profiler.
...
Diffs and retaining paths are implemented on JS side. There is no need
to maintain native implementation.
R=vitalyr@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6770009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 12:52:07 +00:00