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

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

Issue 764003003: Reland parts of 'Use weak cells in map checks in polymorphic ICs' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 JumpIfSmi(obj, &fail); 2262 JumpIfSmi(obj, &fail);
2263 } 2263 }
2264 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 2264 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
2265 mov(ip, Operand(map)); 2265 mov(ip, Operand(map));
2266 cmp(scratch, ip); 2266 cmp(scratch, ip);
2267 Jump(success, RelocInfo::CODE_TARGET, eq); 2267 Jump(success, RelocInfo::CODE_TARGET, eq);
2268 bind(&fail); 2268 bind(&fail);
2269 } 2269 }
2270 2270
2271 2271
2272 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell,
2273 Register scratch) {
2274 mov(scratch, Operand(cell));
2275 ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset));
2276 cmp(value, scratch);
2277 }
2278
2279
2280 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell,
2281 Label* miss) {
2282 mov(value, Operand(cell));
2283 ldr(value, FieldMemOperand(value, WeakCell::kValueOffset));
2284 JumpIfSmi(value, miss);
2285 }
2286
2287
2272 void MacroAssembler::TryGetFunctionPrototype(Register function, 2288 void MacroAssembler::TryGetFunctionPrototype(Register function,
2273 Register result, 2289 Register result,
2274 Register scratch, 2290 Register scratch,
2275 Label* miss, 2291 Label* miss,
2276 bool miss_on_bound_function) { 2292 bool miss_on_bound_function) {
2277 Label non_instance; 2293 Label non_instance;
2278 if (miss_on_bound_function) { 2294 if (miss_on_bound_function) {
2279 // Check that the receiver isn't a smi. 2295 // Check that the receiver isn't a smi.
2280 JumpIfSmi(function, miss); 2296 JumpIfSmi(function, miss);
2281 2297
(...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 } 4100 }
4085 } 4101 }
4086 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4102 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4087 add(result, result, Operand(dividend, LSR, 31)); 4103 add(result, result, Operand(dividend, LSR, 31));
4088 } 4104 }
4089 4105
4090 } // namespace internal 4106 } // namespace internal
4091 } // namespace v8 4107 } // namespace v8
4092 4108
4093 #endif // V8_TARGET_ARCH_ARM 4109 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698