Skip to content

Commit

Permalink
Revert of Implement Fast Accessor Builder (patchset crosswalk-project#14
Browse files Browse the repository at this point in the history
 id:260001 of https://codereview.chromium.org/1474543004/ )

Reason for revert:
Broke the build, apparently.

Original issue's description:
> Implement FastAccessorBuilder.
>
> ... using the RawMachineAssembler and the work in cl/1407313004
>
> BUG=chromium:508898
> LOG=Y
>
> Committed: https://crrev.com/515d9ccd8e6df7bf2ca01e2a55aaad30226399e1
> Cr-Commit-Position: refs/heads/master@{#32742}

[email protected],[email protected],[email protected],[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:508898

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

Cr-Commit-Position: refs/heads/master@{#32744}
  • Loading branch information
otherdaniel authored and Commit bot committed Dec 10, 2015
1 parent ce47fc8 commit 0a50af8
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 853 deletions.
5 changes: 0 additions & 5 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ source_set("v8_base") {

sources = [
"include/v8-debug.h",
"include/v8-experimental.h",
"include/v8-platform.h",
"include/v8-profiler.h",
"include/v8-testing.h",
Expand All @@ -614,8 +613,6 @@ source_set("v8_base") {
"src/allocation-site-scopes.h",
"src/api.cc",
"src/api.h",
"src/api-experimental.cc",
"src/api-experimental.h",
"src/api-natives.cc",
"src/api-natives.h",
"src/arguments.cc",
Expand Down Expand Up @@ -727,8 +724,6 @@ source_set("v8_base") {
"src/compiler/escape-analysis.h",
"src/compiler/escape-analysis-reducer.cc",
"src/compiler/escape-analysis-reducer.h",
"src/compiler/fast-accessor-assembler.cc",
"src/compiler/fast-accessor-assembler.h",
"src/compiler/frame.cc",
"src/compiler/frame.h",
"src/compiler/frame-elider.cc",
Expand Down
53 changes: 0 additions & 53 deletions include/v8-experimental.h

This file was deleted.

13 changes: 4 additions & 9 deletions include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ class CallHandlerHelper;
class EscapableHandleScope;
template<typename T> class ReturnValue;

namespace experimental {
class FastAccessorBuilder;
} // namespace experimental

namespace internal {
class Arguments;
class Heap;
Expand Down Expand Up @@ -4423,8 +4419,7 @@ class V8_EXPORT FunctionTemplate : public Template {
* the callback cannot be null.
*/
static Local<FunctionTemplate> NewWithFastHandler(
Isolate* isolate, FunctionCallback callback,
experimental::FastAccessorBuilder* fast_handler = nullptr,
Isolate* isolate, FunctionCallback callback, Local<Value> fast_handler,
Local<Value> data = Local<Value>(),
Local<Signature> signature = Local<Signature>(), int length = 0);

Expand All @@ -4438,9 +4433,9 @@ class V8_EXPORT FunctionTemplate : public Template {
* callback is called whenever the function created from this
* FunctionTemplate is called.
*/
void SetCallHandler(
FunctionCallback callback, Local<Value> data = Local<Value>(),
experimental::FastAccessorBuilder* fast_handler = nullptr);
void SetCallHandler(FunctionCallback callback,
Local<Value> data = Local<Value>(),
Local<Value> fast_handler = Local<Value>());

/** Set the predefined length property for the FunctionTemplate. */
void SetLength(int length);
Expand Down
3 changes: 0 additions & 3 deletions src/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,4 @@ specific_include_rules = {
"d8\.cc": [
"+include/libplatform/libplatform.h",
],
"api-experimental\.cc": [
"+src/compiler/fast-accessor-assembler.h",
],
}
126 changes: 0 additions & 126 deletions src/api-experimental.cc

This file was deleted.

28 changes: 0 additions & 28 deletions src/api-experimental.h

This file was deleted.

29 changes: 13 additions & 16 deletions src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
#include <limits>
#include <vector>
#include "include/v8-debug.h"
#include "include/v8-experimental.h"
#include "include/v8-profiler.h"
#include "include/v8-testing.h"
#include "src/api-experimental.h"
#include "src/api-natives.h"
#include "src/assert-scope.h"
#include "src/background-parsing-task.h"
Expand Down Expand Up @@ -1001,7 +999,7 @@ void FunctionTemplate::Inherit(v8::Local<FunctionTemplate> value) {

static Local<FunctionTemplate> FunctionTemplateNew(
i::Isolate* isolate, FunctionCallback callback,
experimental::FastAccessorBuilder* fast_handler, v8::Local<Value> data,
v8::Local<Value> fast_handler, v8::Local<Value> data,
v8::Local<Signature> signature, int length, bool do_not_cache) {
i::Handle<i::Struct> struct_obj =
isolate->factory()->NewStruct(i::FUNCTION_TEMPLATE_INFO_TYPE);
Expand Down Expand Up @@ -1042,15 +1040,14 @@ Local<FunctionTemplate> FunctionTemplate::New(Isolate* isolate,
DCHECK(!i_isolate->serializer_enabled());
LOG_API(i_isolate, "FunctionTemplate::New");
ENTER_V8(i_isolate);
return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature,
length, false);
return FunctionTemplateNew(i_isolate, callback, v8::Local<Value>(), data,
signature, length, false);
}


Local<FunctionTemplate> FunctionTemplate::NewWithFastHandler(
Isolate* isolate, FunctionCallback callback,
experimental::FastAccessorBuilder* fast_handler, v8::Local<Value> data,
v8::Local<Signature> signature, int length) {
Isolate* isolate, FunctionCallback callback, v8::Local<Value> fast_handler,
v8::Local<Value> data, v8::Local<Signature> signature, int length) {
// TODO(vogelheim): 'fast_handler' should have a more specific type than
// Local<Value>.
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
Expand Down Expand Up @@ -1080,9 +1077,9 @@ Local<AccessorSignature> AccessorSignature::New(
} while (false)


void FunctionTemplate::SetCallHandler(
FunctionCallback callback, v8::Local<Value> data,
experimental::FastAccessorBuilder* fast_handler) {
void FunctionTemplate::SetCallHandler(FunctionCallback callback,
v8::Local<Value> data,
v8::Local<Value> fast_handler) {
auto info = Utils::OpenHandle(this);
EnsureNotInstantiated(info, "v8::FunctionTemplate::SetCallHandler");
i::Isolate* isolate = info->GetIsolate();
Expand All @@ -1093,10 +1090,10 @@ void FunctionTemplate::SetCallHandler(
i::Handle<i::CallHandlerInfo> obj =
i::Handle<i::CallHandlerInfo>::cast(struct_obj);
SET_FIELD_WRAPPED(obj, set_callback, callback);
i::MaybeHandle<i::Code> code =
i::experimental::BuildCodeFromFastAccessorBuilder(fast_handler);
if (!code.is_null()) {
obj->set_fast_handler(*code.ToHandleChecked());
if (!fast_handler.IsEmpty()) {
i::Handle<i::Object> code = Utils::OpenHandle(*fast_handler);
CHECK(code->IsCode());
obj->set_fast_handler(*code);
}
if (data.IsEmpty()) {
data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
Expand Down Expand Up @@ -4371,7 +4368,7 @@ MaybeLocal<Function> Function::New(Local<Context> context,
i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
LOG_API(isolate, "Function::New");
ENTER_V8(isolate);
return FunctionTemplateNew(isolate, callback, nullptr, data,
return FunctionTemplateNew(isolate, callback, Local<Value>(), data,
Local<Signature>(), length, true)
->GetFunction(context);
}
Expand Down
Loading

0 comments on commit 0a50af8

Please sign in to comment.