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

Unified Diff: src/code-stubs.h

Issue 1114563003: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 7 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/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 c6767e9b8b73f60c318e6a18952b0367aae8026e..040bf10f774597fed42d95832a349d03631a1899 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -80,6 +80,7 @@ namespace internal {
V(MegamorphicLoad) \
V(NameDictionaryLookup) \
V(NumberToString) \
+ V(Typeof) \
V(RegExpConstructResult) \
V(StoreFastElement) \
V(StoreScriptContextField) \
@@ -595,6 +596,20 @@ class NumberToStringStub final : public HydrogenCodeStub {
};
+class TypeofStub final : public HydrogenCodeStub {
+ public:
+ explicit TypeofStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
+
+ // Parameters accessed via CodeStubGraphBuilder::GetParameter()
+ static const int kObject = 0;
+
+ static void GenerateAheadOfTime(Isolate* isolate);
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Typeof);
+ DEFINE_HYDROGEN_CODE_STUB(Typeof, HydrogenCodeStub);
+};
+
+
class FastNewClosureStub : public HydrogenCodeStub {
public:
FastNewClosureStub(Isolate* isolate, LanguageMode language_mode,
« 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