Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: src/objects.cc

Issue 1679683004: Revert of Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index ab9c2922dc0f946b082e234427b6b246d7afd463..8933e6ce34011bbcd8ac41adf425b55dfa75aa9d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11,7 +11,6 @@
#include "src/accessors.h"
#include "src/allocation-site-scopes.h"
#include "src/api.h"
-#include "src/api-natives.h"
#include "src/arguments.h"
#include "src/base/bits.h"
#include "src/base/utils/random-number-generator.h"
@@ -1176,18 +1175,7 @@
// Regular accessor.
Handle<Object> getter(AccessorPair::cast(*structure)->getter(), isolate);
- if (getter->IsFunctionTemplateInfo()) {
- auto result = Builtins::InvokeApiFunction(
- Handle<FunctionTemplateInfo>::cast(getter), receiver, 0, nullptr);
- if (isolate->has_pending_exception()) {
- return MaybeHandle<Object>();
- }
- Handle<Object> return_value;
- if (result.ToHandle(&return_value)) {
- return_value->VerifyApiCallResultType();
- return handle(*return_value, isolate);
- }
- } else if (getter->IsCallable()) {
+ if (getter->IsCallable()) {
// TODO(rossberg): nicer would be to cast to some JSCallable here...
return Object::GetPropertyWithDefinedGetter(
receiver, Handle<JSReceiver>::cast(getter));
@@ -1245,16 +1233,7 @@
// Regular accessor.
Handle<Object> setter(AccessorPair::cast(*structure)->setter(), isolate);
- if (setter->IsFunctionTemplateInfo()) {
- Handle<Object> argv[] = {value};
- auto result =
- Builtins::InvokeApiFunction(Handle<FunctionTemplateInfo>::cast(setter),
- receiver, arraysize(argv), argv);
- if (isolate->has_pending_exception()) {
- return Nothing<bool>();
- }
- return Just(true);
- } else if (setter->IsCallable()) {
+ if (setter->IsCallable()) {
// TODO(rossberg): nicer would be to cast to some JSCallable here...
return SetPropertyWithDefinedSetter(
receiver, Handle<JSReceiver>::cast(setter), value, should_throw);
@@ -9086,10 +9065,8 @@
}
}
- DCHECK(getter->IsCallable() || getter->IsUndefined() || getter->IsNull() ||
- getter->IsFunctionTemplateInfo());
- DCHECK(setter->IsCallable() || setter->IsUndefined() || setter->IsNull() ||
- getter->IsFunctionTemplateInfo());
+ DCHECK(getter->IsCallable() || getter->IsUndefined() || getter->IsNull());
+ DCHECK(setter->IsCallable() || setter->IsUndefined() || setter->IsNull());
// At least one of the accessors needs to be a new value.
DCHECK(!getter->IsNull() || !setter->IsNull());
if (!getter->IsNull()) {
@@ -11004,13 +10981,9 @@
Object* AccessorPair::GetComponent(AccessorComponent component) {
Object* accessor = get(component);
- if (accessor->IsFunctionTemplateInfo()) {
- return *ApiNatives::InstantiateFunction(
- handle(FunctionTemplateInfo::cast(accessor)))
- .ToHandleChecked();
- }
return accessor->IsTheHole() ? GetHeap()->undefined_value() : accessor;
}
+
Handle<DeoptimizationInputData> DeoptimizationInputData::New(
Isolate* isolate, int deopt_entry_count, PretenureFlag pretenure) {
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698