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

Unified Diff: src/code-stubs.h

Issue 925373002: Test StringLengthStub generation via TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 2ae4ba7085e37e1a10b3c0a73acd623034324ac5..09e55a9bffc2661fd49a37351785bf885aa27217 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1009,15 +1009,25 @@ class LoadConstantStub : public HandlerStub {
};
-class StringLengthStub: public HandlerStub {
+class StringLengthStub : public CodeStub {
public:
- explicit StringLengthStub(Isolate* isolate) : HandlerStub(isolate) {}
+ explicit StringLengthStub(Isolate* isolate) : CodeStub(isolate) {}
- protected:
- Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
- Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
+ StringLengthStub(uint32_t key, Isolate* isolate) : CodeStub(key, isolate) {}
+
+ CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
+ return LoadDescriptor(isolate());
+ };
- DEFINE_HANDLER_CODE_STUB(StringLength, HandlerStub);
+ Handle<Code> GenerateCode() OVERRIDE;
+
+ Major MajorKey() const OVERRIDE { return StringLength; };
+ Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
+ InlineCacheState GetICState() const OVERRIDE { return MONOMORPHIC; }
+ ExtraICState GetExtraICState() const OVERRIDE { return Code::LOAD_IC; }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StringLengthStub);
};
« no previous file with comments | « BUILD.gn ('k') | src/code-stubs-hydrogen.cc » ('j') | src/compiler/code-stubs-turbofan.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698