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

Unified Diff: src/objects-inl.h

Issue 6932068: A first skeleton for introducing Harmony proxies (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Addressed Kevin's comments. Created 9 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 9a38584cba6caa8400218bacb324f369b03451bd..66b7822e0b29bef7552e66a86c6bc76a462301be 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -584,6 +584,12 @@ bool Object::IsStringWrapper() {
}
+bool Object::IsJSProxy() {
+ return Object::IsHeapObject()
+ && HeapObject::cast(this)->map()->instance_type() == JS_PROXY_TYPE;
+}
+
+
bool Object::IsProxy() {
return Object::IsHeapObject()
&& HeapObject::cast(this)->map()->instance_type() == PROXY_TYPE;
@@ -1898,6 +1904,7 @@ CAST_ACCESSOR(JSBuiltinsObject)
CAST_ACCESSOR(Code)
CAST_ACCESSOR(JSArray)
CAST_ACCESSOR(JSRegExp)
+CAST_ACCESSOR(JSProxy)
CAST_ACCESSOR(Proxy)
CAST_ACCESSOR(ByteArray)
CAST_ACCESSOR(ExternalArray)
@@ -3509,6 +3516,9 @@ void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id,
}
+ACCESSORS(JSProxy, handler, Object, kHandlerOffset)
+
+
Address Proxy::proxy() {
return AddressFrom<Address>(READ_INTPTR_FIELD(this, kProxyOffset));
}

Powered by Google App Engine
This is Rietveld 408576698