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

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

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 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
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 2374
2375 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { 2375 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) {
2376 Register reg = ToRegister(instr->value()); 2376 Register reg = ToRegister(instr->value());
2377 Register temp = ToRegister(instr->temp()); 2377 Register temp = ToRegister(instr->temp());
2378 2378
2379 __ lw(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); 2379 __ lw(temp, FieldMemOperand(reg, HeapObject::kMapOffset));
2380 EmitBranch(instr, eq, temp, Operand(instr->map())); 2380 EmitBranch(instr, eq, temp, Operand(instr->map()));
2381 } 2381 }
2382 2382
2383 2383
2384 void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
2385 DCHECK(ToRegister(instr->context()).is(cp));
2386 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister()));
2387 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister()));
2388 DCHECK(ToRegister(instr->result()).is(v0));
2389 InstanceOfStub stub(isolate());
2390 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2391 }
2392
2393
2394 void LCodeGen::DoHasInPrototypeChainAndBranch( 2384 void LCodeGen::DoHasInPrototypeChainAndBranch(
2395 LHasInPrototypeChainAndBranch* instr) { 2385 LHasInPrototypeChainAndBranch* instr) {
2396 Register const object = ToRegister(instr->object()); 2386 Register const object = ToRegister(instr->object());
2397 Register const object_map = scratch0(); 2387 Register const object_map = scratch0();
2398 Register const object_instance_type = scratch1(); 2388 Register const object_instance_type = scratch1();
2399 Register const object_prototype = object_map; 2389 Register const object_prototype = object_map;
2400 Register const prototype = ToRegister(instr->prototype()); 2390 Register const prototype = ToRegister(instr->prototype());
2401 2391
2402 // The {object} must be a spec object. It's sufficient to know that {object} 2392 // The {object} must be a spec object. It's sufficient to know that {object}
2403 // is not a smi, since all other non-spec objects have {null} prototypes and 2393 // is not a smi, since all other non-spec objects have {null} prototypes and
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
5577 __ lw(result, FieldMemOperand(scratch, 5567 __ lw(result, FieldMemOperand(scratch,
5578 FixedArray::kHeaderSize - kPointerSize)); 5568 FixedArray::kHeaderSize - kPointerSize));
5579 __ bind(deferred->exit()); 5569 __ bind(deferred->exit());
5580 __ bind(&done); 5570 __ bind(&done);
5581 } 5571 }
5582 5572
5583 #undef __ 5573 #undef __
5584 5574
5585 } // namespace internal 5575 } // namespace internal
5586 } // namespace v8 5576 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698