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

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

Issue 1328963004: Revert of [builtins] Unify the various versions of [[Call]] with a Call builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/builtins-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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 111
112 void MacroAssembler::CompareRoot(const Operand& with, 112 void MacroAssembler::CompareRoot(const Operand& with,
113 Heap::RootListIndex index) { 113 Heap::RootListIndex index) {
114 DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); 114 DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
115 cmp(with, isolate()->heap()->root_handle(index)); 115 cmp(with, isolate()->heap()->root_handle(index));
116 } 116 }
117 117
118 118
119 void MacroAssembler::PushRoot(Heap::RootListIndex index) {
120 DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
121 Push(isolate()->heap()->root_handle(index));
122 }
123
124
125 void MacroAssembler::InNewSpace( 119 void MacroAssembler::InNewSpace(
126 Register object, 120 Register object,
127 Register scratch, 121 Register scratch,
128 Condition cc, 122 Condition cc,
129 Label* condition_met, 123 Label* condition_met,
130 Label::Distance condition_met_distance) { 124 Label::Distance condition_met_distance) {
131 DCHECK(cc == equal || cc == not_equal); 125 DCHECK(cc == equal || cc == not_equal);
132 if (scratch.is(object)) { 126 if (scratch.is(object)) {
133 and_(scratch, Immediate(~Page::kPageAlignmentMask)); 127 and_(scratch, Immediate(~Page::kPageAlignmentMask));
134 } else { 128 } else {
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 test(object, Immediate(kSmiTagMask)); 796 test(object, Immediate(kSmiTagMask));
803 Check(not_equal, kOperandIsASmiAndNotAName); 797 Check(not_equal, kOperandIsASmiAndNotAName);
804 push(object); 798 push(object);
805 mov(object, FieldOperand(object, HeapObject::kMapOffset)); 799 mov(object, FieldOperand(object, HeapObject::kMapOffset));
806 CmpInstanceType(object, LAST_NAME_TYPE); 800 CmpInstanceType(object, LAST_NAME_TYPE);
807 pop(object); 801 pop(object);
808 Check(below_equal, kOperandIsNotAName); 802 Check(below_equal, kOperandIsNotAName);
809 } 803 }
810 } 804 }
811 805
812
813 void MacroAssembler::AssertFunction(Register object) {
814 if (emit_debug_code()) {
815 test(object, Immediate(kSmiTagMask));
816 Check(not_equal, kOperandIsASmiAndNotAFunction);
817 Push(object);
818 CmpObjectType(object, JS_FUNCTION_TYPE, object);
819 Pop(object);
820 Check(not_equal, kOperandIsNotAFunction);
821 }
822 }
823
824 806
825 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { 807 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) {
826 if (emit_debug_code()) { 808 if (emit_debug_code()) {
827 Label done_checking; 809 Label done_checking;
828 AssertNotSmi(object); 810 AssertNotSmi(object);
829 cmp(object, isolate()->factory()->undefined_value()); 811 cmp(object, isolate()->factory()->undefined_value());
830 j(equal, &done_checking); 812 j(equal, &done_checking);
831 cmp(FieldOperand(object, 0), 813 cmp(FieldOperand(object, 0),
832 Immediate(isolate()->factory()->allocation_site_map())); 814 Immediate(isolate()->factory()->allocation_site_map()));
833 Assert(equal, kExpectedUndefinedOrCell); 815 Assert(equal, kExpectedUndefinedOrCell);
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 // A variable occurring in such a scope should have slot type LOOKUP and 2090 // A variable occurring in such a scope should have slot type LOOKUP and
2109 // not CONTEXT. 2091 // not CONTEXT.
2110 if (emit_debug_code()) { 2092 if (emit_debug_code()) {
2111 cmp(FieldOperand(dst, HeapObject::kMapOffset), 2093 cmp(FieldOperand(dst, HeapObject::kMapOffset),
2112 isolate()->factory()->with_context_map()); 2094 isolate()->factory()->with_context_map());
2113 Check(not_equal, kVariableResolvedToWithContext); 2095 Check(not_equal, kVariableResolvedToWithContext);
2114 } 2096 }
2115 } 2097 }
2116 2098
2117 2099
2118 void MacroAssembler::LoadGlobalProxy(Register dst) {
2119 mov(dst, GlobalObjectOperand());
2120 mov(dst, FieldOperand(dst, GlobalObject::kGlobalProxyOffset));
2121 }
2122
2123
2124 void MacroAssembler::LoadTransitionedArrayMapConditional( 2100 void MacroAssembler::LoadTransitionedArrayMapConditional(
2125 ElementsKind expected_kind, 2101 ElementsKind expected_kind,
2126 ElementsKind transitioned_kind, 2102 ElementsKind transitioned_kind,
2127 Register map_in_out, 2103 Register map_in_out,
2128 Register scratch, 2104 Register scratch,
2129 Label* no_map_match) { 2105 Label* no_map_match) {
2130 // Load the global or builtins object from the current context. 2106 // Load the global or builtins object from the current context.
2131 mov(scratch, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 2107 mov(scratch, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2132 mov(scratch, FieldOperand(scratch, GlobalObject::kNativeContextOffset)); 2108 mov(scratch, FieldOperand(scratch, GlobalObject::kNativeContextOffset));
2133 2109
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 mov(eax, dividend); 3163 mov(eax, dividend);
3188 shr(eax, 31); 3164 shr(eax, 31);
3189 add(edx, eax); 3165 add(edx, eax);
3190 } 3166 }
3191 3167
3192 3168
3193 } // namespace internal 3169 } // namespace internal
3194 } // namespace v8 3170 } // namespace v8
3195 3171
3196 #endif // V8_TARGET_ARCH_IA32 3172 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698