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

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

Issue 15861009: Tag smi-constants as smi. This also fixes code that copies holes into arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments 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 | « no previous file | src/code-stubs-hydrogen.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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 517
518 518
519 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { 519 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const {
520 HConstant* constant = chunk_->LookupConstant(op); 520 HConstant* constant = chunk_->LookupConstant(op);
521 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); 521 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged());
522 return constant->handle(); 522 return constant->handle();
523 } 523 }
524 524
525 525
526 bool LCodeGen::IsInteger32(LConstantOperand* op) const { 526 bool LCodeGen::IsInteger32(LConstantOperand* op) const {
527 return chunk_->LookupLiteralRepresentation(op).IsInteger32(); 527 return chunk_->LookupLiteralRepresentation(op).IsSmiOrInteger32();
528 } 528 }
529 529
530 530
531 bool LCodeGen::IsSmi(LConstantOperand* op) const { 531 bool LCodeGen::IsSmi(LConstantOperand* op) const {
532 return chunk_->LookupLiteralRepresentation(op).IsSmi(); 532 return chunk_->LookupLiteralRepresentation(op).IsSmi();
533 } 533 }
534 534
535 535
536 int LCodeGen::ToInteger32(LConstantOperand* op) const { 536 int LCodeGen::ToInteger32(LConstantOperand* op) const {
537 HConstant* constant = chunk_->LookupConstant(op); 537 HConstant* constant = chunk_->LookupConstant(op);
(...skipping 5448 matching lines...) Expand 10 before | Expand all | Expand 10 after
5986 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5986 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5987 __ ldr(result, FieldMemOperand(scratch, 5987 __ ldr(result, FieldMemOperand(scratch,
5988 FixedArray::kHeaderSize - kPointerSize)); 5988 FixedArray::kHeaderSize - kPointerSize));
5989 __ bind(&done); 5989 __ bind(&done);
5990 } 5990 }
5991 5991
5992 5992
5993 #undef __ 5993 #undef __
5994 5994
5995 } } // namespace v8::internal 5995 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698