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

Side by Side Diff: src/arm/ic-arm.cc

Issue 6274009: ARM: Merging constants in simulator and assembler header files and other clea... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // If this assert fails, we have to check upper bound too. 89 // If this assert fails, we have to check upper bound too.
90 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); 90 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
91 91
92 GenerateGlobalInstanceTypeCheck(masm, t1, miss); 92 GenerateGlobalInstanceTypeCheck(masm, t1, miss);
93 93
94 // Check that the global object does not require access checks. 94 // Check that the global object does not require access checks.
95 __ ldrb(t1, FieldMemOperand(t0, Map::kBitFieldOffset)); 95 __ ldrb(t1, FieldMemOperand(t0, Map::kBitFieldOffset));
96 __ tst(t1, Operand((1 << Map::kIsAccessCheckNeeded) | 96 __ tst(t1, Operand((1 << Map::kIsAccessCheckNeeded) |
97 (1 << Map::kHasNamedInterceptor))); 97 (1 << Map::kHasNamedInterceptor)));
98 __ b(nz, miss); 98 __ b(ne, miss);
99 99
100 __ ldr(elements, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 100 __ ldr(elements, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
101 __ ldr(t1, FieldMemOperand(elements, HeapObject::kMapOffset)); 101 __ ldr(t1, FieldMemOperand(elements, HeapObject::kMapOffset));
102 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); 102 __ LoadRoot(ip, Heap::kHashTableMapRootIndex);
103 __ cmp(t1, ip); 103 __ cmp(t1, ip);
104 __ b(nz, miss); 104 __ b(ne, miss);
105 } 105 }
106 106
107 107
108 // Probe the string dictionary in the |elements| register. Jump to the 108 // Probe the string dictionary in the |elements| register. Jump to the
109 // |done| label if a property with the given name is found. Jump to 109 // |done| label if a property with the given name is found. Jump to
110 // the |miss| label otherwise. 110 // the |miss| label otherwise.
111 static void GenerateStringDictionaryProbes(MacroAssembler* masm, 111 static void GenerateStringDictionaryProbes(MacroAssembler* masm,
112 Label* miss, 112 Label* miss,
113 Label* done, 113 Label* done,
114 Register elements, 114 Register elements,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 int interceptor_bit, 420 int interceptor_bit,
421 Label* slow) { 421 Label* slow) {
422 // Check that the object isn't a smi. 422 // Check that the object isn't a smi.
423 __ BranchOnSmi(receiver, slow); 423 __ BranchOnSmi(receiver, slow);
424 // Get the map of the receiver. 424 // Get the map of the receiver.
425 __ ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); 425 __ ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset));
426 // Check bit field. 426 // Check bit field.
427 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); 427 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset));
428 __ tst(scratch, 428 __ tst(scratch,
429 Operand((1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit))); 429 Operand((1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit)));
430 __ b(nz, slow); 430 __ b(ne, slow);
431 // Check that the object is some kind of JS object EXCEPT JS Value type. 431 // Check that the object is some kind of JS object EXCEPT JS Value type.
432 // In the case that the object is a value-wrapper object, 432 // In the case that the object is a value-wrapper object,
433 // we enter the runtime system to make sure that indexing into string 433 // we enter the runtime system to make sure that indexing into string
434 // objects work as intended. 434 // objects work as intended.
435 ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE); 435 ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE);
436 __ ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); 436 __ ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
437 __ cmp(scratch, Operand(JS_OBJECT_TYPE)); 437 __ cmp(scratch, Operand(JS_OBJECT_TYPE));
438 __ b(lt, slow); 438 __ b(lt, slow);
439 } 439 }
440 440
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 case Token::GT: 1667 case Token::GT:
1668 // Reverse left and right operands to obtain ECMA-262 conversion order. 1668 // Reverse left and right operands to obtain ECMA-262 conversion order.
1669 return lt; 1669 return lt;
1670 case Token::LTE: 1670 case Token::LTE:
1671 // Reverse left and right operands to obtain ECMA-262 conversion order. 1671 // Reverse left and right operands to obtain ECMA-262 conversion order.
1672 return ge; 1672 return ge;
1673 case Token::GTE: 1673 case Token::GTE:
1674 return ge; 1674 return ge;
1675 default: 1675 default:
1676 UNREACHABLE(); 1676 UNREACHABLE();
1677 return no_condition; 1677 return kNoCondition;
1678 } 1678 }
1679 } 1679 }
1680 1680
1681 1681
1682 void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) { 1682 void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
1683 HandleScope scope; 1683 HandleScope scope;
1684 Handle<Code> rewritten; 1684 Handle<Code> rewritten;
1685 State previous_state = GetState(); 1685 State previous_state = GetState();
1686 State state = TargetState(previous_state, false, x, y); 1686 State state = TargetState(previous_state, false, x, y);
1687 if (state == GENERIC) { 1687 if (state == GENERIC) {
(...skipping 17 matching lines...) Expand all
1705 1705
1706 1706
1707 void PatchInlinedSmiCode(Address address) { 1707 void PatchInlinedSmiCode(Address address) {
1708 // Currently there is no smi inlining in the ARM full code generator. 1708 // Currently there is no smi inlining in the ARM full code generator.
1709 } 1709 }
1710 1710
1711 1711
1712 } } // namespace v8::internal 1712 } } // namespace v8::internal
1713 1713
1714 #endif // V8_TARGET_ARCH_ARM 1714 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698