[V8] We should call the faster v8::Integer::New APIs
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Oct 2012 22:50:36 +0000 (22:50 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Oct 2012 22:50:36 +0000 (22:50 +0000)
commitf57e98b55f56395f0555f92d4286e79877a7cc87
tree496c87d7e2d830640e5055f468a51969848b8958
parent705aa1545a7c4dcf879dc13d28520ce4eac97c54
[V8] We should call the faster v8::Integer::New APIs
https://bugs.webkit.org/show_bug.cgi?id=100016

Reviewed by Eric Seidel.

In working to remove the integer cache, I added some faster APIs for
creating v8::Integers. These APIs are faster than the old APIs, but not
quite fast enough to replace the integer cache. We should still use
them when we miss the integer cache.

I've also included a small refactoring to V8PerIsolateData to make it
clearer when we're calling v8::Isolate::GetCurrent().

* bindings/v8/DOMData.cpp:
(WebCore::DOMData::getCurrentStore):
* bindings/v8/V8Binding.h:
(WebCore::v8ExternalString):
(WebCore::v8Integer):
(WebCore::v8UnsignedInteger):
* bindings/v8/V8PerIsolateData.h:
(WebCore::V8PerIsolateData::current):
(WebCore::V8PerIsolateData::from):
* bindings/v8/V8ValueCache.cpp:
(WebCore::StringCache::v8ExternalStringSlow):
(WebCore::IntegerCache::createSmallIntegers):
* bindings/v8/V8ValueCache.h:
(WebCore::IntegerCache::v8Integer):
(WebCore::IntegerCache::v8UnsignedInteger):
(IntegerCache):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::getContextCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/DOMData.cpp
Source/WebCore/bindings/v8/V8Binding.h
Source/WebCore/bindings/v8/V8PerIsolateData.h
Source/WebCore/bindings/v8/V8ValueCache.cpp
Source/WebCore/bindings/v8/V8ValueCache.h
Source/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp