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

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

Issue 16146005: MIPS: Update the gap resolver to support Smi constants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/mips/lithium-gap-resolver-mips.cc » ('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. 1 // Copyright 2012 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 return chunk_->LookupLiteralRepresentation(op).IsSmi(); 514 return chunk_->LookupLiteralRepresentation(op).IsSmi();
515 } 515 }
516 516
517 517
518 int LCodeGen::ToInteger32(LConstantOperand* op) const { 518 int LCodeGen::ToInteger32(LConstantOperand* op) const {
519 HConstant* constant = chunk_->LookupConstant(op); 519 HConstant* constant = chunk_->LookupConstant(op);
520 return constant->Integer32Value(); 520 return constant->Integer32Value();
521 } 521 }
522 522
523 523
524 Smi* LCodeGen::ToSmi(LConstantOperand* op) const {
525 HConstant* constant = chunk_->LookupConstant(op);
526 return Smi::FromInt(constant->Integer32Value());
527 }
528
529
524 double LCodeGen::ToDouble(LConstantOperand* op) const { 530 double LCodeGen::ToDouble(LConstantOperand* op) const {
525 HConstant* constant = chunk_->LookupConstant(op); 531 HConstant* constant = chunk_->LookupConstant(op);
526 ASSERT(constant->HasDoubleValue()); 532 ASSERT(constant->HasDoubleValue());
527 return constant->DoubleValue(); 533 return constant->DoubleValue();
528 } 534 }
529 535
530 536
531 Operand LCodeGen::ToOperand(LOperand* op) { 537 Operand LCodeGen::ToOperand(LOperand* op) {
532 if (op->IsConstantOperand()) { 538 if (op->IsConstantOperand()) {
533 LConstantOperand* const_op = LConstantOperand::cast(op); 539 LConstantOperand* const_op = LConstantOperand::cast(op);
(...skipping 5204 matching lines...) Expand 10 before | Expand all | Expand 10 after
5738 __ Subu(scratch, result, scratch); 5744 __ Subu(scratch, result, scratch);
5739 __ lw(result, FieldMemOperand(scratch, 5745 __ lw(result, FieldMemOperand(scratch,
5740 FixedArray::kHeaderSize - kPointerSize)); 5746 FixedArray::kHeaderSize - kPointerSize));
5741 __ bind(&done); 5747 __ bind(&done);
5742 } 5748 }
5743 5749
5744 5750
5745 #undef __ 5751 #undef __
5746 5752
5747 } } // namespace v8::internal 5753 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/mips/lithium-gap-resolver-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698