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

Unified Diff: src/objects-inl.h

Issue 7849021: Handle function proxies as getters/setters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Micro-opt. Created 9 years, 3 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/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index bb24a2f8544ef73e069031be3bd38c0ed6315855..5b6227c5053e5b0558bd3ae2096d9f738e364ea6 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -165,6 +165,13 @@ bool Object::IsSpecObject() {
}
+bool Object::IsSpecFunction() {
+ if (!Object::IsHeapObject()) return false;
+ InstanceType type = HeapObject::cast(this)->map()->instance_type();
+ return type == JS_FUNCTION_TYPE || type == JS_FUNCTION_PROXY_TYPE;
+}
+
+
bool Object::IsSymbol() {
if (!this->IsHeapObject()) return false;
uint32_t type = HeapObject::cast(this)->map()->instance_type();
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | test/mjsunit/harmony/proxies.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698