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

Unified Diff: src/code-stubs.h

Issue 1469793002: [builtins] Sanitize the machinery around Construct calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips64 fix. 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 24023c93dfc1bca760e574a52fac312b30e9bdae..8f919ea370a286c4e84a081fbf4243cdc3c85121 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1951,31 +1951,10 @@ class RegExpConstructResultStub final : public HydrogenCodeStub {
};
-class CallConstructStub: public PlatformCodeStub {
+// TODO(bmeurer/mvstanton): Turn CallConstructStub into ConstructICStub.
+class CallConstructStub final : public PlatformCodeStub {
public:
- CallConstructStub(Isolate* isolate, CallConstructorFlags flags)
- : PlatformCodeStub(isolate) {
- minor_key_ = FlagBits::encode(flags);
- }
-
- void FinishCode(Handle<Code> code) override {
- code->set_has_function_cache(RecordCallTarget());
- }
-
- private:
- CallConstructorFlags flags() const { return FlagBits::decode(minor_key_); }
-
- bool RecordCallTarget() const {
- return (flags() & RECORD_CONSTRUCTOR_TARGET) != 0;
- }
-
- bool IsSuperConstructorCall() const {
- return (flags() & SUPER_CONSTRUCTOR_CALL) != 0;
- }
-
- void PrintName(std::ostream& os) const override; // NOLINT
-
- class FlagBits : public BitField<CallConstructorFlags, 0, 2> {};
+ explicit CallConstructStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
DEFINE_CALL_INTERFACE_DESCRIPTOR(CallConstruct);
DEFINE_PLATFORM_CODE_STUB(CallConstruct, PlatformCodeStub);
« 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