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

Side by Side Diff: src/objects.h

Issue 305513004: Cleanup GetPropertyWithCallback / SetPropertyWithCallback API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty( 1470 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
1471 Handle<Object> object, 1471 Handle<Object> object,
1472 Handle<Name> key); 1472 Handle<Name> key);
1473 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( 1473 MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
1474 Handle<Object> object, 1474 Handle<Object> object,
1475 Handle<Object> receiver, 1475 Handle<Object> receiver,
1476 LookupResult* result, 1476 LookupResult* result,
1477 Handle<Name> key, 1477 Handle<Name> key,
1478 PropertyAttributes* attributes); 1478 PropertyAttributes* attributes);
1479 1479
1480 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithCallback(
1481 Handle<Object> receiver,
1482 Handle<Name> name,
1483 Handle<JSObject> holder,
1484 Handle<Object> structure);
1485 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithCallback(
1486 Handle<Object> receiver,
1487 Handle<Name> name,
1488 Handle<Object> value,
1489 Handle<JSObject> holder,
1490 Handle<Object> structure,
1491 StrictMode strict_mode);
1492
1480 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithDefinedGetter( 1493 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithDefinedGetter(
1481 Handle<Object> object,
1482 Handle<Object> receiver, 1494 Handle<Object> receiver,
1483 Handle<JSReceiver> getter); 1495 Handle<JSReceiver> getter);
1496 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithDefinedSetter(
1497 Handle<Object> receiver,
1498 Handle<JSReceiver> setter,
1499 Handle<Object> value);
1484 1500
1485 MUST_USE_RESULT static inline MaybeHandle<Object> GetElement( 1501 MUST_USE_RESULT static inline MaybeHandle<Object> GetElement(
1486 Isolate* isolate, 1502 Isolate* isolate,
1487 Handle<Object> object, 1503 Handle<Object> object,
1488 uint32_t index); 1504 uint32_t index);
1489 1505
1490 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithReceiver( 1506 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithReceiver(
1491 Isolate* isolate, 1507 Isolate* isolate,
1492 Handle<Object> object, 1508 Handle<Object> object,
1493 Handle<Object> receiver, 1509 Handle<Object> receiver,
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 void Lookup(Handle<Name> name, LookupResult* result); 2003 void Lookup(Handle<Name> name, LookupResult* result);
1988 2004
1989 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; 2005 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
1990 2006
1991 // Computes the enumerable keys for a JSObject. Used for implementing 2007 // Computes the enumerable keys for a JSObject. Used for implementing
1992 // "for (n in object) { }". 2008 // "for (n in object) { }".
1993 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( 2009 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
1994 Handle<JSReceiver> object, 2010 Handle<JSReceiver> object,
1995 KeyCollectionType type); 2011 KeyCollectionType type);
1996 2012
1997 protected:
1998 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithDefinedSetter(
1999 Handle<JSReceiver> object,
2000 Handle<JSReceiver> setter,
2001 Handle<Object> value);
2002
2003 private: 2013 private:
2004 static PropertyAttributes GetPropertyAttributeForResult( 2014 static PropertyAttributes GetPropertyAttributeForResult(
2005 Handle<JSReceiver> object, 2015 Handle<JSReceiver> object,
2006 Handle<JSReceiver> receiver, 2016 Handle<JSReceiver> receiver,
2007 LookupResult* result, 2017 LookupResult* result,
2008 Handle<Name> name, 2018 Handle<Name> name,
2009 bool continue_search); 2019 bool continue_search);
2010 2020
2011 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( 2021 MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
2012 Handle<JSReceiver> receiver, 2022 Handle<JSReceiver> receiver,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 // Undefined values are placed after non-undefined values. 2131 // Undefined values are placed after non-undefined values.
2122 // Returns the number of non-undefined values. 2132 // Returns the number of non-undefined values.
2123 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, 2133 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object,
2124 uint32_t limit); 2134 uint32_t limit);
2125 // As PrepareElementsForSort, but only on objects where elements is 2135 // As PrepareElementsForSort, but only on objects where elements is
2126 // a dictionary, and it will stay a dictionary. Collates undefined and 2136 // a dictionary, and it will stay a dictionary. Collates undefined and
2127 // unexisting elements below limit from position zero of the elements. 2137 // unexisting elements below limit from position zero of the elements.
2128 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, 2138 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object,
2129 uint32_t limit); 2139 uint32_t limit);
2130 2140
2131 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithCallback(
2132 Handle<JSObject> object,
2133 Handle<Object> receiver,
2134 Handle<Object> structure,
2135 Handle<Name> name);
2136
2137 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithCallback(
2138 Handle<JSObject> object,
2139 Handle<Object> structure,
2140 Handle<Name> name,
2141 Handle<Object> value,
2142 Handle<JSObject> holder,
2143 StrictMode strict_mode);
2144
2145 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( 2141 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor(
2146 Handle<JSObject> object, 2142 Handle<JSObject> object,
2147 Handle<Name> name, 2143 Handle<Name> name,
2148 Handle<Object> value, 2144 Handle<Object> value,
2149 PropertyAttributes attributes, 2145 PropertyAttributes attributes,
2150 StrictMode strict_mode); 2146 StrictMode strict_mode);
2151 2147
2152 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult( 2148 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult(
2153 Handle<JSObject> object, 2149 Handle<JSObject> object,
2154 LookupResult* result, 2150 LookupResult* result,
(...skipping 8915 matching lines...) Expand 10 before | Expand all | Expand 10 after
11070 } else { 11066 } else {
11071 value &= ~(1 << bit_position); 11067 value &= ~(1 << bit_position);
11072 } 11068 }
11073 return value; 11069 return value;
11074 } 11070 }
11075 }; 11071 };
11076 11072
11077 } } // namespace v8::internal 11073 } } // namespace v8::internal
11078 11074
11079 #endif // V8_OBJECTS_H_ 11075 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698