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

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

Issue 1053143005: Collect type feedback on result of Math.[round|ceil|floor] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: MIPS port Created 5 years, 7 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/ic/ic.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 2134
2135 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { 2135 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
2136 DCHECK(!target.is(edi)); 2136 DCHECK(!target.is(edi));
2137 // Load the JavaScript builtin function from the builtins object. 2137 // Load the JavaScript builtin function from the builtins object.
2138 GetBuiltinFunction(edi, id); 2138 GetBuiltinFunction(edi, id);
2139 // Load the code entry point from the function into the target register. 2139 // Load the code entry point from the function into the target register.
2140 mov(target, FieldOperand(edi, JSFunction::kCodeEntryOffset)); 2140 mov(target, FieldOperand(edi, JSFunction::kCodeEntryOffset));
2141 } 2141 }
2142 2142
2143 2143
2144 void MacroAssembler::BranchIfNotBuiltin(Register function, Register temp,
2145 BuiltinFunctionId id, Label* miss) {
2146 mov(temp, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset));
2147 mov(temp, FieldOperand(temp, SharedFunctionInfo::kFunctionDataOffset));
2148 cmp(temp, Immediate(Smi::FromInt(id)));
2149 j(not_equal, miss);
2150 }
2151
2152
2144 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { 2153 void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
2145 if (context_chain_length > 0) { 2154 if (context_chain_length > 0) {
2146 // Move up the chain of contexts to the context containing the slot. 2155 // Move up the chain of contexts to the context containing the slot.
2147 mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2156 mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2148 for (int i = 1; i < context_chain_length; i++) { 2157 for (int i = 1; i < context_chain_length; i++) {
2149 mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2158 mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2150 } 2159 }
2151 } else { 2160 } else {
2152 // Slot is in the current function context. Move it into the 2161 // Slot is in the current function context. Move it into the
2153 // destination register in case we store into it (the write barrier 2162 // destination register in case we store into it (the write barrier
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 if (mag.shift > 0) sar(edx, mag.shift); 3231 if (mag.shift > 0) sar(edx, mag.shift);
3223 mov(eax, dividend); 3232 mov(eax, dividend);
3224 shr(eax, 31); 3233 shr(eax, 31);
3225 add(edx, eax); 3234 add(edx, eax);
3226 } 3235 }
3227 3236
3228 3237
3229 } } // namespace v8::internal 3238 } } // namespace v8::internal
3230 3239
3231 #endif // V8_TARGET_ARCH_IA32 3240 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698