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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 2041103007: [es6] Fix prototype chain walk for instanceof. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 // Deoptimize if the object needs to be access checked. 2583 // Deoptimize if the object needs to be access checked.
2584 __ lbz(object_instance_type, 2584 __ lbz(object_instance_type,
2585 FieldMemOperand(object_map, Map::kBitFieldOffset)); 2585 FieldMemOperand(object_map, Map::kBitFieldOffset));
2586 __ TestBit(object_instance_type, Map::kIsAccessCheckNeeded, r0); 2586 __ TestBit(object_instance_type, Map::kIsAccessCheckNeeded, r0);
2587 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, cr0); 2587 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, cr0);
2588 // Deoptimize for proxies. 2588 // Deoptimize for proxies.
2589 __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE); 2589 __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE);
2590 DeoptimizeIf(eq, instr, Deoptimizer::kProxy); 2590 DeoptimizeIf(eq, instr, Deoptimizer::kProxy);
2591 __ LoadP(object_prototype, 2591 __ LoadP(object_prototype,
2592 FieldMemOperand(object_map, Map::kPrototypeOffset)); 2592 FieldMemOperand(object_map, Map::kPrototypeOffset));
2593 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex);
2594 EmitFalseBranch(instr, eq);
2593 __ cmp(object_prototype, prototype); 2595 __ cmp(object_prototype, prototype);
2594 EmitTrueBranch(instr, eq); 2596 EmitTrueBranch(instr, eq);
2595 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex);
2596 EmitFalseBranch(instr, eq);
2597 __ LoadP(object_map, 2597 __ LoadP(object_map,
2598 FieldMemOperand(object_prototype, HeapObject::kMapOffset)); 2598 FieldMemOperand(object_prototype, HeapObject::kMapOffset));
2599 __ b(&loop); 2599 __ b(&loop);
2600 } 2600 }
2601 2601
2602 2602
2603 void LCodeGen::DoCmpT(LCmpT* instr) { 2603 void LCodeGen::DoCmpT(LCmpT* instr) {
2604 DCHECK(ToRegister(instr->context()).is(cp)); 2604 DCHECK(ToRegister(instr->context()).is(cp));
2605 Token::Value op = instr->op(); 2605 Token::Value op = instr->op();
2606 2606
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after
5819 __ LoadP(result, 5819 __ LoadP(result,
5820 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5820 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5821 __ bind(deferred->exit()); 5821 __ bind(deferred->exit());
5822 __ bind(&done); 5822 __ bind(&done);
5823 } 5823 }
5824 5824
5825 #undef __ 5825 #undef __
5826 5826
5827 } // namespace internal 5827 } // namespace internal
5828 } // namespace v8 5828 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698