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

Side by Side Diff: src/objects.h

Issue 1480673004: Revert of [Proxies] Support constructable proxy as new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« 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 <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 public: 1793 public:
1794 DECLARE_CAST(JSReceiver) 1794 DECLARE_CAST(JSReceiver)
1795 1795
1796 // ES6 section 7.1.1 ToPrimitive 1796 // ES6 section 7.1.1 ToPrimitive
1797 MUST_USE_RESULT static MaybeHandle<Object> ToPrimitive( 1797 MUST_USE_RESULT static MaybeHandle<Object> ToPrimitive(
1798 Handle<JSReceiver> receiver, 1798 Handle<JSReceiver> receiver,
1799 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); 1799 ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
1800 MUST_USE_RESULT static MaybeHandle<Object> OrdinaryToPrimitive( 1800 MUST_USE_RESULT static MaybeHandle<Object> OrdinaryToPrimitive(
1801 Handle<JSReceiver> receiver, OrdinaryToPrimitiveHint hint); 1801 Handle<JSReceiver> receiver, OrdinaryToPrimitiveHint hint);
1802 1802
1803 static MaybeHandle<Context> GetFunctionRealm(Handle<JSReceiver> receiver);
1804
1805 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6. 1803 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6.
1806 MUST_USE_RESULT static Maybe<bool> HasProperty(LookupIterator* it); 1804 MUST_USE_RESULT static Maybe<bool> HasProperty(LookupIterator* it);
1807 MUST_USE_RESULT static inline Maybe<bool> HasProperty( 1805 MUST_USE_RESULT static inline Maybe<bool> HasProperty(
1808 Handle<JSReceiver> object, Handle<Name> name); 1806 Handle<JSReceiver> object, Handle<Name> name);
1809 MUST_USE_RESULT static inline Maybe<bool> HasOwnProperty(Handle<JSReceiver>, 1807 MUST_USE_RESULT static inline Maybe<bool> HasOwnProperty(Handle<JSReceiver>,
1810 Handle<Name> name); 1808 Handle<Name> name);
1811 MUST_USE_RESULT static inline Maybe<bool> HasElement( 1809 MUST_USE_RESULT static inline Maybe<bool> HasElement(
1812 Handle<JSReceiver> object, uint32_t index); 1810 Handle<JSReceiver> object, uint32_t index);
1813 MUST_USE_RESULT static inline Maybe<bool> HasOwnElement( 1811 MUST_USE_RESULT static inline Maybe<bool> HasOwnElement(
1814 Handle<JSReceiver> object, uint32_t index); 1812 Handle<JSReceiver> object, uint32_t index);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 // properties is a FixedArray in the fast case and a Dictionary in the 1948 // properties is a FixedArray in the fast case and a Dictionary in the
1951 // slow case. 1949 // slow case.
1952 DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties. 1950 DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties.
1953 inline void initialize_properties(); 1951 inline void initialize_properties();
1954 inline bool HasFastProperties(); 1952 inline bool HasFastProperties();
1955 // Gets slow properties for non-global objects. 1953 // Gets slow properties for non-global objects.
1956 inline NameDictionary* property_dictionary(); 1954 inline NameDictionary* property_dictionary();
1957 // Gets global object properties. 1955 // Gets global object properties.
1958 inline GlobalDictionary* global_dictionary(); 1956 inline GlobalDictionary* global_dictionary();
1959 1957
1960 static MaybeHandle<Context> GetFunctionRealm(Handle<JSObject> object);
1961
1962 // [elements]: The elements (properties with names that are integers). 1958 // [elements]: The elements (properties with names that are integers).
1963 // 1959 //
1964 // Elements can be in two general modes: fast and slow. Each mode 1960 // Elements can be in two general modes: fast and slow. Each mode
1965 // corrensponds to a set of object representations of elements that 1961 // corrensponds to a set of object representations of elements that
1966 // have something in common. 1962 // have something in common.
1967 // 1963 //
1968 // In the fast mode elements is a FixedArray and so each element can 1964 // In the fast mode elements is a FixedArray and so each element can
1969 // be quickly accessed. This fact is used in the generated code. The 1965 // be quickly accessed. This fact is used in the generated code. The
1970 // elements array can have one of three maps in this mode: 1966 // elements array can have one of three maps in this mode:
1971 // fixed_array_map, sloppy_arguments_elements_map or 1967 // fixed_array_map, sloppy_arguments_elements_map or
(...skipping 5233 matching lines...) Expand 10 before | Expand all | Expand 10 after
7205 // [shared]: The information about the function that 7201 // [shared]: The information about the function that
7206 // can be shared by instances. 7202 // can be shared by instances.
7207 DECL_ACCESSORS(shared, SharedFunctionInfo) 7203 DECL_ACCESSORS(shared, SharedFunctionInfo)
7208 7204
7209 // [context]: The context for this function. 7205 // [context]: The context for this function.
7210 inline Context* context(); 7206 inline Context* context();
7211 inline void set_context(Object* context); 7207 inline void set_context(Object* context);
7212 inline JSObject* global_proxy(); 7208 inline JSObject* global_proxy();
7213 inline Context* native_context(); 7209 inline Context* native_context();
7214 7210
7215 static MaybeHandle<Context> GetFunctionRealm(Handle<JSFunction> function);
7216
7217 // [code]: The generated code object for this function. Executed 7211 // [code]: The generated code object for this function. Executed
7218 // when the function is invoked, e.g. foo() or new foo(). See 7212 // when the function is invoked, e.g. foo() or new foo(). See
7219 // [[Call]] and [[Construct]] description in ECMA-262, section 7213 // [[Call]] and [[Construct]] description in ECMA-262, section
7220 // 8.6.2, page 27. 7214 // 8.6.2, page 27.
7221 inline Code* code(); 7215 inline Code* code();
7222 inline void set_code(Code* code); 7216 inline void set_code(Code* code);
7223 inline void set_code_no_write_barrier(Code* code); 7217 inline void set_code_no_write_barrier(Code* code);
7224 inline void ReplaceCode(Code* code); 7218 inline void ReplaceCode(Code* code);
7225 7219
7226 // Tells whether this function inlines the given shared function info. 7220 // Tells whether this function inlines the given shared function info.
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
9501 // The JSProxy describes EcmaScript Harmony proxies 9495 // The JSProxy describes EcmaScript Harmony proxies
9502 class JSProxy: public JSReceiver { 9496 class JSProxy: public JSReceiver {
9503 public: 9497 public:
9504 // [handler]: The handler property. 9498 // [handler]: The handler property.
9505 DECL_ACCESSORS(handler, Object) 9499 DECL_ACCESSORS(handler, Object)
9506 // [target]: The target property. 9500 // [target]: The target property.
9507 DECL_ACCESSORS(target, Object) 9501 DECL_ACCESSORS(target, Object)
9508 // [hash]: The hash code property (undefined if not initialized yet). 9502 // [hash]: The hash code property (undefined if not initialized yet).
9509 DECL_ACCESSORS(hash, Object) 9503 DECL_ACCESSORS(hash, Object)
9510 9504
9511 static MaybeHandle<Context> GetFunctionRealm(Handle<JSProxy> proxy);
9512
9513 inline bool has_handler(); 9505 inline bool has_handler();
9514 9506
9515 DECLARE_CAST(JSProxy) 9507 DECLARE_CAST(JSProxy)
9516 9508
9517 static bool IsRevoked(Handle<JSProxy> proxy); 9509 static bool IsRevoked(Handle<JSProxy> proxy);
9518 9510
9519 // ES6 9.5.1 9511 // ES6 9.5.1
9520 static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver); 9512 static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver);
9521 9513
9522 // ES6 9.5.3 9514 // ES6 9.5.3
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
10734 } 10726 }
10735 return value; 10727 return value;
10736 } 10728 }
10737 }; 10729 };
10738 10730
10739 10731
10740 } // NOLINT, false-positive due to second-order macros. 10732 } // NOLINT, false-positive due to second-order macros.
10741 } // NOLINT, false-positive due to second-order macros. 10733 } // NOLINT, false-positive due to second-order macros.
10742 10734
10743 #endif // V8_OBJECTS_H_ 10735 #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