OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 5801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5812 DCHECK(!environment->HasBeenRegistered()); | 5812 DCHECK(!environment->HasBeenRegistered()); |
5813 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 5813 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
5814 | 5814 |
5815 GenerateOsrPrologue(); | 5815 GenerateOsrPrologue(); |
5816 } | 5816 } |
5817 | 5817 |
5818 | 5818 |
5819 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 5819 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
5820 Register result = ToRegister(instr->result()); | 5820 Register result = ToRegister(instr->result()); |
5821 Register object = ToRegister(instr->object()); | 5821 Register object = ToRegister(instr->object()); |
5822 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | |
5823 DeoptimizeIf(eq, instr, Deoptimizer::kUndefined, object, Operand(at)); | |
5824 | |
5825 Register null_value = t1; | |
5826 __ LoadRoot(null_value, Heap::kNullValueRootIndex); | |
5827 DeoptimizeIf(eq, instr, Deoptimizer::kNull, object, Operand(null_value)); | |
5828 | |
5829 __ And(at, object, kSmiTagMask); | 5822 __ And(at, object, kSmiTagMask); |
5830 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); | 5823 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); |
5831 | 5824 |
5832 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 5825 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
5833 __ GetObjectType(object, a1, a1); | 5826 __ GetObjectType(object, a1, a1); |
5834 DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject, a1, | 5827 DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject, a1, |
5835 Operand(LAST_JS_PROXY_TYPE)); | 5828 Operand(LAST_JS_PROXY_TYPE)); |
5836 | 5829 |
5837 Label use_cache, call_runtime; | 5830 Label use_cache, call_runtime; |
5838 DCHECK(object.is(a0)); | 5831 DCHECK(object.is(a0)); |
| 5832 Register null_value = t1; |
| 5833 __ LoadRoot(null_value, Heap::kNullValueRootIndex); |
5839 __ CheckEnumCache(null_value, &call_runtime); | 5834 __ CheckEnumCache(null_value, &call_runtime); |
5840 | 5835 |
5841 __ lw(result, FieldMemOperand(object, HeapObject::kMapOffset)); | 5836 __ lw(result, FieldMemOperand(object, HeapObject::kMapOffset)); |
5842 __ Branch(&use_cache); | 5837 __ Branch(&use_cache); |
5843 | 5838 |
5844 // Get the set of properties to enumerate. | 5839 // Get the set of properties to enumerate. |
5845 __ bind(&call_runtime); | 5840 __ bind(&call_runtime); |
5846 __ push(object); | 5841 __ push(object); |
5847 CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr); | 5842 CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr); |
5848 | 5843 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5969 __ li(at, scope_info); | 5964 __ li(at, scope_info); |
5970 __ Push(at, ToRegister(instr->function())); | 5965 __ Push(at, ToRegister(instr->function())); |
5971 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5966 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5972 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5967 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5973 } | 5968 } |
5974 | 5969 |
5975 | 5970 |
5976 #undef __ | 5971 #undef __ |
5977 | 5972 |
5978 } } // namespace v8::internal | 5973 } } // namespace v8::internal |
OLD | NEW |