| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3489 Immediate(1 << Map::kIsUndetectable)); | 3489 Immediate(1 << Map::kIsUndetectable)); |
| 3490 final_branch_condition = not_zero; | 3490 final_branch_condition = not_zero; |
| 3491 | 3491 |
| 3492 } else if (type_name->Equals(Heap::function_symbol())) { | 3492 } else if (type_name->Equals(Heap::function_symbol())) { |
| 3493 __ JumpIfSmi(input, false_label); | 3493 __ JumpIfSmi(input, false_label); |
| 3494 __ CmpObjectType(input, FIRST_FUNCTION_CLASS_TYPE, input); | 3494 __ CmpObjectType(input, FIRST_FUNCTION_CLASS_TYPE, input); |
| 3495 final_branch_condition = above_equal; | 3495 final_branch_condition = above_equal; |
| 3496 | 3496 |
| 3497 } else if (type_name->Equals(Heap::object_symbol())) { | 3497 } else if (type_name->Equals(Heap::object_symbol())) { |
| 3498 __ JumpIfSmi(input, false_label); | 3498 __ JumpIfSmi(input, false_label); |
| 3499 __ Cmp(input, Factory::null_value()); | 3499 __ CompareRoot(input, Heap::kNullValueRootIndex); |
| 3500 __ j(equal, true_label); | 3500 __ j(equal, true_label); |
| 3501 __ CmpObjectType(input, FIRST_JS_OBJECT_TYPE, input); |
| 3502 __ j(below, false_label); |
| 3503 __ CmpInstanceType(input, FIRST_FUNCTION_CLASS_TYPE); |
| 3504 __ j(above_equal, false_label); |
| 3501 // Check for undetectable objects => false. | 3505 // Check for undetectable objects => false. |
| 3502 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 3506 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
| 3503 Immediate(1 << Map::kIsUndetectable)); | 3507 Immediate(1 << Map::kIsUndetectable)); |
| 3504 __ j(not_zero, false_label); | 3508 final_branch_condition = zero; |
| 3505 // Check for JS objects that are not RegExp or Function => true. | |
| 3506 __ CmpInstanceType(input, FIRST_JS_OBJECT_TYPE); | |
| 3507 __ j(below, false_label); | |
| 3508 __ CmpInstanceType(input, FIRST_FUNCTION_CLASS_TYPE); | |
| 3509 final_branch_condition = below_equal; | |
| 3510 | 3509 |
| 3511 } else { | 3510 } else { |
| 3512 final_branch_condition = never; | 3511 final_branch_condition = never; |
| 3513 __ jmp(false_label); | 3512 __ jmp(false_label); |
| 3514 } | 3513 } |
| 3515 | 3514 |
| 3516 return final_branch_condition; | 3515 return final_branch_condition; |
| 3517 } | 3516 } |
| 3518 | 3517 |
| 3519 | 3518 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3636 RegisterEnvironmentForDeoptimization(environment); | 3635 RegisterEnvironmentForDeoptimization(environment); |
| 3637 ASSERT(osr_pc_offset_ == -1); | 3636 ASSERT(osr_pc_offset_ == -1); |
| 3638 osr_pc_offset_ = masm()->pc_offset(); | 3637 osr_pc_offset_ = masm()->pc_offset(); |
| 3639 } | 3638 } |
| 3640 | 3639 |
| 3641 #undef __ | 3640 #undef __ |
| 3642 | 3641 |
| 3643 } } // namespace v8::internal | 3642 } } // namespace v8::internal |
| 3644 | 3643 |
| 3645 #endif // V8_TARGET_ARCH_X64 | 3644 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |