| 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 4412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4423 lw(at, FieldMemOperand(scratch, offset)); | 4423 lw(at, FieldMemOperand(scratch, offset)); |
| 4424 Branch(no_map_match, ne, map_in_out, Operand(at)); | 4424 Branch(no_map_match, ne, map_in_out, Operand(at)); |
| 4425 | 4425 |
| 4426 // Use the transitioned cached map. | 4426 // Use the transitioned cached map. |
| 4427 offset = transitioned_kind * kPointerSize + | 4427 offset = transitioned_kind * kPointerSize + |
| 4428 FixedArrayBase::kHeaderSize; | 4428 FixedArrayBase::kHeaderSize; |
| 4429 lw(map_in_out, FieldMemOperand(scratch, offset)); | 4429 lw(map_in_out, FieldMemOperand(scratch, offset)); |
| 4430 } | 4430 } |
| 4431 | 4431 |
| 4432 | 4432 |
| 4433 void MacroAssembler::LoadInitialArrayMap( | |
| 4434 Register function_in, Register scratch, | |
| 4435 Register map_out, bool can_have_holes) { | |
| 4436 ASSERT(!function_in.is(map_out)); | |
| 4437 Label done; | |
| 4438 lw(map_out, FieldMemOperand(function_in, | |
| 4439 JSFunction::kPrototypeOrInitialMapOffset)); | |
| 4440 if (!FLAG_smi_only_arrays) { | |
| 4441 ElementsKind kind = can_have_holes ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS; | |
| 4442 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | |
| 4443 kind, | |
| 4444 map_out, | |
| 4445 scratch, | |
| 4446 &done); | |
| 4447 } else if (can_have_holes) { | |
| 4448 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | |
| 4449 FAST_HOLEY_SMI_ELEMENTS, | |
| 4450 map_out, | |
| 4451 scratch, | |
| 4452 &done); | |
| 4453 } | |
| 4454 bind(&done); | |
| 4455 } | |
| 4456 | |
| 4457 | |
| 4458 void MacroAssembler::LoadGlobalFunction(int index, Register function) { | 4433 void MacroAssembler::LoadGlobalFunction(int index, Register function) { |
| 4459 // Load the global or builtins object from the current context. | 4434 // Load the global or builtins object from the current context. |
| 4460 lw(function, | 4435 lw(function, |
| 4461 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 4436 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 4462 // Load the native context from the global or builtins object. | 4437 // Load the native context from the global or builtins object. |
| 4463 lw(function, FieldMemOperand(function, | 4438 lw(function, FieldMemOperand(function, |
| 4464 GlobalObject::kNativeContextOffset)); | 4439 GlobalObject::kNativeContextOffset)); |
| 4465 // Load the function from the native context. | 4440 // Load the function from the native context. |
| 4466 lw(function, MemOperand(function, Context::SlotOffset(index))); | 4441 lw(function, MemOperand(function, Context::SlotOffset(index))); |
| 4467 } | 4442 } |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5740 opcode == BGTZL); | 5715 opcode == BGTZL); |
| 5741 opcode = (cond == eq) ? BEQ : BNE; | 5716 opcode = (cond == eq) ? BEQ : BNE; |
| 5742 instr = (instr & ~kOpcodeMask) | opcode; | 5717 instr = (instr & ~kOpcodeMask) | opcode; |
| 5743 masm_.emit(instr); | 5718 masm_.emit(instr); |
| 5744 } | 5719 } |
| 5745 | 5720 |
| 5746 | 5721 |
| 5747 } } // namespace v8::internal | 5722 } } // namespace v8::internal |
| 5748 | 5723 |
| 5749 #endif // V8_TARGET_ARCH_MIPS | 5724 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |