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

Unified Diff: src/code-stubs.h

Issue 1894953004: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments, tweak linear search limit based on local measurements Created 4 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 07ae6af1c87c934996ffdf78f89fad3efddbaad3..57da9c3024deb54a652a3882cd569d17408a7c70 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -139,6 +139,7 @@ namespace internal {
V(ToBoolean) \
V(ToInteger) \
V(ToLength) \
+ V(HasProperty) \
/* IC Handler stubs */ \
V(ArrayBufferViewLoadField) \
V(LoadConstant) \
@@ -931,6 +932,15 @@ class LoadIndexedInterceptorStub : public TurboFanCodeStub {
DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub);
};
+// ES6 section 12.10.3 "in" operator evaluation.
+class HasPropertyStub : public TurboFanCodeStub {
+ public:
+ explicit HasPropertyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(HasProperty);
+ DEFINE_TURBOFAN_CODE_STUB(HasProperty, TurboFanCodeStub);
+};
+
enum StringAddFlags {
// Omit both parameter checks.
STRING_ADD_CHECK_NONE = 0,

Powered by Google App Engine
This is Rietveld 408576698