Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: src/mips/builtins-mips.cc

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 __ Addu(s0, a0, num_extra_args + 1); 72 __ Addu(s0, a0, num_extra_args + 1);
73 __ sll(s1, s0, kPointerSizeLog2); 73 __ sll(s1, s0, kPointerSizeLog2);
74 __ Subu(s1, s1, kPointerSize); 74 __ Subu(s1, s1, kPointerSize);
75 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); 75 __ JumpToExternalReference(ExternalReference(id, masm->isolate()));
76 } 76 }
77 77
78 78
79 // Load the built-in InternalArray function from the current context. 79 // Load the built-in InternalArray function from the current context.
80 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, 80 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm,
81 Register result) { 81 Register result) {
82 // Load the native context. 82 // Load the global context.
83 83
84 __ lw(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
84 __ lw(result, 85 __ lw(result,
85 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 86 FieldMemOperand(result, GlobalObject::kGlobalContextOffset));
86 __ lw(result, 87 // Load the InternalArray function from the global context.
87 FieldMemOperand(result, GlobalObject::kNativeContextOffset));
88 // Load the InternalArray function from the native context.
89 __ lw(result, 88 __ lw(result,
90 MemOperand(result, 89 MemOperand(result,
91 Context::SlotOffset( 90 Context::SlotOffset(
92 Context::INTERNAL_ARRAY_FUNCTION_INDEX))); 91 Context::INTERNAL_ARRAY_FUNCTION_INDEX)));
93 } 92 }
94 93
95 94
96 // Load the built-in Array function from the current context. 95 // Load the built-in Array function from the current context.
97 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { 96 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) {
98 // Load the native context. 97 // Load the global context.
99 98
99 __ lw(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
100 __ lw(result, 100 __ lw(result,
101 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 101 FieldMemOperand(result, GlobalObject::kGlobalContextOffset));
102 __ lw(result, 102 // Load the Array function from the global context.
103 FieldMemOperand(result, GlobalObject::kNativeContextOffset));
104 // Load the Array function from the native context.
105 __ lw(result, 103 __ lw(result,
106 MemOperand(result, 104 MemOperand(result,
107 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); 105 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
108 } 106 }
109 107
110 108
111 // Allocate an empty JSArray. The allocated array is put into the result 109 // Allocate an empty JSArray. The allocated array is put into the result
112 // register. An elements backing store is allocated with size initial_capacity 110 // register. An elements backing store is allocated with size initial_capacity
113 // and filled with the hole values. 111 // and filled with the hole values.
114 static void AllocateEmptyJSArray(MacroAssembler* masm, 112 static void AllocateEmptyJSArray(MacroAssembler* masm,
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 __ sll(at, a0, kPointerSizeLog2); 1423 __ sll(at, a0, kPointerSizeLog2);
1426 __ addu(at, sp, at); 1424 __ addu(at, sp, at);
1427 __ lw(a1, MemOperand(at)); 1425 __ lw(a1, MemOperand(at));
1428 __ li(t0, Operand(0, RelocInfo::NONE)); 1426 __ li(t0, Operand(0, RelocInfo::NONE));
1429 __ Branch(&patch_receiver); 1427 __ Branch(&patch_receiver);
1430 1428
1431 // Use the global receiver object from the called function as the 1429 // Use the global receiver object from the called function as the
1432 // receiver. 1430 // receiver.
1433 __ bind(&use_global_receiver); 1431 __ bind(&use_global_receiver);
1434 const int kGlobalIndex = 1432 const int kGlobalIndex =
1435 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; 1433 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize;
1436 __ lw(a2, FieldMemOperand(cp, kGlobalIndex)); 1434 __ lw(a2, FieldMemOperand(cp, kGlobalIndex));
1437 __ lw(a2, FieldMemOperand(a2, GlobalObject::kNativeContextOffset)); 1435 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalContextOffset));
1438 __ lw(a2, FieldMemOperand(a2, kGlobalIndex)); 1436 __ lw(a2, FieldMemOperand(a2, kGlobalIndex));
1439 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset)); 1437 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset));
1440 1438
1441 __ bind(&patch_receiver); 1439 __ bind(&patch_receiver);
1442 __ sll(at, a0, kPointerSizeLog2); 1440 __ sll(at, a0, kPointerSizeLog2);
1443 __ addu(a3, sp, at); 1441 __ addu(a3, sp, at);
1444 __ sw(a2, MemOperand(a3, -kPointerSize)); 1442 __ sw(a2, MemOperand(a3, -kPointerSize));
1445 1443
1446 __ Branch(&shift_arguments); 1444 __ Branch(&shift_arguments);
1447 } 1445 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 // a0: receiver 1616 // a0: receiver
1619 __ bind(&call_to_object); 1617 __ bind(&call_to_object);
1620 __ push(a0); 1618 __ push(a0);
1621 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); 1619 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
1622 __ mov(a0, v0); // Put object in a0 to match other paths to push_receiver. 1620 __ mov(a0, v0); // Put object in a0 to match other paths to push_receiver.
1623 __ Branch(&push_receiver); 1621 __ Branch(&push_receiver);
1624 1622
1625 // Use the current global receiver object as the receiver. 1623 // Use the current global receiver object as the receiver.
1626 __ bind(&use_global_receiver); 1624 __ bind(&use_global_receiver);
1627 const int kGlobalOffset = 1625 const int kGlobalOffset =
1628 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; 1626 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize;
1629 __ lw(a0, FieldMemOperand(cp, kGlobalOffset)); 1627 __ lw(a0, FieldMemOperand(cp, kGlobalOffset));
1630 __ lw(a0, FieldMemOperand(a0, GlobalObject::kNativeContextOffset)); 1628 __ lw(a0, FieldMemOperand(a0, GlobalObject::kGlobalContextOffset));
1631 __ lw(a0, FieldMemOperand(a0, kGlobalOffset)); 1629 __ lw(a0, FieldMemOperand(a0, kGlobalOffset));
1632 __ lw(a0, FieldMemOperand(a0, GlobalObject::kGlobalReceiverOffset)); 1630 __ lw(a0, FieldMemOperand(a0, GlobalObject::kGlobalReceiverOffset));
1633 1631
1634 // Push the receiver. 1632 // Push the receiver.
1635 // a0: receiver 1633 // a0: receiver
1636 __ bind(&push_receiver); 1634 __ bind(&push_receiver);
1637 __ push(a0); 1635 __ push(a0);
1638 1636
1639 // Copy all arguments from the array to the stack. 1637 // Copy all arguments from the array to the stack.
1640 Label entry, loop; 1638 Label entry, loop;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1836 __ bind(&dont_adapt_arguments); 1834 __ bind(&dont_adapt_arguments);
1837 __ Jump(a3); 1835 __ Jump(a3);
1838 } 1836 }
1839 1837
1840 1838
1841 #undef __ 1839 #undef __
1842 1840
1843 } } // namespace v8::internal 1841 } } // namespace v8::internal
1844 1842
1845 #endif // V8_TARGET_ARCH_MIPS 1843 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698