OLD | NEW |
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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 | 1095 |
1096 // ES6 section 7.1.14 ToPropertyKey | 1096 // ES6 section 7.1.14 ToPropertyKey |
1097 MUST_USE_RESULT static inline MaybeHandle<Name> ToName(Isolate* isolate, | 1097 MUST_USE_RESULT static inline MaybeHandle<Name> ToName(Isolate* isolate, |
1098 Handle<Object> input); | 1098 Handle<Object> input); |
1099 | 1099 |
1100 // ES6 section 7.1.1 ToPrimitive | 1100 // ES6 section 7.1.1 ToPrimitive |
1101 MUST_USE_RESULT static inline MaybeHandle<Object> ToPrimitive( | 1101 MUST_USE_RESULT static inline MaybeHandle<Object> ToPrimitive( |
1102 Handle<Object> input, ToPrimitiveHint hint = ToPrimitiveHint::kDefault); | 1102 Handle<Object> input, ToPrimitiveHint hint = ToPrimitiveHint::kDefault); |
1103 | 1103 |
1104 // ES6 section 7.1.3 ToNumber | 1104 // ES6 section 7.1.3 ToNumber |
1105 MUST_USE_RESULT static MaybeHandle<Object> ToNumber(Isolate* isolate, | 1105 MUST_USE_RESULT static MaybeHandle<Object> ToNumber(Handle<Object> input); |
1106 Handle<Object> input); | |
1107 | 1106 |
1108 // ES6 section 7.1.12 ToString | 1107 // ES6 section 7.1.12 ToString |
1109 MUST_USE_RESULT static MaybeHandle<String> ToString(Isolate* isolate, | 1108 MUST_USE_RESULT static MaybeHandle<String> ToString(Isolate* isolate, |
1110 Handle<Object> input); | 1109 Handle<Object> input); |
1111 | 1110 |
1112 // ES6 section 7.3.9 GetMethod | 1111 // ES6 section 7.3.9 GetMethod |
1113 MUST_USE_RESULT static MaybeHandle<Object> GetMethod( | 1112 MUST_USE_RESULT static MaybeHandle<Object> GetMethod( |
1114 Handle<JSReceiver> receiver, Handle<Name> name); | 1113 Handle<JSReceiver> receiver, Handle<Name> name); |
1115 | 1114 |
1116 // ES6 section 12.5.6 The typeof Operator | 1115 // ES6 section 12.5.6 The typeof Operator |
1117 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object); | 1116 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object); |
1118 | 1117 |
| 1118 // ES6 section 12.6 Multiplicative Operators |
| 1119 MUST_USE_RESULT static MaybeHandle<Object> Multiply( |
| 1120 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1121 Strength strength = Strength::WEAK); |
| 1122 MUST_USE_RESULT static MaybeHandle<Object> Divide( |
| 1123 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1124 Strength strength = Strength::WEAK); |
| 1125 MUST_USE_RESULT static MaybeHandle<Object> Modulus( |
| 1126 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1127 Strength strength = Strength::WEAK); |
| 1128 |
| 1129 // ES6 section 12.7 Additive Operators |
| 1130 MUST_USE_RESULT static MaybeHandle<Object> Add( |
| 1131 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1132 Strength strength = Strength::WEAK); |
| 1133 MUST_USE_RESULT static MaybeHandle<Object> Subtract( |
| 1134 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1135 Strength strength = Strength::WEAK); |
| 1136 |
| 1137 // ES6 section 12.8 Bitwise Shift Operators |
| 1138 MUST_USE_RESULT static MaybeHandle<Object> ShiftLeft( |
| 1139 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1140 Strength strength = Strength::WEAK); |
| 1141 MUST_USE_RESULT static MaybeHandle<Object> ShiftRight( |
| 1142 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1143 Strength strength = Strength::WEAK); |
| 1144 MUST_USE_RESULT static MaybeHandle<Object> ShiftRightLogical( |
| 1145 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1146 Strength strength = Strength::WEAK); |
| 1147 |
| 1148 // ES6 section 12.11 Binary Bitwise Operators |
| 1149 MUST_USE_RESULT static MaybeHandle<Object> BitwiseAnd( |
| 1150 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1151 Strength strength = Strength::WEAK); |
| 1152 MUST_USE_RESULT static MaybeHandle<Object> BitwiseOr( |
| 1153 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1154 Strength strength = Strength::WEAK); |
| 1155 MUST_USE_RESULT static MaybeHandle<Object> BitwiseXor( |
| 1156 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
| 1157 Strength strength = Strength::WEAK); |
| 1158 |
1119 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( | 1159 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( |
1120 LookupIterator* it, LanguageMode language_mode = SLOPPY); | 1160 LookupIterator* it, LanguageMode language_mode = SLOPPY); |
1121 | 1161 |
1122 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5. | 1162 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5. |
1123 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( | 1163 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( |
1124 Handle<Object> object, Handle<Name> name, Handle<Object> value, | 1164 Handle<Object> object, Handle<Name> name, Handle<Object> value, |
1125 LanguageMode language_mode, | 1165 LanguageMode language_mode, |
1126 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); | 1166 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); |
1127 | 1167 |
1128 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( | 1168 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( |
(...skipping 9285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10414 } else { | 10454 } else { |
10415 value &= ~(1 << bit_position); | 10455 value &= ~(1 << bit_position); |
10416 } | 10456 } |
10417 return value; | 10457 return value; |
10418 } | 10458 } |
10419 }; | 10459 }; |
10420 | 10460 |
10421 } } // namespace v8::internal | 10461 } } // namespace v8::internal |
10422 | 10462 |
10423 #endif // V8_OBJECTS_H_ | 10463 #endif // V8_OBJECTS_H_ |
OLD | NEW |