| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // found in the shared function info object. | 93 // found in the shared function info object. |
| 94 __ ldr(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); | 94 __ ldr(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); |
| 95 __ add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); | 95 __ add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 96 __ str(r3, FieldMemOperand(r0, JSFunction::kCodeEntryOffset)); | 96 __ str(r3, FieldMemOperand(r0, JSFunction::kCodeEntryOffset)); |
| 97 | 97 |
| 98 // Return result. The argument function info has been popped already. | 98 // Return result. The argument function info has been popped already. |
| 99 __ Ret(); | 99 __ Ret(); |
| 100 | 100 |
| 101 // Create a new closure through the slower runtime call. | 101 // Create a new closure through the slower runtime call. |
| 102 __ bind(&gc); | 102 __ bind(&gc); |
| 103 __ Push(cp, r3); | 103 __ LoadRoot(r4, Heap::kFalseValueRootIndex); |
| 104 __ TailCallRuntime(Runtime::kNewClosure, 2, 1); | 104 __ Push(cp, r3, r4); |
| 105 __ TailCallRuntime(Runtime::kNewClosure, 3, 1); |
| 105 } | 106 } |
| 106 | 107 |
| 107 | 108 |
| 108 void FastNewContextStub::Generate(MacroAssembler* masm) { | 109 void FastNewContextStub::Generate(MacroAssembler* masm) { |
| 109 // Try to allocate the context in new space. | 110 // Try to allocate the context in new space. |
| 110 Label gc; | 111 Label gc; |
| 111 int length = slots_ + Context::MIN_CONTEXT_SLOTS; | 112 int length = slots_ + Context::MIN_CONTEXT_SLOTS; |
| 112 | 113 |
| 113 // Attempt to allocate the context in new space. | 114 // Attempt to allocate the context in new space. |
| 114 __ AllocateInNewSpace(FixedArray::SizeFor(length), | 115 __ AllocateInNewSpace(FixedArray::SizeFor(length), |
| (...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4718 __ bind(&string_add_runtime); | 4719 __ bind(&string_add_runtime); |
| 4719 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 4720 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
| 4720 } | 4721 } |
| 4721 | 4722 |
| 4722 | 4723 |
| 4723 #undef __ | 4724 #undef __ |
| 4724 | 4725 |
| 4725 } } // namespace v8::internal | 4726 } } // namespace v8::internal |
| 4726 | 4727 |
| 4727 #endif // V8_TARGET_ARCH_ARM | 4728 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |