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 11 matching lines...) Expand all Loading... |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 | 28 |
29 | 29 |
30 #include "v8.h" | 30 #include "v8.h" |
31 | 31 |
32 #if defined(V8_TARGET_ARCH_MIPS) | 32 #if V8_TARGET_ARCH_MIPS |
33 | 33 |
34 #include "codegen.h" | 34 #include "codegen.h" |
35 #include "debug.h" | 35 #include "debug.h" |
36 #include "deoptimizer.h" | 36 #include "deoptimizer.h" |
37 #include "full-codegen.h" | 37 #include "full-codegen.h" |
38 #include "runtime.h" | 38 #include "runtime.h" |
39 | 39 |
40 namespace v8 { | 40 namespace v8 { |
41 namespace internal { | 41 namespace internal { |
42 | 42 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 __ mov(argument, a0); | 266 __ mov(argument, a0); |
267 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); | 267 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); |
268 __ Branch(&argument_is_string); | 268 __ Branch(&argument_is_string); |
269 | 269 |
270 // Invoke the conversion builtin and put the result into a2. | 270 // Invoke the conversion builtin and put the result into a2. |
271 __ bind(&convert_argument); | 271 __ bind(&convert_argument); |
272 __ push(function); // Preserve the function. | 272 __ push(function); // Preserve the function. |
273 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); | 273 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); |
274 { | 274 { |
275 FrameScope scope(masm, StackFrame::INTERNAL); | 275 FrameScope scope(masm, StackFrame::INTERNAL); |
276 __ push(v0); | 276 __ push(a0); |
277 __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); | 277 __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); |
278 } | 278 } |
279 __ pop(function); | 279 __ pop(function); |
280 __ mov(argument, v0); | 280 __ mov(argument, v0); |
281 __ Branch(&argument_is_string); | 281 __ Branch(&argument_is_string); |
282 | 282 |
283 // Load the empty string into a2, remove the receiver from the | 283 // Load the empty string into a2, remove the receiver from the |
284 // stack, and jump back to the case where the argument is a string. | 284 // stack, and jump back to the case where the argument is a string. |
285 __ bind(&no_arguments); | 285 __ bind(&no_arguments); |
286 __ LoadRoot(argument, Heap::kempty_stringRootIndex); | 286 __ LoadRoot(argument, Heap::kempty_stringRootIndex); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 bool is_construct) { | 733 bool is_construct) { |
734 // Called from JSEntryStub::GenerateBody | 734 // Called from JSEntryStub::GenerateBody |
735 | 735 |
736 // ----------- S t a t e ------------- | 736 // ----------- S t a t e ------------- |
737 // -- a0: code entry | 737 // -- a0: code entry |
738 // -- a1: function | 738 // -- a1: function |
739 // -- a2: receiver_pointer | 739 // -- a2: receiver_pointer |
740 // -- a3: argc | 740 // -- a3: argc |
741 // -- s0: argv | 741 // -- s0: argv |
742 // ----------------------------------- | 742 // ----------------------------------- |
| 743 ProfileEntryHookStub::MaybeCallEntryHook(masm); |
743 | 744 |
744 // Clear the context before we push it when entering the JS frame. | 745 // Clear the context before we push it when entering the JS frame. |
745 __ mov(cp, zero_reg); | 746 __ mov(cp, zero_reg); |
746 | 747 |
747 // Enter an internal frame. | 748 // Enter an internal frame. |
748 { | 749 { |
749 FrameScope scope(masm, StackFrame::INTERNAL); | 750 FrameScope scope(masm, StackFrame::INTERNAL); |
750 | 751 |
751 // Set up the context from the function argument. | 752 // Set up the context from the function argument. |
752 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 753 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 __ bind(&dont_adapt_arguments); | 1516 __ bind(&dont_adapt_arguments); |
1516 __ Jump(a3); | 1517 __ Jump(a3); |
1517 } | 1518 } |
1518 | 1519 |
1519 | 1520 |
1520 #undef __ | 1521 #undef __ |
1521 | 1522 |
1522 } } // namespace v8::internal | 1523 } } // namespace v8::internal |
1523 | 1524 |
1524 #endif // V8_TARGET_ARCH_MIPS | 1525 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |