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

Side by Side Diff: src/type-info.cc

Issue 20070005: Adding Smi support to Add, Sub, Mul, and Bitwise (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nit Created 7 years, 5 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/ia32/lithium-ia32.cc ('k') | src/types.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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 Object* result = NULL; 702 Object* result = NULL;
703 // Dictionary has been allocated with sufficient size for all elements. 703 // Dictionary has been allocated with sufficient size for all elements.
704 ASSERT(maybe_result->ToObject(&result)); 704 ASSERT(maybe_result->ToObject(&result));
705 ASSERT(*dictionary_ == result); 705 ASSERT(*dictionary_ == result);
706 #endif 706 #endif
707 } 707 }
708 708
709 709
710 Representation Representation::FromType(TypeInfo info) { 710 Representation Representation::FromType(TypeInfo info) {
711 if (info.IsUninitialized()) return Representation::None(); 711 if (info.IsUninitialized()) return Representation::None();
712 // TODO(verwaest): Return Smi rather than Integer32. 712 if (info.IsSmi()) return Representation::Smi();
713 if (info.IsSmi()) return Representation::Integer32();
714 if (info.IsInteger32()) return Representation::Integer32(); 713 if (info.IsInteger32()) return Representation::Integer32();
715 if (info.IsDouble()) return Representation::Double(); 714 if (info.IsDouble()) return Representation::Double();
716 if (info.IsNumber()) return Representation::Double(); 715 if (info.IsNumber()) return Representation::Double();
717 return Representation::Tagged(); 716 return Representation::Tagged();
718 } 717 }
719 718
720 719
721 } } // namespace v8::internal 720 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698