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

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

Issue 3872003: Fix the --noinline-new flag on ARM so that it forces us into C++ code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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
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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 bind(&same_contexts); 901 bind(&same_contexts);
902 } 902 }
903 903
904 904
905 void MacroAssembler::AllocateInNewSpace(int object_size, 905 void MacroAssembler::AllocateInNewSpace(int object_size,
906 Register result, 906 Register result,
907 Register scratch1, 907 Register scratch1,
908 Register scratch2, 908 Register scratch2,
909 Label* gc_required, 909 Label* gc_required,
910 AllocationFlags flags) { 910 AllocationFlags flags) {
911 if (!FLAG_inline_new) {
912 if (FLAG_debug_code) {
913 // Trash the registers to simulate an allocation failure.
914 mov(result, Operand(0x7091));
915 mov(scratch1, Operand(0x7191));
916 mov(scratch2, Operand(0x7291));
917 }
918 jmp(gc_required);
919 return;
920 }
921
911 ASSERT(!result.is(scratch1)); 922 ASSERT(!result.is(scratch1));
912 ASSERT(!scratch1.is(scratch2)); 923 ASSERT(!scratch1.is(scratch2));
913 924
914 // Make object size into bytes. 925 // Make object size into bytes.
915 if ((flags & SIZE_IN_WORDS) != 0) { 926 if ((flags & SIZE_IN_WORDS) != 0) {
916 object_size *= kPointerSize; 927 object_size *= kPointerSize;
917 } 928 }
918 ASSERT_EQ(0, object_size & kObjectAlignmentMask); 929 ASSERT_EQ(0, object_size & kObjectAlignmentMask);
919 930
920 // Load address of new object into result and allocation top address into 931 // Load address of new object into result and allocation top address into
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 } 963 }
953 } 964 }
954 965
955 966
956 void MacroAssembler::AllocateInNewSpace(Register object_size, 967 void MacroAssembler::AllocateInNewSpace(Register object_size,
957 Register result, 968 Register result,
958 Register scratch1, 969 Register scratch1,
959 Register scratch2, 970 Register scratch2,
960 Label* gc_required, 971 Label* gc_required,
961 AllocationFlags flags) { 972 AllocationFlags flags) {
973 if (!FLAG_inline_new) {
974 if (FLAG_debug_code) {
975 // Trash the registers to simulate an allocation failure.
976 mov(result, Operand(0x7091));
977 mov(scratch1, Operand(0x7191));
978 mov(scratch2, Operand(0x7291));
979 }
980 jmp(gc_required);
981 return;
982 }
983
962 ASSERT(!result.is(scratch1)); 984 ASSERT(!result.is(scratch1));
963 ASSERT(!scratch1.is(scratch2)); 985 ASSERT(!scratch1.is(scratch2));
964 986
965 // Load address of new object into result and allocation top address into 987 // Load address of new object into result and allocation top address into
966 // scratch1. 988 // scratch1.
967 ExternalReference new_space_allocation_top = 989 ExternalReference new_space_allocation_top =
968 ExternalReference::new_space_allocation_top_address(); 990 ExternalReference::new_space_allocation_top_address();
969 mov(scratch1, Operand(new_space_allocation_top)); 991 mov(scratch1, Operand(new_space_allocation_top));
970 if ((flags & RESULT_CONTAINS_TOP) == 0) { 992 if ((flags & RESULT_CONTAINS_TOP) == 0) {
971 ldr(result, MemOperand(scratch1)); 993 ldr(result, MemOperand(scratch1));
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 1975
1954 void CodePatcher::Emit(Address addr) { 1976 void CodePatcher::Emit(Address addr) {
1955 masm()->emit(reinterpret_cast<Instr>(addr)); 1977 masm()->emit(reinterpret_cast<Instr>(addr));
1956 } 1978 }
1957 #endif // ENABLE_DEBUGGER_SUPPORT 1979 #endif // ENABLE_DEBUGGER_SUPPORT
1958 1980
1959 1981
1960 } } // namespace v8::internal 1982 } } // namespace v8::internal
1961 1983
1962 #endif // V8_TARGET_ARCH_ARM 1984 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« src/arm/codegen-arm.cc ('K') | « src/arm/ic-arm.cc ('k') | test/mjsunit/math-min-max.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698