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

Side by Side Diff: src/ia32/macro-assembler-ia32.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 "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 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 AllowDeferredHandleDereference using_raw_address; 2573 AllowDeferredHandleDereference using_raw_address;
2574 if (isolate()->heap()->InNewSpace(*object)) { 2574 if (isolate()->heap()->InNewSpace(*object)) {
2575 Handle<Cell> cell = isolate()->factory()->NewCell(object); 2575 Handle<Cell> cell = isolate()->factory()->NewCell(object);
2576 push(Operand::ForCell(cell)); 2576 push(Operand::ForCell(cell));
2577 } else { 2577 } else {
2578 Push(object); 2578 Push(object);
2579 } 2579 }
2580 } 2580 }
2581 2581
2582 2582
2583 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell,
2584 Register scratch) {
2585 mov(scratch, cell);
2586 cmp(value, FieldOperand(scratch, WeakCell::kValueOffset));
2587 }
2588
2589
2590 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell,
2591 Label* miss) {
2592 mov(value, cell);
2593 mov(value, FieldOperand(value, WeakCell::kValueOffset));
2594 JumpIfSmi(value, miss);
2595 }
2596
2597
2583 void MacroAssembler::Ret() { 2598 void MacroAssembler::Ret() {
2584 ret(0); 2599 ret(0);
2585 } 2600 }
2586 2601
2587 2602
2588 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { 2603 void MacroAssembler::Ret(int bytes_dropped, Register scratch) {
2589 if (is_uint16(bytes_dropped)) { 2604 if (is_uint16(bytes_dropped)) {
2590 ret(bytes_dropped); 2605 ret(bytes_dropped);
2591 } else { 2606 } else {
2592 pop(scratch); 2607 pop(scratch);
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3447 if (mag.shift > 0) sar(edx, mag.shift); 3462 if (mag.shift > 0) sar(edx, mag.shift);
3448 mov(eax, dividend); 3463 mov(eax, dividend);
3449 shr(eax, 31); 3464 shr(eax, 31);
3450 add(edx, eax); 3465 add(edx, eax);
3451 } 3466 }
3452 3467
3453 3468
3454 } } // namespace v8::internal 3469 } } // namespace v8::internal
3455 3470
3456 #endif // V8_TARGET_ARCH_IA32 3471 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698