| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 kPrimitive = 0x10, // 0010000 | 197 kPrimitive = 0x10, // 0010000 |
| 198 kNumber = 0x11, // 0010001 | 198 kNumber = 0x11, // 0010001 |
| 199 kInteger32 = 0x13, // 0010011 | 199 kInteger32 = 0x13, // 0010011 |
| 200 kSmi = 0x17, // 0010111 | 200 kSmi = 0x17, // 0010111 |
| 201 kDouble = 0x19, // 0011001 | 201 kDouble = 0x19, // 0011001 |
| 202 kString = 0x30, // 0110000 | 202 kString = 0x30, // 0110000 |
| 203 kSymbol = 0x32, // 0110010 | 203 kSymbol = 0x32, // 0110010 |
| 204 kNonPrimitive = 0x40, // 1000000 | 204 kNonPrimitive = 0x40, // 1000000 |
| 205 kUninitialized = 0x7f // 1111111 | 205 kUninitialized = 0x7f // 1111111 |
| 206 }; | 206 }; |
| 207 |
| 207 explicit inline TypeInfo(Type t) : type_(t) { } | 208 explicit inline TypeInfo(Type t) : type_(t) { } |
| 208 | 209 |
| 209 Type type_; | 210 Type type_; |
| 210 }; | 211 }; |
| 211 | 212 |
| 212 | 213 |
| 213 enum StringStubFeedback { | 214 enum StringStubFeedback { |
| 214 DEFAULT_STRING_STUB = 0, | 215 DEFAULT_STRING_STUB = 0, |
| 215 STRING_INDEX_OUT_OF_BOUNDS = 1 | 216 STRING_INDEX_OUT_OF_BOUNDS = 1 |
| 216 }; | 217 }; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 281 |
| 281 bool LoadIsBuiltin(Property* expr, Builtins::Name id); | 282 bool LoadIsBuiltin(Property* expr, Builtins::Name id); |
| 282 | 283 |
| 283 // TODO(1571) We can't use ToBooleanStub::Types as the return value because | 284 // TODO(1571) We can't use ToBooleanStub::Types as the return value because |
| 284 // of various cylces in our headers. Death to tons of implementations in | 285 // of various cylces in our headers. Death to tons of implementations in |
| 285 // headers!! :-P | 286 // headers!! :-P |
| 286 byte ToBooleanTypes(TypeFeedbackId ast_id); | 287 byte ToBooleanTypes(TypeFeedbackId ast_id); |
| 287 | 288 |
| 288 // Get type information for arithmetic operations and compares. | 289 // Get type information for arithmetic operations and compares. |
| 289 TypeInfo UnaryType(UnaryOperation* expr); | 290 TypeInfo UnaryType(UnaryOperation* expr); |
| 290 TypeInfo BinaryType(BinaryOperation* expr); | 291 void BinaryType(BinaryOperation* expr, |
| 291 TypeInfo CompareType(CompareOperation* expr); | 292 TypeInfo* left, |
| 292 bool IsSymbolCompare(CompareOperation* expr); | 293 TypeInfo* right, |
| 294 TypeInfo* result); |
| 295 void CompareType(CompareOperation* expr, |
| 296 TypeInfo* left_type, |
| 297 TypeInfo* right_type, |
| 298 TypeInfo* overall_type); |
| 293 Handle<Map> GetCompareMap(CompareOperation* expr); | 299 Handle<Map> GetCompareMap(CompareOperation* expr); |
| 294 TypeInfo SwitchType(CaseClause* clause); | 300 TypeInfo SwitchType(CaseClause* clause); |
| 295 TypeInfo IncrementType(CountOperation* expr); | 301 TypeInfo IncrementType(CountOperation* expr); |
| 296 | 302 |
| 297 Zone* zone() const { return zone_; } | 303 Zone* zone() const { return zone_; } |
| 298 | 304 |
| 299 private: | 305 private: |
| 300 void CollectReceiverTypes(TypeFeedbackId ast_id, | 306 void CollectReceiverTypes(TypeFeedbackId ast_id, |
| 301 Handle<String> name, | 307 Handle<String> name, |
| 302 Code::Flags flags, | 308 Code::Flags flags, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 321 Isolate* isolate_; | 327 Isolate* isolate_; |
| 322 Handle<UnseededNumberDictionary> dictionary_; | 328 Handle<UnseededNumberDictionary> dictionary_; |
| 323 Zone* zone_; | 329 Zone* zone_; |
| 324 | 330 |
| 325 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 331 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
| 326 }; | 332 }; |
| 327 | 333 |
| 328 } } // namespace v8::internal | 334 } } // namespace v8::internal |
| 329 | 335 |
| 330 #endif // V8_TYPE_INFO_H_ | 336 #endif // V8_TYPE_INFO_H_ |
| OLD | NEW |