Commit Graph

781 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
d1cfe6c8dd Remove obsolete global V8::has_been_fooed flags.
R=yangguo@chromium.org
BUG=v8:2744
TEST=cctest/test-api/InitializeAndDispose

Review URL: https://codereview.chromium.org/23453030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 18:53:39 +00:00
dcarney@chromium.org
04c1b38d84 load ics for js api accessors
TBR=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23984002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 11:18:52 +00:00
dcarney@chromium.org
215ae8aa6d revert 16543 for breaking windows build
load ics for js api accessors

TBR=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23819021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 10:21:29 +00:00
dcarney@chromium.org
11af95d749 load ics for js api accessors
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23699002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 08:34:17 +00:00
dcarney@chromium.org
3e76d8b870 remove Isolate::Current from most files starting with 'o' through 'r'
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23757017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-04 07:05:11 +00:00
verwaest@chromium.org
c41cb4be44 Fix interceptor handling in crankshaft.
R=dcarney@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23614011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-03 08:55:52 +00:00
svenpanne@chromium.org
625874a48c Deprecate Persistent functions which were marked to be deprecated.
BUG=
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/23707009

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-03 07:34:34 +00:00
bmeurer@chromium.org
fead0d0600 Cleanup Semaphore class.
Drop the previous Semaphore class from platform files.

Add new Semaphore class using the new TimeDelta class for
the WaitFor() operation. Consistently assert correct behaviour
for the different implementations.

Improve test coverage of the Semaphore class.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23748003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-02 12:26:06 +00:00
verwaest@chromium.org
335b9a7d0d Representation of interceptor / handler properties are tagged.
Otherwise store ICs will never be initialized, due to lookup->CanHoldValue(value);

BUG=chromium:256330
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23533012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-02 12:16:02 +00:00
yurys@chromium.org
1379f4efeb Add scriptId to StackTrace frames.
BUG=v8:2865
R=verwaest@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/23536007

Patch from Vsevolod Vlasov <vsevik@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-30 14:54:59 +00:00
bmeurer@chromium.org
50f3a993e7 Fix compilation with recent MinGW64 versions.
Don't check for WIN32 define. Use V8_OS_* macros whenever
possible, and if not use _WIN32.

BUG=v8:2300
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/23687003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 08:35:04 +00:00
haitao.feng@intel.com
b2ca7e0b0a Introduce SmiValuesAre31Bits and SmiValuesAre32Bits global predicate functions
R=danno@chromium.org

Review URL: https://codereview.chromium.org/22350005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-27 14:13:40 +00:00
dcarney@chromium.org
166b6d0747 remove old style callbacks
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23513004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-27 11:47:52 +00:00
mstarzinger@chromium.org
fc68cb74e5 Add RemovePrototype to FunctionTemplate
This allows functions created from a FunctionTemplate to not have a
prototype property, which is required by DOM methods.

R=mstarzinger@chromium.org
BUG=chromium:272440

Review URL: https://codereview.chromium.org/22990003

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-26 17:40:03 +00:00
dcarney@chromium.org
ad9cc8e716 js accessor creation on Template
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/22903012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-26 11:59:14 +00:00
mstarzinger@chromium.org
a810495965 Remove hacks for GC stress builders from cctests.
R=machenbach@chromium.org
BUG=cctest

Review URL: https://codereview.chromium.org/22861037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-23 11:10:03 +00:00
mstarzinger@chromium.org
798809ce73 Adding missing operator!= for Handle and Persistent.
BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/22932004

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-21 10:49:29 +00:00
dslomov@chromium.org
02fdc4114f Promote ArrayBuffer, DataView and typed arrays to non-experimental.
The primary reason for this change is to bake these guys into the
snapshot.

Flag definitions (--harmony-typed-arrays, --harmony-array-buffer) are
still there so that Blink does not complain, but they are noop and
default to true.

R=mstarzinger@chromium.org
BUG=270527

Committed: https://code.google.com/p/v8/source/detail?r=16137

Committed: https://code.google.com/p/v8/source/detail?r=16228

Review URL: https://codereview.chromium.org/22390008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-20 13:55:52 +00:00
yangguo@chromium.org
479935bc62 Remove access-check-failed callback after test.
BUG=v8:2848
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/22802013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-20 10:46:02 +00:00
dslomov@chromium.org
80ec7fab15 Revert "Promote ArrayBuffer, DataView and typed arrays to non-experimental."
This reverts commit r16137 for breaking Windows build.
TBR=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/22985011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-20 01:37:09 +00:00
dslomov@chromium.org
62505a3901 Promote ArrayBuffer, DataView and typed arrays to non-experimental.
The primary reason for this change is to bake these guys into the
snapshot.

Flag definitions (--harmony-typed-arrays, --harmony-array-buffer) are
still there so that Blink does not complain, but they are noop and
default to true.

R=mstarzinger@chromium.org
BUG=270527

Committed: https://code.google.com/p/v8/source/detail?r=16137

Review URL: https://codereview.chromium.org/22390008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-20 00:48:25 +00:00
dslomov@chromium.org
d63e29ba78 Revert "Promote ArrayBuffer, DataView and typed arrays to non-experimental."
This reverts commit r16137 for breaking tests on Windows.

TBR=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/22710007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-09 16:23:00 +00:00
dslomov@chromium.org
30375b0937 Promote ArrayBuffer, DataView and typed arrays to non-experimental.
The primary reason for this change is to bake these guys into the
snapshot.

Flag definitions (--harmony-typed-arrays, --harmony-array-buffer) are
still there so that Blink does not complain, but they are noop and
default to true.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/22390008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-09 15:57:31 +00:00
yangguo@chromium.org
5818d831c5 Make JSON::Parse return Local<Value>
It should be able to return Smi, etc. Not only JSObject.

BUG=v8:2821
TEST=cctest/test-api/JSONParseNumber
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/22416003

Patch from Takeshi Yoshino <tyoshino@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 09:11:39 +00:00
yangguo@chromium.org
8fb95efdda Improve internal stringifcation for custom Error objects.
If an developer attempts to "subclass" Error by running
`MyError.prototype = new Error();`, then the internal v8::Message object
that's produced and handed off to `window.onerror` handlers is poorly
stringified as "[object Object]".

This patch adjusts the stringification process for these objects to
include not only native Error objects, but also objects that have Error
in their prototype chain, and haven't overwritten Error.toString with
some custom variant.

BUG=2822
R=mstarzinger@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/21761002

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 13:58:21 +00:00
jochen@chromium.org
cb68e2cd9b Expose JSON parser through V8 API
BUG=v8:2821
TEST=cctest/test-api/JSONParse
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/21959003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 11:14:46 +00:00
mstarzinger@chromium.org
96fc677d25 Pipe a script's CORS status through V8 during compilation.
In order to properly sanitize exception data during a 'window.onerror'
handler, we need to know whether a script was served with proper CORS
headers at the time it was loaded into V8. This patch adds a single bool
to ScriptOrigin, and pipes that through the compiler to land on the
Script object. We can then retrieve the parameter when calling the
embedder's exception callback.

BUG=crbug.com/159566
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/20646006

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 17:05:50 +00:00
svenpanne@chromium.org
31e56df122 Prepare some ValueOf renamings.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/20992005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 07:05:15 +00:00
svenpanne@chromium.org
2fe3799b8f Added unit tests for the slightly confusing Boolean/BooleanObject API.
Just for documenting the status quo. As discussed offline, we should
probably rename/deprecate a few things:

  NumberObject::NumberValue() => NumberObject::ValueOf()
  BooleanObject::BooleanValue() => BooleanObject::ValueOf()
  StringObject::StringValue => StringObject::ValueOf()

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/21013003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 12:37:55 +00:00
yangguo@chromium.org
b62a6d0e2e Do not allow external strings in old pointer space.
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/20723002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-26 12:32:06 +00:00
mstarzinger@chromium.org
ce1553ffdc Regression test for existing bug in String::MakeExternal.
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/20713002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-26 11:37:54 +00:00
yurys@chromium.org
97f8f91bb5 Fix call stack sampling for the case when native callback invokes JS function
The SafeStackFrameIterator used by CPU profiler checked if Isolate::c_entry_fp is null and if it is not it would think that the control flow currently is in some native code. This assumption is wrong because the native code could have called a JS function but JSEntryStub would not reset c_entry_fp to NULL in that case. This CL adds a check in SafeStackFrameIterator::IsValidTop for the case when there is a JAVA_SCRIPT frame on top of EXIT frame.

Also this CL changes ExternalCallbackScope behavior to provide access to the whole stack of the scope objects instead of only top one. This allowed to provide exact callback names for those EXIT frames where external callbacks are called. Without this change it was possible only for the top most native call.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/19775017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 15:01:38 +00:00
mstarzinger@chromium.org
0599225187 Use internal array as API function cache.
R=yangguo@chromium.org
BUG=chromium:260106
TEST=cctest/test-api/Regress260106

Review URL: https://codereview.chromium.org/19159003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 11:41:41 +00:00
yangguo@chromium.org
bd04a838a7 Check for scheduled exceptions after a failed-access-check callback.
R=verwaest@chromium.org
BUG=v8:2524

Review URL: https://codereview.chromium.org/18298012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 11:42:07 +00:00
yangguo@chromium.org
c28cefce91 Test case for missing access checks in object observe.
BUG=v8:2778
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/18794003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 10:11:18 +00:00
yangguo@chromium.org
e002207321 Fall back to generic on access checks in JSON.stringify.
BUG=259366
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/18225006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 10:04:35 +00:00
adamk@chromium.org
25ca62b6ad HasRealIndexedProperty doesn't work on JSGlobalProxy
HasRealIndexedProperty didn't unwrap the JSGlobalProxy and therefore always
returned false.

BUG=257748
R=adamk@chromium.org, rossberg@chromium.org

Review URL: https://codereview.chromium.org/18402007

Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 19:03:58 +00:00
loislo@chromium.org
5571dc4273 CPUProfiler: Improve line numbers support in profiler.
1) report line number even if a script has no resource_name (evals);
  a) do that for already compiled functions in log.cc;
  b) do that for fresh evals in compiler.cc;

2) Implement the test for LineNumbers and make it fast and stable, otherwise we have to wait for tick samples;
  a) move processor_->Join() call into new Processor::StopSynchronously method;
  b) Process all the CodeEvents even if we are stopping Processor thread;
  c) make getters for generator and processor;

3) Fix the test for Jit that didn't expect line numbers;

4) Minor refactoring:
  a) in ProcessTicks;
  b) rename enqueue_order_ to last_code_event_id_ for better readability;
  c) rename dequeue_order_ to last_processed_code_event_id_ and make it a member for better readability;

BUG=
TEST=test-profile-generator/LineNumber
R=jkummerow@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/18058008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-07 11:42:30 +00:00
dslomov@chromium.org
7e0ee5301e Add internal fields to JSArrayBufferViews (JSTypedArray and JSDataView)
In Blink, JSTypedArray and JSDataView objects act as "wrappers" for C++
objects. Wrapping protocol in Blink requires all wrapper JavaScript objects
to have a certain amount of internal fields that Blink uses for
book-keeping (essentially a pointer to C++ object and some type
information). This change adds those internal fields to JSTypedArray and
JSDataView, in a similiar way to how it is done for JSArrayBuffer.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/18695004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:12:36 +00:00
yangguo@chromium.org
02674ee414 Keep two empty lines between declarations for cpp files
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/18509003

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:52:11 +00:00
palfia@homejinni.com
d22f62e718 Set 5M memory for OutOfMemory and OutOfMemoryNested test cases.
BUG=
TEST=cctest/test-api/OutOfMemory
     cctest/test-api/OutOfMemoryNested

Review URL: https://codereview.chromium.org/18688002
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 18:45:03 +00:00
yurys@chromium.org
678c9dc940 Remove #include "cpu-profiler-inl.h" from v8.h
This significantly reduces amount of files to be recompiled after changes in cpu-profiler.h and its dependencies.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/18522004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:39:18 +00:00
yangguo@chromium.org
1963ec4b8a Add 4K more memory for HugeConsStringOutOfMemory test case
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/18068007

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 14:56:18 +00:00
yangguo@chromium.org
cc2f01d31f Restore message when rethrowing in TryCatch.
Based on a patch contributed by Andrew Paprocki <andrew@ishiboo.com>.

R=jkummerow@chromium.org
BUG=
TEST=cctest/test-api/TryCatchNestedSyntax

Review URL: https://codereview.chromium.org/17694002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 10:54:39 +00:00
danno@chromium.org
1642f32d1c Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

Committed: http://code.google.com/p/v8/source/detail?r=15361

Review URL: https://codereview.chromium.org/16578008

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:40:41 +00:00
ulan@chromium.org
475131b2b9 Revert r15361 "Improved function entry hook coverage" because of ARM build error.
R=siggi@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/18062006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:31:06 +00:00
danno@chromium.org
8494f3bf25 Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

Review URL: https://codereview.chromium.org/16578008

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:39:37 +00:00
svenpanne@chromium.org
a92d237948 Allow users of the V8 API to distinguish between unset and undefined HiddenValues
BUG=v8:2746
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17781002

Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 08:00:05 +00:00
mstarzinger@chromium.org
6d92511162 Reland "Remove IsInitialized checks from inlined API functions."
The initialization sequence in Blink has been adapted to use explicit
isolate initialization instead of through calling v8::Null() as the
first API call.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17642011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 08:11:50 +00:00
dslomov@chromium.org
4308fb462d API for DataView.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17155014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:23:50 +00:00
mstarzinger@chromium.org
48c16454b1 Revert "Remove IsInitialized checks from inlined API functions."
This reverts r15277 due to failures in layout tests. Apparently Blink
still initializes the Isolate by calling v8::Null() as the first API
function on some paths.

TBR=svenpanne@chromium.org
TEST=webkit:crypto/worker-random-values-concurrent.html

Review URL: https://codereview.chromium.org/17577008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:10:40 +00:00
mstarzinger@chromium.org
9ef18efff6 Remove IsInitialized checks from inlined API functions.
R=marja@chromium.org, svenpanne@chromium.org
TEST=cctest/test-api

Review URL: https://codereview.chromium.org/17068006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:58:01 +00:00
dslomov@chromium.org
91eb5f8d25 DataView implementation.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/17153011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 13:02:38 +00:00
yurys@chromium.org
7f1750580c V8 API: Add a missing NULL check into Isolate::GetCurrentContext().
There is a missing NULL check for: "internal_isolate->context() != NULL".
Right now before calling this method one should call v8::Context::InContext()
first to perform this check, otherwise we may crash. But this static method
will do this check on the current isolate, which may not be the same as a given one.

BUG=249655
R=yurys@chromium.org,mvstanton@chromium.org

Review URL: https://codereview.chromium.org/16943006

Patch from Andrey Adaykin <aandrey@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:34:47 +00:00
yurys@chromium.org
6f09cb471b Delete deprecated methods from v8-profiler.h
All these methods were already marked as V8_DEPRECATED in V8 Version 3.18.0 (see https://code.google.com/p/v8/source/browse/trunk/include/v8-profiler.h?r=14304) so it is time to delete them.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17524007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 07:56:22 +00:00
yurys@chromium.org
c7b3ef0e05 Make sure ExternalCallbackScope is always created when VM state changes to EXTERNAL
ExternalCallbackScope is used to let CPU profiler know which API callback is being executed. Whenever such callback is called we should create VMState<ETERNAL> and ExternalCallbackScope. This patch fixes several places where VMState<ETERNAL> went without ExternalCallbackScope.

BUG=244580
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17059005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:47:35 +00:00
hpayer@chromium.org
77f5c6c122 Don't let the GC clear the cache between cache invocations to pass test.
BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/17218005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 11:23:34 +00:00
dcarney@chromium.org
640353d088 remove all old style callbacks - patch 1 of many
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/17064004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:12:59 +00:00
dcarney@chromium.org
89fb509c77 remove all old style callbacks - patch 2
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/17071004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:07:45 +00:00
yurys@chromium.org
2ab2e4843e Introduce THREADED_PROFILED_TEST macro
A bunch of tests in test-api.cc need to be executed two times: with CPU profiler on and off to check different code paths. There are only two such tests at the moment but I'm going to add more and having this logic duplicated in all these tests look awkward. The tests are executed as part of Threading* tests and there is no much sense in running CPU profiler in that case. This change addresses both problems by introducing THREADED_PROFILED_TEST macro which mosly resembles THREADED_TEST except that when such test is executed as a standalone test (not part of a test-api/Threading*) it will first run the test normally and the start CPU profiler and run the test again.

BUG=244580
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17072002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:46:56 +00:00
dcarney@chromium.org
b0860dd2b0 arm build fix for 15142
TBR=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/17030007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 10:49:57 +00:00
dcarney@chromium.org
022ee63f5c build fix for 15142
TBR=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16942004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 10:34:12 +00:00
yurys@chromium.org
c4224f09a2 Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case. Indirect call happens only if CpuProfiler::is_profiling() is true.

This is exactly same change as r15116 with a build fix for test-api.cc

BUG=244580
TBR=danno@chromium.org

Review URL: https://codereview.chromium.org/16858013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 19:16:35 +00:00
yurys@chromium.org
24ec017182 Revert "Notify CPU profiler when calling native getters"
This reverts commit f323d984a73bab345c4eab5c1907552ccfa7ccaa.

Broke compilation on the bots with an error that doesn't occur locally:

  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-bignum-dtoa.o
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = int]’:
../test/cctest/test-api.cc:1129: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = unsigned int]’:
../test/cctest/test-api.cc:1136: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = double]’:
../test/cctest/test-api.cc:1143: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = bool]’:
../test/cctest/test-api.cc:1150: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = void]’:
../test/cctest/test-api.cc:1157: error: insufficient contextual information to determine type
  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-circular-queue.o

BUG=None
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16838013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 14:05:19 +00:00
yurys@chromium.org
1a3c3cee9d Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case.

BUG=244580
R=dcarney@chromium.org, loislo@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16286016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 13:46:33 +00:00
dcarney@chromium.org
608a6b8965 another attempt at fixing 15107
TBR=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16854009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 10:39:44 +00:00
dcarney@chromium.org
67c9cd8274 build fix for 15107
TBR=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16944003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 10:13:09 +00:00
dcarney@chromium.org
8b2c26d736 remove most uses of raw handle constructors
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15817014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 09:27:09 +00:00
dcarney@chromium.org
9103afa291 Deprecate the version of MakeWeak which takes an Isolate.
BUG=NONE
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16528009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 07:23:23 +00:00
dslomov@chromium.org
9278a4b7b1 Change ArrayBuffer API and implementation to use embedder-provided allocator.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/15855012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 10:41:14 +00:00
dcarney@chromium.org
c90e697a30 make empty string returnable by ReturnValue
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16621004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 07:42:12 +00:00
dcarney@chromium.org
a9ce5bb5ea add a default value for return value
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16642003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 07:41:16 +00:00
dcarney@chromium.org
8c892ea2a8 do aligned reads in ContainsOnlyOneByte
R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16147004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 07:34:58 +00:00
dslomov@chromium.org
cbb11dbe6c Neutering API for v8::ArrayBuffer
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16562005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 15:02:20 +00:00
dcarney@chromium.org
72098711b7 Add Value::Cast.
It's needed for upcasting Persistent<Object> to Persistent<Value> after
handlepocalypse (with Persistent::As or Persistent::Cast).

BUG=
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16206014

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 08:46:39 +00:00
dcarney@chromium.org
94d6a13682 build fix for build fix for 14990
BUG=
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16409011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 08:15:00 +00:00
dcarney@chromium.org
3c8a79caba ReturnValue::Set(uint32_t) is wrong
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16365008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 07:34:25 +00:00
dcarney@chromium.org
6f5d899248 add function to test whether string contents are definitely one byte
R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16530003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 13:16:52 +00:00
dcarney@chromium.org
c6519a142f update test to test new style property handlers
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15769014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 12:23:37 +00:00
danno@chromium.org
f6caad4b6b Fix EntryHookStub on ia32 and x64.
These stubs were computing the return address location incorrectly.
Add testing for same.

R=danno@chromium.org

Review URL: https://codereview.chromium.org/15769017

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 21:02:29 +00:00
dcarney@chromium.org
2380eff265 Remove V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS.
Blink has migrated to use the new style visitors.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16360005

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 13:36:18 +00:00
mstarzinger@chromium.org
f8db2414f2 Deprecate FACTORY helper macro.
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16337005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 10:30:05 +00:00
dcarney@chromium.org
7d55c16389 remove V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT and V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15979014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 10:02:02 +00:00
dcarney@chromium.org
0fbfdf1699 ReturnValue::Set needs to check for empty handles
R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16073010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-31 11:06:50 +00:00
yurys@chromium.org
09959efe41 Add support for //# sourceURL similar to deprecated //@ sourceURL one.
BUG=v8:2702
R=yangguo@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/15859010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 12:40:21 +00:00
dcarney@chromium.org
ccae2a75ca remove remaining V8_ALLOW_ACCESS_TO* defines from test classes
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16032010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 11:04:10 +00:00
dcarney@chromium.org
f16ebc61c9 Delete old GC related APIs.
Blink doesn't use them any more, and they have no other known users either.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16124004

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:52:01 +00:00
dcarney@chromium.org
515aec2014 Transforming PersistentHandleVisitor to not need to copy Persistent handles.
This gets rid of more places where Persistent handles are copied
(see crbug.com/236290 ).

Transition plan: after this CL, Blink will be modified to work both with and
without the #define, then the #define will be removed from V8.

The corresponding Blink side changes are in https://codereview.chromium.org/15670010/ .

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/15974006

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:48:37 +00:00
dcarney@chromium.org
f8039eff6c fix return out of handlescope in NestedLockers
R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16076004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:33:46 +00:00
dcarney@chromium.org
eecc9ff8f1 remove use of context scope with persistent argument
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15837007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 10:36:21 +00:00
dcarney@chromium.org
f69727d849 Add template parameter to ReturnValue::Set.
E.g., v8-i18n wants to set the return value with a different type of a Persistent.

BUG=NONE
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16102002

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 14:34:16 +00:00
dcarney@chromium.org
81e5778718 make isolate accessible from returnvalue
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16021010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 11:50:08 +00:00
svenpanne@chromium.org
dc9e80beec fix thread safety issue in FunctionTemplate test
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15791005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 09:32:10 +00:00
dcarney@chromium.org
91efd1e7d7 callback handler map not correctly populated by direct use of SetCallHandler
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15814005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 07:59:33 +00:00
dslomov@chromium.org
28729d24a4 Fix Windows build after r14770
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/15848003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 10:29:28 +00:00
dslomov@chromium.org
fc73052dc2 Externalization API for ArrayBuffer
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/15001041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 10:01:42 +00:00
dcarney@chromium.org
1045d62733 implement fast ReturnValue setters
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15398008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 06:35:38 +00:00
dcarney@chromium.org
881476a7af new style of property/function callbacks
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12494012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 06:36:24 +00:00
svenpanne@chromium.org
b1bd641078 Various minor cctest fixes to make ASAN a bit happier.
* Running with ASAN needs more stack, so don't set resource constraints too
     tight.

   * Checking boot time memory usage doesn't make sense when running with ASAN,
     it eats tons of memory for itself.

   * Fixed a malloc/delete[] mismatch: Not surprisingly, the pointer wrapped by
     a SmartArrayPointer should better be allocated by, well, NewArray...

Even with these 3 fixes, we still have a few failures when running our test
suite with ASAN. Most of them are either timeouts or failures caused by greatly
increased stack usage.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/15096011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 08:59:28 +00:00
dslomov@chromium.org
5777f3fb48 Enable native implementation of array buffer and typed arrays in d8 and tests.
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15059009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 14:18:43 +00:00
dcarney@chromium.org
b774c3edfe stop using AsciiValue
TBR=svenpanne@chomium.org
BUG=

Review URL: https://codereview.chromium.org/15129002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 14:18:05 +00:00
mstarzinger@chromium.org
d97fe8d4df Add Persistent::ClearAndLeak.
This will be relevant after Persistent is changed to Dispose itself when
destructed. With Persistent::ClearAndLeak, Blink can take the ownership of the
object pointed by a Persistent and avoid it getting destructed.

BUG=
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/15023010

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 14:04:51 +00:00
dcarney@chromium.org
d4fd9db342 fix nosnapshot test failure in 14793004, do not deprecate function
BUG=
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14947005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 07:45:16 +00:00
mstarzinger@chromium.org
04a5b3d6b6 Revert "deprecate Context::New which returns Persistent"
This reverts r14573 because of test failures in no-snapshot mode in the
cctest/test-debug/ScriptCollectedEventContext test case.

TBR=dcarney@chromium.org,svenpanne@chromium.org
TEST=cctest/test-debug/ScriptCollectedEventContext

Review URL: https://codereview.chromium.org/15038002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 16:28:51 +00:00
dcarney@chromium.org
386de8010b deprecate Context::New which returns Persistent
BUG=
TBR=marja@chromium.org

Review URL: https://codereview.chromium.org/14793004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 13:29:24 +00:00
dcarney@chromium.org
44ec65b1e1 Add Persistent<T>::Reset which disposes the handle and redirects it to point to another object.
BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14788013

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 12:37:22 +00:00
dcarney@chromium.org
42a8ff87ba add weakcallback without persistent copying
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14908004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 10:44:30 +00:00
dslomov@chromium.org
9b45b71d5a Added an extra flag that enables only ArrayBuffer.
This makes Blink experimentation easier.

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14884012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-06 16:19:27 +00:00
dcarney@chromium.org
0cf128390f deprecate WriteAscii and MayContainNonAscii
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14638003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 06:47:24 +00:00
dcarney@chromium.org
cf5ff5a14c first step to remove unsafe handles
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12729023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 20:18:42 +00:00
dslomov@chromium.org
6e86141916 Implementation of Uint8ClampedArray.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14657003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 11:36:48 +00:00
dslomov@chromium.org
1469acaa7f Add Value::Is* methods for typed arrays and ArrayBuffer
R=rossberg
BUG=

Committed https://code.google.com/p/v8/source/detail?r=14506

Review URL: https://codereview.chromium.org/13977018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:53:27 +00:00
dslomov@chromium.org
3af1cc1072 Revert "Fix typo"
This reverts commit r14506 (that was commited with a wrong description).

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:49:20 +00:00
dslomov@chromium.org
b029ad4201 Fix typo
R=rossberg@chromium.org

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=14505

Review URL: https://codereview.chromium.org/13993029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 18:02:22 +00:00
mvstanton@chromium.org
6e4a8fecb7 Two bugfixes for hydrogen-based array constructors
CacheInitialJSArrayMaps needs to be able to pick up where it left off,
as it can now be called from a handlfied context.

Disable incremental marking for CCTest SetJitCodeEventHandler, as it allocates
during compilation.

BUG=

Review URL: https://codereview.chromium.org/14642002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 13:43:45 +00:00
dslomov@chromium.org
7b1e7463f2 Remove __ prefix from Harmony typed arrays implementation
R=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14402026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 11:18:27 +00:00
dslomov@chromium.org
3fd6bb51f0 First cut at API for native Typed Arrays.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14195034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 11:09:03 +00:00
verwaest@chromium.org
99e17bb12a Track storage types of instance variables.
Review URL: https://chromiumcodereview.appspot.com/14146005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:30:41 +00:00
dslomov@chromium.org
76098f0770 Win64 build
R=rossberg@chromium.org,mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14392013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:34:45 +00:00
dslomov@chromium.org
44f2d534b1 First cut at API for ES6 ArrayBuffers
R=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/13958007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:02:23 +00:00
mstarzinger@chromium.org
e7c1f322a4 New GC APIs, try 2.
With these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=

Review URL: https://codereview.chromium.org/14007008

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 15:59:23 +00:00
danno@chromium.org
600ed94a3d Update tests to use std::isnan instead of isnan
Should fix compilation breakage after r14352

Review URL: https://codereview.chromium.org/14328044

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 14:20:36 +00:00
mstarzinger@chromium.org
091f0b7f35 Revert the commits adding new GC-related APIs.
We need to solve efficiency problems first.

This reverts the following revisions: 14283 14286 14221 14215

BUG=

Review URL: https://codereview.chromium.org/14294009

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 16:37:04 +00:00
mstarzinger@chromium.org
e8bc8d76ae New GC related APIs: Implicit references.
When using these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=NONE

Review URL: https://codereview.chromium.org/14175005

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:57:01 +00:00
jkummerow@chromium.org
2df1620c28 Make gyp work with Cygwin
Review URL: https://codereview.chromium.org/13760003

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:36:44 +00:00
jkummerow@chromium.org
586c4e74b6 Replace OS::MemCopy with OS::MemMove (just as fast but more flexible).
Review URL: https://codereview.chromium.org/13932006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:30:51 +00:00
mstarzinger@chromium.org
45125e6480 New GC related APIs.
When using these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=NONE

Review URL: https://codereview.chromium.org/13786002
Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 14:53:03 +00:00
rossberg@chromium.org
dc72037e10 ES6 symbols: extend V8 API to support symbols
Specifically:
- Introduce Symbol and SymbolObject classes.
- Generalise Object::Has and Object::Delete to arbitrary Value-typed keys.
- Generalise some places in the API implementation from String to Name.

It is not possible to intercept symbol-named properties. That is consistent with the idea that symbols are private and should not leak.

R=svenpanne@chromium.org
BUG=v8:2158

Review URL: https://codereview.chromium.org/13626002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 12:16:29 +00:00
svenpanne@chromium.org
d04de1fe1a Move context retrieval method around. Use delegation for implementation.
This is a refactoring of https://code.google.com/p/v8/source/detail?r=14146.

Review URL: https://codereview.chromium.org/13940003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-09 07:34:32 +00:00
haraken@chromium.org
c638555853 Pass an isolate to GetCurrent()
TEST=test-api.cc:GetCallingContextCallback

Review URL: https://chromiumcodereview.appspot.com//13426002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 02:17:56 +00:00
rossberg@chromium.org
52aec4722d ES6 symbols: prevent reflection, proxy, and observe APIs from leaking symbols
R=svenpanne@chromium.org
BUG=v8:2158

Review URL: https://codereview.chromium.org/12422019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 17:27:44 +00:00
yangguo@chromium.org
9673d7944c Fix tests that fail on GC stress tests.
R=mstarzinger@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/12681006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-20 10:33:26 +00:00
svenpanne@chromium.org
53310ac152 Added a version of the v8::HandleScope constructor with an Isolate and use that consistently.
I tried to limit the use of v8::Isolate::GetCurrent() and v8::internal::Isolate::Current() as much as possible, but sometimes this would have involved restructuring tests quite a bit, which is better left for a separate CL.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12716010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-15 12:06:53 +00:00
dcarney@chromium.org
fbe34d4ba5 remove latin-1 flag
R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12700008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 20:04:50 +00:00
svenpanne@chromium.org
8db737a583 Made AdjustAmountOfExternalAllocatedMemory an instance method of Isolate
BUG=v8:2487

Review URL: https://codereview.chromium.org/12790004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 13:15:09 +00:00
mstarzinger@chromium.org
bbc9f5362a Fix heap snapshot creation for Harmony collections.
R=yangguo@chromium.org
BUG=v8:2535
TEST=cctest/test-api/Regress2535

Review URL: https://codereview.chromium.org/12615005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-11 11:31:53 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12210083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
yangguo@chromium.org
7145671392 Make message listener API backwards compatible.
R=ulan@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/12217066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:35:39 +00:00
adamk@chromium.org
deeddc7e76 Remove duplication and unnecessary HandleScope from HasElement helper functions
Review URL: https://codereview.chromium.org/12328064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-26 17:20:21 +00:00
mstarzinger@chromium.org
ce1e10f5fc Make __proto__ a foreign callback on Object.prototype.
This moves the __proto__ property to Object.prototype and turns it into
a callback property actually present in the descriptor array as opposed
to a hack in the properties lookup. For now it still is a "magic" data
property using foreign callbacks and not an accessor property visible to
JavaScript.

The second effect of this change is that JSON.parse() no longer treats
the __proto__ property specially, it will be defined as any other data
property. Note that object literals still have their special handling.

R=rossberg@chromium.org
BUG=v8:621,v8:1949,v8:2441
TEST=mjsunit,cctest,test262

Review URL: https://codereview.chromium.org/12212011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-26 10:46:00 +00:00
adamk@chromium.org
30a4a798e5 Speed up non-interceptor case of Object.getOwnPropertyNames
When there are interceptors on an object, it's possible to
end up with duplicate property names. But when all the names
are provided by v8, a collision is not possible, so we can
fast-path that case by not de-duping.

Also added better test coverage for interceptor API.

Review URL: https://codereview.chromium.org/12314081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 18:58:47 +00:00
svenpanne@chromium.org
fb6776e84a Made Isolate a mandatory parameter for everything Handle-related.
Unified parameter order of CreateHandle with the rest of v8 on the way. A few
Isolate::Current()s had to be introduced, which is not nice, and not every place
will win a beauty contest, but we can clean this up later easily in smaller steps.

Review URL: https://codereview.chromium.org/12300018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:46:09 +00:00
danno@chromium.org
be8e8f7528 Improve the JitCodeEventHandler API to add support for line position information.
This includes:

* adding the CODE_ADD_LINE_POS_INFO, CODE_START_LINE_INFO_RECORDING, CODE_END_LINE_INFO_RECORDING event and the corresponding functionality.
 * adding the JITCodeLineInfo struct to record the code line info. I added this definition because Danno mentioned that "we'd like to cleanup and decouple the external debugging functionality"
 * some other small changes.

Review URL: https://chromiumcodereview.appspot.com/12223027
Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-18 18:06:12 +00:00
mstarzinger@chromium.org
3d81dec91d Unflakify SetJitCodeEventHandler test case.
R=ulan@chromium.org
TEST=cctest/test-api/SetJitCodeEventHandler

Review URL: https://codereview.chromium.org/12263035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-14 11:59:04 +00:00
svenpanne@chromium.org
9eec096914 Fixed a memory leak in v8 and another one in d8.
Cleaned up a few tests on the way. This CL brings us down to 5 leaks for d8.

Review URL: https://codereview.chromium.org/12223089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 11:57:51 +00:00
svenpanne@chromium.org
7b45ab9501 Don't use TLS for space iterators.
This is not only inherently slow, but it also forces the caller to enter an
Isolate before. Both is bad, so we have to do some heap plumbing.

BUG=v8:2531

Review URL: https://codereview.chromium.org/12217106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-11 13:02:20 +00:00
svenpanne@chromium.org
3b08a1f82c Added new GetHeapStatistics API entry and deprecated old one.
Simplified the HeapStatistics class a bit, following Uncle Bob's advice that
adding accessors to DTOs only satisfies some design fundamentalists, but serves
no other purpose. :-)

Review URL: https://codereview.chromium.org/12207076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-08 12:41:55 +00:00
mstarzinger@chromium.org
79607d20e6 Make the GC stress builder go green.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/12218034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-06 13:21:28 +00:00
svenpanne@chromium.org
52d10a68cb Add Isolate parameter to Persistent class.
BUG=v8:2487

Review URL: https://codereview.chromium.org/12033011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-25 08:31:46 +00:00
mstarzinger@chromium.org
c8cf5d90aa Implement VisitHandlesInNewSpaceWithClassIds()
BUG=
TEST=test-api.cc::PersistentHandleInNewSpaceVisitor

Review URL: https://codereview.chromium.org/11365131
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-24 15:53:16 +00:00