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

Side by Side Diff: src/hydrogen-instructions.h

Issue 12385014: Hydrogen stubs for array constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 8 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
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 4905 matching lines...) Expand 10 before | Expand all | Expand 10 after
4916 4916
4917 HAllocate(HValue* context, HValue* size, HType type, Flags flags) 4917 HAllocate(HValue* context, HValue* size, HType type, Flags flags)
4918 : type_(type), 4918 : type_(type),
4919 flags_(flags) { 4919 flags_(flags) {
4920 SetOperandAt(0, context); 4920 SetOperandAt(0, context);
4921 SetOperandAt(1, size); 4921 SetOperandAt(1, size);
4922 set_representation(Representation::Tagged()); 4922 set_representation(Representation::Tagged());
4923 SetGVNFlag(kChangesNewSpacePromotion); 4923 SetGVNFlag(kChangesNewSpacePromotion);
4924 } 4924 }
4925 4925
4926 static Flags DefaultFlags() {
4927 return CAN_ALLOCATE_IN_NEW_SPACE;
4928 }
4929
4930 static Flags DefaultFlags(ElementsKind kind) {
4931 Flags flags = CAN_ALLOCATE_IN_NEW_SPACE;
4932 if (IsFastDoubleElementsKind(kind)) {
4933 flags = static_cast<HAllocate::Flags>(
4934 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED);
4935 }
4936 return flags;
4937 }
4938
4926 HValue* context() { return OperandAt(0); } 4939 HValue* context() { return OperandAt(0); }
4927 HValue* size() { return OperandAt(1); } 4940 HValue* size() { return OperandAt(1); }
4928 4941
4929 virtual Representation RequiredInputRepresentation(int index) { 4942 virtual Representation RequiredInputRepresentation(int index) {
4930 if (index == 0) { 4943 if (index == 0) {
4931 return Representation::Tagged(); 4944 return Representation::Tagged();
4932 } else { 4945 } else {
4933 return Representation::Integer32(); 4946 return Representation::Integer32();
4934 } 4947 }
4935 } 4948 }
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
6489 virtual bool IsDeletable() const { return true; } 6502 virtual bool IsDeletable() const { return true; }
6490 }; 6503 };
6491 6504
6492 6505
6493 #undef DECLARE_INSTRUCTION 6506 #undef DECLARE_INSTRUCTION
6494 #undef DECLARE_CONCRETE_INSTRUCTION 6507 #undef DECLARE_CONCRETE_INSTRUCTION
6495 6508
6496 } } // namespace v8::internal 6509 } } // namespace v8::internal
6497 6510
6498 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6511 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/flag-definitions.h ('K') | « src/hydrogen.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698