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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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 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/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 2310
2311 // Deoptimize if the object needs to be access checked. 2311 // Deoptimize if the object needs to be access checked.
2312 __ test_b(FieldOperand(object_map, Map::kBitFieldOffset), 2312 __ test_b(FieldOperand(object_map, Map::kBitFieldOffset),
2313 Immediate(1 << Map::kIsAccessCheckNeeded)); 2313 Immediate(1 << Map::kIsAccessCheckNeeded));
2314 DeoptimizeIf(not_zero, instr, Deoptimizer::kAccessCheck); 2314 DeoptimizeIf(not_zero, instr, Deoptimizer::kAccessCheck);
2315 // Deoptimize for proxies. 2315 // Deoptimize for proxies.
2316 __ CmpInstanceType(object_map, JS_PROXY_TYPE); 2316 __ CmpInstanceType(object_map, JS_PROXY_TYPE);
2317 DeoptimizeIf(equal, instr, Deoptimizer::kProxy); 2317 DeoptimizeIf(equal, instr, Deoptimizer::kProxy);
2318 2318
2319 __ mov(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset)); 2319 __ mov(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset));
2320 __ cmp(object_prototype, factory()->null_value());
2321 EmitFalseBranch(instr, equal);
2320 __ cmp(object_prototype, prototype); 2322 __ cmp(object_prototype, prototype);
2321 EmitTrueBranch(instr, equal); 2323 EmitTrueBranch(instr, equal);
2322 __ cmp(object_prototype, factory()->null_value());
2323 EmitFalseBranch(instr, equal);
2324 __ mov(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); 2324 __ mov(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset));
2325 __ jmp(&loop); 2325 __ jmp(&loop);
2326 } 2326 }
2327 2327
2328 2328
2329 void LCodeGen::DoCmpT(LCmpT* instr) { 2329 void LCodeGen::DoCmpT(LCmpT* instr) {
2330 Token::Value op = instr->op(); 2330 Token::Value op = instr->op();
2331 2331
2332 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2332 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
2333 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2333 CallCode(ic, RelocInfo::CODE_TARGET, instr);
(...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after
5320 __ bind(deferred->exit()); 5320 __ bind(deferred->exit());
5321 __ bind(&done); 5321 __ bind(&done);
5322 } 5322 }
5323 5323
5324 #undef __ 5324 #undef __
5325 5325
5326 } // namespace internal 5326 } // namespace internal
5327 } // namespace v8 5327 } // namespace v8
5328 5328
5329 #endif // V8_TARGET_ARCH_IA32 5329 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698