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 4091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4102 &throw_termination_exception, | 4102 &throw_termination_exception, |
4103 &throw_out_of_memory_exception, | 4103 &throw_out_of_memory_exception, |
4104 true, | 4104 true, |
4105 true); | 4105 true); |
4106 | 4106 |
4107 __ bind(&throw_out_of_memory_exception); | 4107 __ bind(&throw_out_of_memory_exception); |
4108 // Set external caught exception to false. | 4108 // Set external caught exception to false. |
4109 Isolate* isolate = masm->isolate(); | 4109 Isolate* isolate = masm->isolate(); |
4110 ExternalReference external_caught(Isolate::kExternalCaughtExceptionAddress, | 4110 ExternalReference external_caught(Isolate::kExternalCaughtExceptionAddress, |
4111 isolate); | 4111 isolate); |
4112 __ li(a0, Operand(false, RelocInfo::NONE)); | 4112 __ li(a0, Operand(false, RelocInfo::NONE32)); |
4113 __ li(a2, Operand(external_caught)); | 4113 __ li(a2, Operand(external_caught)); |
4114 __ sw(a0, MemOperand(a2)); | 4114 __ sw(a0, MemOperand(a2)); |
4115 | 4115 |
4116 // Set pending exception and v0 to out of memory exception. | 4116 // Set pending exception and v0 to out of memory exception. |
4117 Failure* out_of_memory = Failure::OutOfMemoryException(); | 4117 Failure* out_of_memory = Failure::OutOfMemoryException(); |
4118 __ li(v0, Operand(reinterpret_cast<int32_t>(out_of_memory))); | 4118 __ li(v0, Operand(reinterpret_cast<int32_t>(out_of_memory))); |
4119 __ li(a2, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | 4119 __ li(a2, Operand(ExternalReference(Isolate::kPendingExceptionAddress, |
4120 isolate))); | 4120 isolate))); |
4121 __ sw(v0, MemOperand(a2)); | 4121 __ sw(v0, MemOperand(a2)); |
4122 // Fall through to the next label. | 4122 // Fall through to the next label. |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5531 // non-function case. MegamorphicSentinel is an immortal immovable | 5531 // non-function case. MegamorphicSentinel is an immortal immovable |
5532 // object (undefined) so no write barrier is needed. | 5532 // object (undefined) so no write barrier is needed. |
5533 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), | 5533 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), |
5534 masm->isolate()->heap()->undefined_value()); | 5534 masm->isolate()->heap()->undefined_value()); |
5535 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5535 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
5536 __ sw(at, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); | 5536 __ sw(at, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); |
5537 } | 5537 } |
5538 // Check for function proxy. | 5538 // Check for function proxy. |
5539 __ Branch(&non_function, ne, a3, Operand(JS_FUNCTION_PROXY_TYPE)); | 5539 __ Branch(&non_function, ne, a3, Operand(JS_FUNCTION_PROXY_TYPE)); |
5540 __ push(a1); // Put proxy as additional argument. | 5540 __ push(a1); // Put proxy as additional argument. |
5541 __ li(a0, Operand(argc_ + 1, RelocInfo::NONE)); | 5541 __ li(a0, Operand(argc_ + 1, RelocInfo::NONE32)); |
5542 __ li(a2, Operand(0, RelocInfo::NONE)); | 5542 __ li(a2, Operand(0, RelocInfo::NONE32)); |
5543 __ GetBuiltinEntry(a3, Builtins::CALL_FUNCTION_PROXY); | 5543 __ GetBuiltinEntry(a3, Builtins::CALL_FUNCTION_PROXY); |
5544 __ SetCallKind(t1, CALL_AS_METHOD); | 5544 __ SetCallKind(t1, CALL_AS_METHOD); |
5545 { | 5545 { |
5546 Handle<Code> adaptor = | 5546 Handle<Code> adaptor = |
5547 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); | 5547 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); |
5548 __ Jump(adaptor, RelocInfo::CODE_TARGET); | 5548 __ Jump(adaptor, RelocInfo::CODE_TARGET); |
5549 } | 5549 } |
5550 | 5550 |
5551 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead | 5551 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead |
5552 // of the original receiver from the call site). | 5552 // of the original receiver from the call site). |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5589 Label do_call; | 5589 Label do_call; |
5590 __ bind(&slow); | 5590 __ bind(&slow); |
5591 __ Branch(&non_function_call, ne, a3, Operand(JS_FUNCTION_PROXY_TYPE)); | 5591 __ Branch(&non_function_call, ne, a3, Operand(JS_FUNCTION_PROXY_TYPE)); |
5592 __ GetBuiltinEntry(a3, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR); | 5592 __ GetBuiltinEntry(a3, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR); |
5593 __ jmp(&do_call); | 5593 __ jmp(&do_call); |
5594 | 5594 |
5595 __ bind(&non_function_call); | 5595 __ bind(&non_function_call); |
5596 __ GetBuiltinEntry(a3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); | 5596 __ GetBuiltinEntry(a3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); |
5597 __ bind(&do_call); | 5597 __ bind(&do_call); |
5598 // Set expected number of arguments to zero (not changing r0). | 5598 // Set expected number of arguments to zero (not changing r0). |
5599 __ li(a2, Operand(0, RelocInfo::NONE)); | 5599 __ li(a2, Operand(0, RelocInfo::NONE32)); |
5600 __ SetCallKind(t1, CALL_AS_METHOD); | 5600 __ SetCallKind(t1, CALL_AS_METHOD); |
5601 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 5601 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
5602 RelocInfo::CODE_TARGET); | 5602 RelocInfo::CODE_TARGET); |
5603 } | 5603 } |
5604 | 5604 |
5605 | 5605 |
5606 // StringCharCodeAtGenerator. | 5606 // StringCharCodeAtGenerator. |
5607 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 5607 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
5608 Label flat_string; | 5608 Label flat_string; |
5609 Label ascii_string; | 5609 Label ascii_string; |
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7813 __ Pop(ra, t1, a1); | 7813 __ Pop(ra, t1, a1); |
7814 __ Ret(); | 7814 __ Ret(); |
7815 } | 7815 } |
7816 | 7816 |
7817 | 7817 |
7818 #undef __ | 7818 #undef __ |
7819 | 7819 |
7820 } } // namespace v8::internal | 7820 } } // namespace v8::internal |
7821 | 7821 |
7822 #endif // V8_TARGET_ARCH_MIPS | 7822 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |