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 4424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4435 lw(function, | 4435 lw(function, |
4436 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 4436 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
4437 // Load the native context from the global or builtins object. | 4437 // Load the native context from the global or builtins object. |
4438 lw(function, FieldMemOperand(function, | 4438 lw(function, FieldMemOperand(function, |
4439 GlobalObject::kNativeContextOffset)); | 4439 GlobalObject::kNativeContextOffset)); |
4440 // Load the function from the native context. | 4440 // Load the function from the native context. |
4441 lw(function, MemOperand(function, Context::SlotOffset(index))); | 4441 lw(function, MemOperand(function, Context::SlotOffset(index))); |
4442 } | 4442 } |
4443 | 4443 |
4444 | 4444 |
4445 void MacroAssembler::LoadArrayFunction(Register function) { | |
4446 // Load the global or builtins object from the current context. | |
4447 lw(function, | |
4448 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | |
4449 // Load the global context from the global or builtins object. | |
4450 lw(function, | |
4451 FieldMemOperand(function, GlobalObject::kGlobalContextOffset)); | |
4452 // Load the array function from the native context. | |
4453 lw(function, | |
4454 MemOperand(function, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); | |
4455 } | |
4456 | |
4457 | |
4458 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, | 4445 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, |
4459 Register map, | 4446 Register map, |
4460 Register scratch) { | 4447 Register scratch) { |
4461 // Load the initial map. The global functions all have initial maps. | 4448 // Load the initial map. The global functions all have initial maps. |
4462 lw(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 4449 lw(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
4463 if (emit_debug_code()) { | 4450 if (emit_debug_code()) { |
4464 Label ok, fail; | 4451 Label ok, fail; |
4465 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); | 4452 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); |
4466 Branch(&ok); | 4453 Branch(&ok); |
4467 bind(&fail); | 4454 bind(&fail); |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5715 opcode == BGTZL); | 5702 opcode == BGTZL); |
5716 opcode = (cond == eq) ? BEQ : BNE; | 5703 opcode = (cond == eq) ? BEQ : BNE; |
5717 instr = (instr & ~kOpcodeMask) | opcode; | 5704 instr = (instr & ~kOpcodeMask) | opcode; |
5718 masm_.emit(instr); | 5705 masm_.emit(instr); |
5719 } | 5706 } |
5720 | 5707 |
5721 | 5708 |
5722 } } // namespace v8::internal | 5709 } } // namespace v8::internal |
5723 | 5710 |
5724 #endif // V8_TARGET_ARCH_MIPS | 5711 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |