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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 *compare_nil_type = CompareNilICStub::StateToType(isolate_, state, map); | 381 *compare_nil_type = CompareNilICStub::StateToType(isolate_, state, map); |
382 } | 382 } |
383 } | 383 } |
384 | 384 |
385 | 385 |
386 Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) { | 386 Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) { |
387 Handle<Object> object = GetInfo(id); | 387 Handle<Object> object = GetInfo(id); |
388 if (!object->IsCode()) return handle(Type::Any(), isolate()); | 388 if (!object->IsCode()) return handle(Type::Any(), isolate()); |
389 Handle<Code> code = Handle<Code>::cast(object); | 389 Handle<Code> code = Handle<Code>::cast(object); |
390 ASSERT(code->is_unary_op_stub()); | 390 ASSERT(code->is_unary_op_stub()); |
391 return UnaryOpIC::TypeInfoToType( | 391 return UnaryOpStub(code->extra_ic_state()).GetType(isolate()); |
392 static_cast<UnaryOpIC::TypeInfo>(code->unary_op_type()), isolate()); | |
393 } | 392 } |
394 | 393 |
395 | 394 |
396 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, | 395 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, |
397 Handle<Type>* left, | 396 Handle<Type>* left, |
398 Handle<Type>* right, | 397 Handle<Type>* right, |
399 Handle<Type>* result, | 398 Handle<Type>* result, |
400 bool* has_fixed_right_arg, | 399 bool* has_fixed_right_arg, |
401 int* fixed_right_arg_value) { | 400 int* fixed_right_arg_value) { |
402 Handle<Object> object = GetInfo(id); | 401 Handle<Object> object = GetInfo(id); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 USE(maybe_result); | 683 USE(maybe_result); |
685 #ifdef DEBUG | 684 #ifdef DEBUG |
686 Object* result = NULL; | 685 Object* result = NULL; |
687 // Dictionary has been allocated with sufficient size for all elements. | 686 // Dictionary has been allocated with sufficient size for all elements. |
688 ASSERT(maybe_result->ToObject(&result)); | 687 ASSERT(maybe_result->ToObject(&result)); |
689 ASSERT(*dictionary_ == result); | 688 ASSERT(*dictionary_ == result); |
690 #endif | 689 #endif |
691 } | 690 } |
692 | 691 |
693 } } // namespace v8::internal | 692 } } // namespace v8::internal |
OLD | NEW |