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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 25666006: Get rid of the HInstanceSize instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
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 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 Label done; 2530 Label done;
2531 __ j(not_zero, &load_false); 2531 __ j(not_zero, &load_false);
2532 __ LoadRoot(rax, Heap::kTrueValueRootIndex); 2532 __ LoadRoot(rax, Heap::kTrueValueRootIndex);
2533 __ jmp(&done); 2533 __ jmp(&done);
2534 __ bind(&load_false); 2534 __ bind(&load_false);
2535 __ LoadRoot(rax, Heap::kFalseValueRootIndex); 2535 __ LoadRoot(rax, Heap::kFalseValueRootIndex);
2536 __ bind(&done); 2536 __ bind(&done);
2537 } 2537 }
2538 2538
2539 2539
2540 void LCodeGen::DoInstanceSize(LInstanceSize* instr) {
2541 Register object = ToRegister(instr->object());
2542 Register result = ToRegister(instr->result());
2543 __ movq(result, FieldOperand(object, HeapObject::kMapOffset));
2544 __ movzxbq(result, FieldOperand(result, Map::kInstanceSizeOffset));
2545 }
2546
2547
2548 void LCodeGen::DoCmpT(LCmpT* instr) { 2540 void LCodeGen::DoCmpT(LCmpT* instr) {
2549 Token::Value op = instr->op(); 2541 Token::Value op = instr->op();
2550 2542
2551 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); 2543 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op);
2552 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2544 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2553 2545
2554 Condition condition = TokenToCondition(op, false); 2546 Condition condition = TokenToCondition(op, false);
2555 Label true_value, done; 2547 Label true_value, done;
2556 __ testq(rax, rax); 2548 __ testq(rax, rax);
2557 __ j(condition, &true_value, Label::kNear); 2549 __ j(condition, &true_value, Label::kNear);
(...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after
5440 FixedArray::kHeaderSize - kPointerSize)); 5432 FixedArray::kHeaderSize - kPointerSize));
5441 __ bind(&done); 5433 __ bind(&done);
5442 } 5434 }
5443 5435
5444 5436
5445 #undef __ 5437 #undef __
5446 5438
5447 } } // namespace v8::internal 5439 } } // namespace v8::internal
5448 5440
5449 #endif // V8_TARGET_ARCH_X64 5441 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698