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

Unified Diff: src/code-stubs.h

Issue 1407373007: Remove CallFunctionStub, always call through the Call builtin (also from CallIC) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 29053d93054a0f268c7385aac378fb72b4ae832f..861a7daecdb16b12c64425e01eb6bf60489ec544 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -27,7 +27,6 @@ namespace internal {
V(CallApiAccessor) \
V(CallApiGetter) \
V(CallConstruct) \
- V(CallFunction) \
V(CallIC) \
V(CEntry) \
V(CompareIC) \
@@ -983,10 +982,6 @@ class CallICStub: public PlatformCodeStub {
}
protected:
- bool CallAsMethod() const {
- return state().call_type() == CallICState::METHOD;
- }
-
int arg_count() const { return state().arg_count(); }
CallICState state() const {
@@ -1963,38 +1958,6 @@ class RegExpConstructResultStub final : public HydrogenCodeStub {
};
-// TODO(bmeurer): Deprecate the CallFunctionStub in favor of the more general
-// Invoke family of builtins.
-class CallFunctionStub: public PlatformCodeStub {
- public:
- CallFunctionStub(Isolate* isolate, int argc, CallFunctionFlags flags)
- : PlatformCodeStub(isolate) {
- DCHECK(argc >= 0 && argc <= Code::kMaxArguments);
- minor_key_ = ArgcBits::encode(argc) | FlagBits::encode(flags);
- }
-
- private:
- int argc() const { return ArgcBits::decode(minor_key_); }
- int flags() const { return FlagBits::decode(minor_key_); }
-
- bool CallAsMethod() const {
- return flags() == CALL_AS_METHOD || flags() == WRAP_AND_CALL;
- }
-
- bool NeedsChecks() const { return flags() != WRAP_AND_CALL; }
-
- void PrintName(std::ostream& os) const override; // NOLINT
-
- // Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
- class FlagBits : public BitField<CallFunctionFlags, 0, 2> {};
- class ArgcBits : public BitField<unsigned, 2, Code::kArgumentsBits> {};
- STATIC_ASSERT(Code::kArgumentsBits + 2 <= kStubMinorKeyBits);
-
- DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunction);
- DEFINE_PLATFORM_CODE_STUB(CallFunction, PlatformCodeStub);
-};
-
-
class CallConstructStub: public PlatformCodeStub {
public:
CallConstructStub(Isolate* isolate, CallConstructorFlags flags)
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698