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/x64/lithium-codegen-x64.cc

Issue 15664005: 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/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-gap-resolver-x64.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 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 chunk_->LookupLiteralRepresentation(op).IsTagged(); 446 chunk_->LookupLiteralRepresentation(op).IsTagged();
447 } 447 }
448 448
449 449
450 int LCodeGen::ToInteger32(LConstantOperand* op) const { 450 int LCodeGen::ToInteger32(LConstantOperand* op) const {
451 HConstant* constant = chunk_->LookupConstant(op); 451 HConstant* constant = chunk_->LookupConstant(op);
452 return constant->Integer32Value(); 452 return constant->Integer32Value();
453 } 453 }
454 454
455 455
456 Smi* LCodeGen::ToSmi(LConstantOperand* op) const {
457 HConstant* constant = chunk_->LookupConstant(op);
458 return Smi::FromInt(constant->Integer32Value());
459 }
460
461
456 double LCodeGen::ToDouble(LConstantOperand* op) const { 462 double LCodeGen::ToDouble(LConstantOperand* op) const {
457 HConstant* constant = chunk_->LookupConstant(op); 463 HConstant* constant = chunk_->LookupConstant(op);
458 ASSERT(constant->HasDoubleValue()); 464 ASSERT(constant->HasDoubleValue());
459 return constant->DoubleValue(); 465 return constant->DoubleValue();
460 } 466 }
461 467
462 468
463 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { 469 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const {
464 HConstant* constant = chunk_->LookupConstant(op); 470 HConstant* constant = chunk_->LookupConstant(op);
465 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); 471 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged());
(...skipping 5212 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 FixedArray::kHeaderSize - kPointerSize)); 5684 FixedArray::kHeaderSize - kPointerSize));
5679 __ bind(&done); 5685 __ bind(&done);
5680 } 5686 }
5681 5687
5682 5688
5683 #undef __ 5689 #undef __
5684 5690
5685 } } // namespace v8::internal 5691 } } // namespace v8::internal
5686 5692
5687 #endif // V8_TARGET_ARCH_X64 5693 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-gap-resolver-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698