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 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3199 __ lw(cache, ContextOperand(cp, Context::GLOBAL_INDEX)); | 3199 __ lw(cache, ContextOperand(cp, Context::GLOBAL_INDEX)); |
3200 __ lw(cache, FieldMemOperand(cache, GlobalObject::kGlobalContextOffset)); | 3200 __ lw(cache, FieldMemOperand(cache, GlobalObject::kGlobalContextOffset)); |
3201 __ lw(cache, | 3201 __ lw(cache, |
3202 ContextOperand( | 3202 ContextOperand( |
3203 cache, Context::JSFUNCTION_RESULT_CACHES_INDEX)); | 3203 cache, Context::JSFUNCTION_RESULT_CACHES_INDEX)); |
3204 __ lw(cache, | 3204 __ lw(cache, |
3205 FieldMemOperand(cache, FixedArray::OffsetOfElementAt(cache_id))); | 3205 FieldMemOperand(cache, FixedArray::OffsetOfElementAt(cache_id))); |
3206 | 3206 |
3207 | 3207 |
3208 Label done, not_found; | 3208 Label done, not_found; |
3209 ASSERT(kSmiTag == 0 && kSmiTagSize == 1); | 3209 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1); |
3210 __ lw(a2, FieldMemOperand(cache, JSFunctionResultCache::kFingerOffset)); | 3210 __ lw(a2, FieldMemOperand(cache, JSFunctionResultCache::kFingerOffset)); |
3211 // a2 now holds finger offset as a smi. | 3211 // a2 now holds finger offset as a smi. |
3212 __ Addu(a3, cache, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 3212 __ Addu(a3, cache, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
3213 // a3 now points to the start of fixed array elements. | 3213 // a3 now points to the start of fixed array elements. |
3214 __ sll(at, a2, kPointerSizeLog2 - kSmiTagSize); | 3214 __ sll(at, a2, kPointerSizeLog2 - kSmiTagSize); |
3215 __ addu(a3, a3, at); | 3215 __ addu(a3, a3, at); |
3216 // a3 now points to key of indexed element of cache. | 3216 // a3 now points to key of indexed element of cache. |
3217 __ lw(a2, MemOperand(a3)); | 3217 __ lw(a2, MemOperand(a3)); |
3218 __ Branch(¬_found, ne, key, Operand(a2)); | 3218 __ Branch(¬_found, ne, key, Operand(a2)); |
3219 | 3219 |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4194 // ---------------------------------------------------------------------------- | 4194 // ---------------------------------------------------------------------------- |
4195 // Non-local control flow support. | 4195 // Non-local control flow support. |
4196 | 4196 |
4197 void FullCodeGenerator::EnterFinallyBlock() { | 4197 void FullCodeGenerator::EnterFinallyBlock() { |
4198 ASSERT(!result_register().is(a1)); | 4198 ASSERT(!result_register().is(a1)); |
4199 // Store result register while executing finally block. | 4199 // Store result register while executing finally block. |
4200 __ push(result_register()); | 4200 __ push(result_register()); |
4201 // Cook return address in link register to stack (smi encoded Code* delta). | 4201 // Cook return address in link register to stack (smi encoded Code* delta). |
4202 __ Subu(a1, ra, Operand(masm_->CodeObject())); | 4202 __ Subu(a1, ra, Operand(masm_->CodeObject())); |
4203 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 4203 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
4204 ASSERT_EQ(0, kSmiTag); | 4204 STATIC_ASSERT(0 == kSmiTag); |
4205 __ Addu(a1, a1, Operand(a1)); // Convert to smi. | 4205 __ Addu(a1, a1, Operand(a1)); // Convert to smi. |
4206 __ push(a1); | 4206 __ push(a1); |
4207 } | 4207 } |
4208 | 4208 |
4209 | 4209 |
4210 void FullCodeGenerator::ExitFinallyBlock() { | 4210 void FullCodeGenerator::ExitFinallyBlock() { |
4211 ASSERT(!result_register().is(a1)); | 4211 ASSERT(!result_register().is(a1)); |
4212 // Restore result register from stack. | 4212 // Restore result register from stack. |
4213 __ pop(a1); | 4213 __ pop(a1); |
4214 // Uncook return address and return. | 4214 // Uncook return address and return. |
4215 __ pop(result_register()); | 4215 __ pop(result_register()); |
4216 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 4216 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
4217 __ sra(a1, a1, 1); // Un-smi-tag value. | 4217 __ sra(a1, a1, 1); // Un-smi-tag value. |
4218 __ Addu(at, a1, Operand(masm_->CodeObject())); | 4218 __ Addu(at, a1, Operand(masm_->CodeObject())); |
4219 __ Jump(at); | 4219 __ Jump(at); |
4220 } | 4220 } |
4221 | 4221 |
4222 | 4222 |
4223 #undef __ | 4223 #undef __ |
4224 | 4224 |
4225 } } // namespace v8::internal | 4225 } } // namespace v8::internal |
4226 | 4226 |
4227 #endif // V8_TARGET_ARCH_MIPS | 4227 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |