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 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2027 // root array to force relocation to be able to later patch with | 2027 // root array to force relocation to be able to later patch with |
2028 // the cached map. | 2028 // the cached map. |
2029 Handle<JSGlobalPropertyCell> cell = | 2029 Handle<JSGlobalPropertyCell> cell = |
2030 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value()); | 2030 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value()); |
2031 __ li(at, Operand(Handle<Object>(cell))); | 2031 __ li(at, Operand(Handle<Object>(cell))); |
2032 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); | 2032 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); |
2033 __ Branch(&cache_miss, ne, map, Operand(at)); | 2033 __ Branch(&cache_miss, ne, map, Operand(at)); |
2034 // We use Factory::the_hole_value() on purpose instead of loading from the | 2034 // We use Factory::the_hole_value() on purpose instead of loading from the |
2035 // root array to force relocation to be able to later patch | 2035 // root array to force relocation to be able to later patch |
2036 // with true or false. | 2036 // with true or false. |
2037 __ li(result, Operand(factory()->the_hole_value()), true); | 2037 __ li(result, Operand(factory()->the_hole_value()), CONSTANT_SIZE); |
2038 __ Branch(&done); | 2038 __ Branch(&done); |
2039 | 2039 |
2040 // The inlined call site cache did not match. Check null and string before | 2040 // The inlined call site cache did not match. Check null and string before |
2041 // calling the deferred code. | 2041 // calling the deferred code. |
2042 __ bind(&cache_miss); | 2042 __ bind(&cache_miss); |
2043 // Null is not instance of anything. | 2043 // Null is not instance of anything. |
2044 __ LoadRoot(temp, Heap::kNullValueRootIndex); | 2044 __ LoadRoot(temp, Heap::kNullValueRootIndex); |
2045 __ Branch(&false_result, eq, object, Operand(temp)); | 2045 __ Branch(&false_result, eq, object, Operand(temp)); |
2046 | 2046 |
2047 // String values is not instance of anything. | 2047 // String values is not instance of anything. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2082 // offset to the location of the map check. | 2082 // offset to the location of the map check. |
2083 Register temp = ToRegister(instr->TempAt(0)); | 2083 Register temp = ToRegister(instr->TempAt(0)); |
2084 ASSERT(temp.is(t0)); | 2084 ASSERT(temp.is(t0)); |
2085 __ LoadHeapObject(InstanceofStub::right(), instr->function()); | 2085 __ LoadHeapObject(InstanceofStub::right(), instr->function()); |
2086 static const int kAdditionalDelta = 7; | 2086 static const int kAdditionalDelta = 7; |
2087 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; | 2087 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; |
2088 Label before_push_delta; | 2088 Label before_push_delta; |
2089 __ bind(&before_push_delta); | 2089 __ bind(&before_push_delta); |
2090 { | 2090 { |
2091 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); | 2091 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); |
2092 __ li(temp, Operand(delta * kPointerSize), true); | 2092 __ li(temp, Operand(delta * kPointerSize), CONSTANT_SIZE); |
2093 __ StoreToSafepointRegisterSlot(temp, temp); | 2093 __ StoreToSafepointRegisterSlot(temp, temp); |
2094 } | 2094 } |
2095 CallCodeGeneric(stub.GetCode(), | 2095 CallCodeGeneric(stub.GetCode(), |
2096 RelocInfo::CODE_TARGET, | 2096 RelocInfo::CODE_TARGET, |
2097 instr, | 2097 instr, |
2098 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 2098 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
2099 ASSERT(instr->HasDeoptimizationEnvironment()); | 2099 ASSERT(instr->HasDeoptimizationEnvironment()); |
2100 LEnvironment* env = instr->deoptimization_environment(); | 2100 LEnvironment* env = instr->deoptimization_environment(); |
2101 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 2101 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
2102 // Put the result value into the result register slot and | 2102 // Put the result value into the result register slot and |
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4824 ASSERT(!environment->HasBeenRegistered()); | 4824 ASSERT(!environment->HasBeenRegistered()); |
4825 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4825 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
4826 ASSERT(osr_pc_offset_ == -1); | 4826 ASSERT(osr_pc_offset_ == -1); |
4827 osr_pc_offset_ = masm()->pc_offset(); | 4827 osr_pc_offset_ = masm()->pc_offset(); |
4828 } | 4828 } |
4829 | 4829 |
4830 | 4830 |
4831 #undef __ | 4831 #undef __ |
4832 | 4832 |
4833 } } // namespace v8::internal | 4833 } } // namespace v8::internal |
OLD | NEW |