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

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: Fix mips/mips64 errors. Created 5 years, 8 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 c40bc857cad53b1d03778940c7615c3cc67c2a38..bf3619b0a81c5c6caa78fa947eef61cf46793f64 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -79,6 +79,7 @@ namespace internal {
V(MegamorphicLoad) \
V(NameDictionaryLookup) \
V(NumberToString) \
+ V(Typeof) \
V(RegExpConstructResult) \
V(StoreFastElement) \
V(StoreScriptContextField) \
@@ -594,6 +595,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') | src/code-stubs-hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698