OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 Isolate* isolate, Handle<Object> object, Handle<Object> properties); | 1958 Isolate* isolate, Handle<Object> object, Handle<Object> properties); |
1959 | 1959 |
1960 // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. | 1960 // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. |
1961 MUST_USE_RESULT static Maybe<bool> DefineOwnProperty( | 1961 MUST_USE_RESULT static Maybe<bool> DefineOwnProperty( |
1962 Isolate* isolate, Handle<JSReceiver> object, Handle<Object> key, | 1962 Isolate* isolate, Handle<JSReceiver> object, Handle<Object> key, |
1963 PropertyDescriptor* desc, ShouldThrow should_throw); | 1963 PropertyDescriptor* desc, ShouldThrow should_throw); |
1964 | 1964 |
1965 // ES6 7.3.4 (when passed DONT_THROW) | 1965 // ES6 7.3.4 (when passed DONT_THROW) |
1966 MUST_USE_RESULT static Maybe<bool> CreateDataProperty( | 1966 MUST_USE_RESULT static Maybe<bool> CreateDataProperty( |
1967 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); | 1967 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); |
| 1968 MUST_USE_RESULT static Maybe<bool> CreateDataProperty( |
| 1969 Handle<JSReceiver> holder, Handle<Object> key, Handle<Object> value, |
| 1970 ShouldThrow should_throw); |
1968 | 1971 |
1969 // ES6 9.1.6.1 | 1972 // ES6 9.1.6.1 |
1970 MUST_USE_RESULT static Maybe<bool> OrdinaryDefineOwnProperty( | 1973 MUST_USE_RESULT static Maybe<bool> OrdinaryDefineOwnProperty( |
1971 Isolate* isolate, Handle<JSObject> object, Handle<Object> key, | 1974 Isolate* isolate, Handle<JSObject> object, Handle<Object> key, |
1972 PropertyDescriptor* desc, ShouldThrow should_throw); | 1975 PropertyDescriptor* desc, ShouldThrow should_throw); |
1973 MUST_USE_RESULT static Maybe<bool> OrdinaryDefineOwnProperty( | 1976 MUST_USE_RESULT static Maybe<bool> OrdinaryDefineOwnProperty( |
1974 LookupIterator* it, PropertyDescriptor* desc, ShouldThrow should_throw); | 1977 LookupIterator* it, PropertyDescriptor* desc, ShouldThrow should_throw); |
1975 // ES6 9.1.6.2 | 1978 // ES6 9.1.6.2 |
1976 MUST_USE_RESULT static Maybe<bool> IsCompatiblePropertyDescriptor( | 1979 MUST_USE_RESULT static Maybe<bool> IsCompatiblePropertyDescriptor( |
1977 Isolate* isolate, bool extensible, PropertyDescriptor* desc, | 1980 Isolate* isolate, bool extensible, PropertyDescriptor* desc, |
(...skipping 6558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8536 static MaybeHandle<JSRegExp> Initialize(Handle<JSRegExp> regexp, | 8539 static MaybeHandle<JSRegExp> Initialize(Handle<JSRegExp> regexp, |
8537 Handle<String> source, Flags flags); | 8540 Handle<String> source, Flags flags); |
8538 static MaybeHandle<JSRegExp> Initialize(Handle<JSRegExp> regexp, | 8541 static MaybeHandle<JSRegExp> Initialize(Handle<JSRegExp> regexp, |
8539 Handle<String> source, | 8542 Handle<String> source, |
8540 Handle<String> flags_string); | 8543 Handle<String> flags_string); |
8541 | 8544 |
8542 inline Type TypeTag(); | 8545 inline Type TypeTag(); |
8543 inline int CaptureCount(); | 8546 inline int CaptureCount(); |
8544 inline Flags GetFlags(); | 8547 inline Flags GetFlags(); |
8545 inline String* Pattern(); | 8548 inline String* Pattern(); |
| 8549 inline Object* CaptureNameMap(); |
8546 inline Object* DataAt(int index); | 8550 inline Object* DataAt(int index); |
8547 // Set implementation data after the object has been prepared. | 8551 // Set implementation data after the object has been prepared. |
8548 inline void SetDataAt(int index, Object* value); | 8552 inline void SetDataAt(int index, Object* value); |
8549 | 8553 |
8550 inline void SetLastIndex(int index); | 8554 inline void SetLastIndex(int index); |
8551 inline Object* LastIndex(); | 8555 inline Object* LastIndex(); |
8552 | 8556 |
8553 static int code_index(bool is_latin1) { | 8557 static int code_index(bool is_latin1) { |
8554 if (is_latin1) { | 8558 if (is_latin1) { |
8555 return kIrregexpLatin1CodeIndex; | 8559 return kIrregexpLatin1CodeIndex; |
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11588 } | 11592 } |
11589 }; | 11593 }; |
11590 | 11594 |
11591 | 11595 |
11592 } // NOLINT, false-positive due to second-order macros. | 11596 } // NOLINT, false-positive due to second-order macros. |
11593 } // NOLINT, false-positive due to second-order macros. | 11597 } // NOLINT, false-positive due to second-order macros. |
11594 | 11598 |
11595 #include "src/objects/object-macros-undef.h" | 11599 #include "src/objects/object-macros-undef.h" |
11596 | 11600 |
11597 #endif // V8_OBJECTS_H_ | 11601 #endif // V8_OBJECTS_H_ |
OLD | NEW |