WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
89042
[V8] V8ArrayBufferViewCustom.cpp uses unnecessary v8::Script::Compile
https://bugs.webkit.org/show_bug.cgi?id=89042
Summary
[V8] V8ArrayBufferViewCustom.cpp uses unnecessary v8::Script::Compile
Erik Arvidsson
Reported
2012-06-13 15:14:41 PDT
This code looks suspicious. v8::Handle<v8::Value> installHiddenCopyMethod(v8::Handle<v8::Object> prototype) { v8::TryCatch tryCatch; tryCatch.SetVerbose(true); String source(reinterpret_cast<const char*>(V8ArrayBufferViewCustomScript_js), sizeof(V8ArrayBufferViewCustomScript_js)); v8::Handle<v8::Script> script = v8::Script::Compile(v8String(source)); v8::Handle<v8::Value> value = script->Run(); v8::Handle<v8::String> key = v8::String::New(hiddenCopyMethodName); prototype->SetHiddenValue(key, value); return value; } We should not invoke the compiler for this. We can just write the same code in C++.
Attachments
Add attachment
proposed patch, testcase, etc.
Kenneth Russell
Comment 1
2012-06-13 15:42:43 PDT
This code inserts a JavaScript-side shim developed by Ulan Degenbaev which provides a large speedup for setting a typed array from a JavaScript array. The same code in C++ is hugely slower due to the need to go across the V8 API for every incoming array element. I'm closing this as WontFix. If I misunderstood why this bug was filed, please reopen it.
Erik Arvidsson
Comment 2
2012-06-13 16:37:43 PDT
OK. Thanks for the clarification.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug