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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 5322009: Implement string constructor stub on ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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/arm/macro-assembler-arm.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 } 1686 }
1687 // The context may be an intermediate context, not a function context. 1687 // The context may be an intermediate context, not a function context.
1688 ldr(dst, MemOperand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX))); 1688 ldr(dst, MemOperand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX)));
1689 } else { // Slot is in the current function context. 1689 } else { // Slot is in the current function context.
1690 // The context may be an intermediate context, not a function context. 1690 // The context may be an intermediate context, not a function context.
1691 ldr(dst, MemOperand(cp, Context::SlotOffset(Context::FCONTEXT_INDEX))); 1691 ldr(dst, MemOperand(cp, Context::SlotOffset(Context::FCONTEXT_INDEX)));
1692 } 1692 }
1693 } 1693 }
1694 1694
1695 1695
1696 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
1697 // Load the global or builtins object from the current context.
1698 ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
1699 // Load the global context from the global or builtins object.
1700 ldr(function, FieldMemOperand(function,
1701 GlobalObject::kGlobalContextOffset));
1702 // Load the function from the global context.
1703 ldr(function, MemOperand(function, Context::SlotOffset(index)));
1704 }
1705
1706
1707 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
1708 Register map,
1709 Register scratch) {
1710 // Load the initial map. The global functions all have initial maps.
1711 ldr(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
1712 if (FLAG_debug_code) {
1713 Label ok, fail;
1714 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, false);
1715 b(&ok);
1716 bind(&fail);
1717 Abort("Global functions must have initial map");
1718 bind(&ok);
1719 }
1720 }
1721
1722
1696 void MacroAssembler::JumpIfNotBothSmi(Register reg1, 1723 void MacroAssembler::JumpIfNotBothSmi(Register reg1,
1697 Register reg2, 1724 Register reg2,
1698 Label* on_not_both_smi) { 1725 Label* on_not_both_smi) {
1699 ASSERT_EQ(0, kSmiTag); 1726 ASSERT_EQ(0, kSmiTag);
1700 tst(reg1, Operand(kSmiTagMask)); 1727 tst(reg1, Operand(kSmiTagMask));
1701 tst(reg2, Operand(kSmiTagMask), eq); 1728 tst(reg2, Operand(kSmiTagMask), eq);
1702 b(ne, on_not_both_smi); 1729 b(ne, on_not_both_smi);
1703 } 1730 }
1704 1731
1705 1732
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 2002
1976 void CodePatcher::Emit(Address addr) { 2003 void CodePatcher::Emit(Address addr) {
1977 masm()->emit(reinterpret_cast<Instr>(addr)); 2004 masm()->emit(reinterpret_cast<Instr>(addr));
1978 } 2005 }
1979 #endif // ENABLE_DEBUGGER_SUPPORT 2006 #endif // ENABLE_DEBUGGER_SUPPORT
1980 2007
1981 2008
1982 } } // namespace v8::internal 2009 } } // namespace v8::internal
1983 2010
1984 #endif // V8_TARGET_ARCH_ARM 2011 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698