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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 Operand(1 << Map::kIsAccessCheckNeeded)); 2410 Operand(1 << Map::kIsAccessCheckNeeded));
2411 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, object_instance_type, 2411 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, object_instance_type,
2412 Operand(zero_reg)); 2412 Operand(zero_reg));
2413 // Deoptimize for proxies. 2413 // Deoptimize for proxies.
2414 __ lbu(object_instance_type, 2414 __ lbu(object_instance_type,
2415 FieldMemOperand(object_map, Map::kInstanceTypeOffset)); 2415 FieldMemOperand(object_map, Map::kInstanceTypeOffset));
2416 DeoptimizeIf(eq, instr, Deoptimizer::kProxy, object_instance_type, 2416 DeoptimizeIf(eq, instr, Deoptimizer::kProxy, object_instance_type,
2417 Operand(JS_PROXY_TYPE)); 2417 Operand(JS_PROXY_TYPE));
2418 2418
2419 __ lw(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); 2419 __ lw(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset));
2420 EmitTrueBranch(instr, eq, object_prototype, Operand(prototype));
2421 __ LoadRoot(at, Heap::kNullValueRootIndex); 2420 __ LoadRoot(at, Heap::kNullValueRootIndex);
2422 EmitFalseBranch(instr, eq, object_prototype, Operand(at)); 2421 EmitFalseBranch(instr, eq, object_prototype, Operand(at));
2422 EmitTrueBranch(instr, eq, object_prototype, Operand(prototype));
2423 __ Branch(USE_DELAY_SLOT, &loop); 2423 __ Branch(USE_DELAY_SLOT, &loop);
2424 __ lw(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset)); 2424 __ lw(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset));
2425 } 2425 }
2426 2426
2427 2427
2428 void LCodeGen::DoCmpT(LCmpT* instr) { 2428 void LCodeGen::DoCmpT(LCmpT* instr) {
2429 DCHECK(ToRegister(instr->context()).is(cp)); 2429 DCHECK(ToRegister(instr->context()).is(cp));
2430 Token::Value op = instr->op(); 2430 Token::Value op = instr->op();
2431 2431
2432 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2432 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
(...skipping 3125 matching lines...) Expand 10 before | Expand all | Expand 10 after
5558 __ lw(result, FieldMemOperand(scratch, 5558 __ lw(result, FieldMemOperand(scratch,
5559 FixedArray::kHeaderSize - kPointerSize)); 5559 FixedArray::kHeaderSize - kPointerSize));
5560 __ bind(deferred->exit()); 5560 __ bind(deferred->exit());
5561 __ bind(&done); 5561 __ bind(&done);
5562 } 5562 }
5563 5563
5564 #undef __ 5564 #undef __
5565 5565
5566 } // namespace internal 5566 } // namespace internal
5567 } // namespace v8 5567 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698