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

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 4907 matching lines...) Expand 10 before | Expand all | Expand 10 after
4918 4918
4919 HAllocate(HValue* context, HValue* size, HType type, Flags flags) 4919 HAllocate(HValue* context, HValue* size, HType type, Flags flags)
4920 : type_(type), 4920 : type_(type),
4921 flags_(flags) { 4921 flags_(flags) {
4922 SetOperandAt(0, context); 4922 SetOperandAt(0, context);
4923 SetOperandAt(1, size); 4923 SetOperandAt(1, size);
4924 set_representation(Representation::Tagged()); 4924 set_representation(Representation::Tagged());
4925 SetGVNFlag(kChangesNewSpacePromotion); 4925 SetGVNFlag(kChangesNewSpacePromotion);
4926 } 4926 }
4927 4927
4928 static Flags DefaultFlags() {
4929 return CAN_ALLOCATE_IN_NEW_SPACE;
4930 }
4931
4932 static Flags DefaultFlags(ElementsKind kind) {
4933 Flags flags = CAN_ALLOCATE_IN_NEW_SPACE;
4934 if (IsFastDoubleElementsKind(kind)) {
4935 flags = static_cast<HAllocate::Flags>(
4936 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED);
4937 }
4938 return flags;
4939 }
4940
4928 HValue* context() { return OperandAt(0); } 4941 HValue* context() { return OperandAt(0); }
4929 HValue* size() { return OperandAt(1); } 4942 HValue* size() { return OperandAt(1); }
4930 4943
4931 virtual Representation RequiredInputRepresentation(int index) { 4944 virtual Representation RequiredInputRepresentation(int index) {
4932 if (index == 0) { 4945 if (index == 0) {
4933 return Representation::Tagged(); 4946 return Representation::Tagged();
4934 } else { 4947 } else {
4935 return Representation::Integer32(); 4948 return Representation::Integer32();
4936 } 4949 }
4937 } 4950 }
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
6491 virtual bool IsDeletable() const { return true; } 6504 virtual bool IsDeletable() const { return true; }
6492 }; 6505 };
6493 6506
6494 6507
6495 #undef DECLARE_INSTRUCTION 6508 #undef DECLARE_INSTRUCTION
6496 #undef DECLARE_CONCRETE_INSTRUCTION 6509 #undef DECLARE_CONCRETE_INSTRUCTION
6497 6510
6498 } } // namespace v8::internal 6511 } } // namespace v8::internal
6499 6512
6500 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6513 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/code-stubs.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