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

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

Issue 6515013: Merge r6773 to 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: '' Created 9 years, 10 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/arm/macro-assembler-arm.h ('k') | src/ia32/ic-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 Label* fail) { 912 Label* fail) {
913 ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); 913 ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
914 cmp(scratch, Operand(FIRST_JS_OBJECT_TYPE)); 914 cmp(scratch, Operand(FIRST_JS_OBJECT_TYPE));
915 b(lt, fail); 915 b(lt, fail);
916 cmp(scratch, Operand(LAST_JS_OBJECT_TYPE)); 916 cmp(scratch, Operand(LAST_JS_OBJECT_TYPE));
917 b(gt, fail); 917 b(gt, fail);
918 } 918 }
919 919
920 920
921 void MacroAssembler::IsObjectJSStringType(Register object, 921 void MacroAssembler::IsObjectJSStringType(Register object,
922 Register scratch, 922 Register scratch,
923 Label* fail) { 923 Label* fail) {
924 ASSERT(kNotStringTag != 0); 924 ASSERT(kNotStringTag != 0);
925 925
926 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 926 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
927 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); 927 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
928 tst(scratch, Operand(kIsNotStringMask)); 928 tst(scratch, Operand(kIsNotStringMask));
929 b(ne, fail); 929 b(ne, fail);
930 } 930 }
931 931
932 932
933 #ifdef ENABLE_DEBUGGER_SUPPORT 933 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 } 1965 }
1966 1966
1967 1967
1968 void MacroAssembler::AbortIfNotSmi(Register object) { 1968 void MacroAssembler::AbortIfNotSmi(Register object) {
1969 STATIC_ASSERT(kSmiTag == 0); 1969 STATIC_ASSERT(kSmiTag == 0);
1970 tst(object, Operand(kSmiTagMask)); 1970 tst(object, Operand(kSmiTagMask));
1971 Assert(eq, "Operand is not smi"); 1971 Assert(eq, "Operand is not smi");
1972 } 1972 }
1973 1973
1974 1974
1975 void MacroAssembler::AbortIfNotString(Register object) {
1976 STATIC_ASSERT(kSmiTag == 0);
1977 tst(object, Operand(kSmiTagMask));
1978 Assert(ne, "Operand is not a string");
1979 push(object);
1980 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset));
1981 CompareInstanceType(object, object, FIRST_NONSTRING_TYPE);
1982 pop(object);
1983 Assert(lo, "Operand is not a string");
1984 }
1985
1986
1975 void MacroAssembler::JumpIfNotHeapNumber(Register object, 1987 void MacroAssembler::JumpIfNotHeapNumber(Register object,
1976 Register heap_number_map, 1988 Register heap_number_map,
1977 Register scratch, 1989 Register scratch,
1978 Label* on_not_heap_number) { 1990 Label* on_not_heap_number) {
1979 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 1991 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1980 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); 1992 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
1981 cmp(scratch, heap_number_map); 1993 cmp(scratch, heap_number_map);
1982 b(ne, on_not_heap_number); 1994 b(ne, on_not_heap_number);
1983 } 1995 }
1984 1996
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 2270
2259 void CodePatcher::Emit(Address addr) { 2271 void CodePatcher::Emit(Address addr) {
2260 masm()->emit(reinterpret_cast<Instr>(addr)); 2272 masm()->emit(reinterpret_cast<Instr>(addr));
2261 } 2273 }
2262 #endif // ENABLE_DEBUGGER_SUPPORT 2274 #endif // ENABLE_DEBUGGER_SUPPORT
2263 2275
2264 2276
2265 } } // namespace v8::internal 2277 } } // namespace v8::internal
2266 2278
2267 #endif // V8_TARGET_ARCH_ARM 2279 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698