| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 Label convert, done_convert; | 739 Label convert, done_convert; |
| 740 __ JumpIfSmi(rax, &convert); | 740 __ JumpIfSmi(rax, &convert); |
| 741 __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rcx); | 741 __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rcx); |
| 742 __ j(above_equal, &done_convert); | 742 __ j(above_equal, &done_convert); |
| 743 __ bind(&convert); | 743 __ bind(&convert); |
| 744 __ push(rax); | 744 __ push(rax); |
| 745 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 745 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
| 746 __ bind(&done_convert); | 746 __ bind(&done_convert); |
| 747 __ push(rax); | 747 __ push(rax); |
| 748 | 748 |
| 749 // TODO(kasperl): Check cache validity in generated code. This is a | 749 // BUG(867): Check cache validity in generated code. This is a fast |
| 750 // fast case for the JSObject::IsSimpleEnum cache validity | 750 // case for the JSObject::IsSimpleEnum cache validity checks. If we |
| 751 // checks. If we cannot guarantee cache validity, call the runtime | 751 // cannot guarantee cache validity, call the runtime system to check |
| 752 // system to check cache validity or get the property names in a | 752 // cache validity or get the property names in a fixed array. |
| 753 // fixed array. | |
| 754 | 753 |
| 755 // Get the set of properties to enumerate. | 754 // Get the set of properties to enumerate. |
| 756 __ push(rax); // Duplicate the enumerable object on the stack. | 755 __ push(rax); // Duplicate the enumerable object on the stack. |
| 757 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); | 756 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); |
| 758 | 757 |
| 759 // If we got a map from the runtime call, we can do a fast | 758 // If we got a map from the runtime call, we can do a fast |
| 760 // modification check. Otherwise, we got a fixed array, and we have | 759 // modification check. Otherwise, we got a fixed array, and we have |
| 761 // to do a slow check. | 760 // to do a slow check. |
| 762 Label fixed_array; | 761 Label fixed_array; |
| 763 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), | 762 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), |
| (...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3468 __ ret(0); | 3467 __ ret(0); |
| 3469 } | 3468 } |
| 3470 | 3469 |
| 3471 | 3470 |
| 3472 #undef __ | 3471 #undef __ |
| 3473 | 3472 |
| 3474 | 3473 |
| 3475 } } // namespace v8::internal | 3474 } } // namespace v8::internal |
| 3476 | 3475 |
| 3477 #endif // V8_TARGET_ARCH_X64 | 3476 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |