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 3033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3044 // object we've reached through the prototype chain. | 3044 // object we've reached through the prototype chain. |
3045 mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset)); | 3045 mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset)); |
3046 cmp(ecx, isolate()->factory()->empty_fixed_array()); | 3046 cmp(ecx, isolate()->factory()->empty_fixed_array()); |
3047 j(not_equal, call_runtime); | 3047 j(not_equal, call_runtime); |
3048 | 3048 |
3049 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); | 3049 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); |
3050 cmp(ecx, isolate()->factory()->null_value()); | 3050 cmp(ecx, isolate()->factory()->null_value()); |
3051 j(not_equal, &next); | 3051 j(not_equal, &next); |
3052 } | 3052 } |
3053 | 3053 |
| 3054 |
| 3055 void MacroAssembler::PerformAllocationSiteInfoCheck( |
| 3056 Label* allocation_info_present) { |
| 3057 Label no_info_available; |
| 3058 // ----------- S t a t e ------------- |
| 3059 // -- edx : receiver |
| 3060 // edi is clobbered. |
| 3061 // ----------------------------------- |
| 3062 ExternalReference new_space_start = |
| 3063 ExternalReference::new_space_start(isolate()); |
| 3064 ExternalReference new_space_allocation_top = |
| 3065 ExternalReference::new_space_allocation_top_address(isolate()); |
| 3066 |
| 3067 lea(edi, Operand(edx, JSArray::kSize + AllocationSiteInfo::kSize)); |
| 3068 cmp(edi, Immediate(new_space_start)); |
| 3069 j(less, &no_info_available); |
| 3070 cmp(edi, Operand::StaticVariable(new_space_allocation_top)); |
| 3071 j(greater_equal, &no_info_available); |
| 3072 cmp(MemOperand(edi, 0), |
| 3073 Immediate(Handle<Map>(isolate()->heap()-> |
| 3074 allocation_site_info_map()))); |
| 3075 |
| 3076 // Use the j/jmp sequence below for debugging, but the j(equal) sequence |
| 3077 // for production. |
| 3078 // j(not_equal, &no_info_available); |
| 3079 // int3(); |
| 3080 // jmp(allocation_info_present); |
| 3081 // or |
| 3082 j(equal, allocation_info_present); |
| 3083 bind(&no_info_available); |
| 3084 } |
| 3085 |
| 3086 |
3054 } } // namespace v8::internal | 3087 } } // namespace v8::internal |
3055 | 3088 |
3056 #endif // V8_TARGET_ARCH_IA32 | 3089 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |