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

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

Issue 6879009: Support Float64Arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 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
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-instructions.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 }; 3239 };
3240 3240
3241 3241
3242 class HLoadKeyedSpecializedArrayElement: public HBinaryOperation { 3242 class HLoadKeyedSpecializedArrayElement: public HBinaryOperation {
3243 public: 3243 public:
3244 HLoadKeyedSpecializedArrayElement(HValue* external_elements, 3244 HLoadKeyedSpecializedArrayElement(HValue* external_elements,
3245 HValue* key, 3245 HValue* key,
3246 ExternalArrayType array_type) 3246 ExternalArrayType array_type)
3247 : HBinaryOperation(external_elements, key), 3247 : HBinaryOperation(external_elements, key),
3248 array_type_(array_type) { 3248 array_type_(array_type) {
3249 if (array_type == kExternalFloatArray) { 3249 if (array_type == kExternalFloatArray ||
3250 array_type == kExternalDoubleArray) {
3250 set_representation(Representation::Double()); 3251 set_representation(Representation::Double());
3251 } else { 3252 } else {
3252 set_representation(Representation::Integer32()); 3253 set_representation(Representation::Integer32());
3253 } 3254 }
3254 SetFlag(kDependsOnSpecializedArrayElements); 3255 SetFlag(kDependsOnSpecializedArrayElements);
3255 // Native code could change the specialized array. 3256 // Native code could change the specialized array.
3256 SetFlag(kDependsOnCalls); 3257 SetFlag(kDependsOnCalls);
3257 SetFlag(kUseGVN); 3258 SetFlag(kUseGVN);
3258 } 3259 }
3259 3260
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 SetOperandAt(1, key); 3432 SetOperandAt(1, key);
3432 SetOperandAt(2, val); 3433 SetOperandAt(2, val);
3433 } 3434 }
3434 3435
3435 virtual void PrintDataTo(StringStream* stream); 3436 virtual void PrintDataTo(StringStream* stream);
3436 3437
3437 virtual Representation RequiredInputRepresentation(int index) const { 3438 virtual Representation RequiredInputRepresentation(int index) const {
3438 if (index == 0) { 3439 if (index == 0) {
3439 return Representation::External(); 3440 return Representation::External();
3440 } else { 3441 } else {
3441 if (index == 2 && array_type() == kExternalFloatArray) { 3442 if (index == 2 && (array_type() == kExternalFloatArray ||
3443 array_type() == kExternalDoubleArray)) {
3442 return Representation::Double(); 3444 return Representation::Double();
3443 } else { 3445 } else {
3444 return Representation::Integer32(); 3446 return Representation::Integer32();
3445 } 3447 }
3446 } 3448 }
3447 } 3449 }
3448 3450
3449 HValue* external_pointer() { return OperandAt(0); } 3451 HValue* external_pointer() { return OperandAt(0); }
3450 HValue* key() { return OperandAt(1); } 3452 HValue* key() { return OperandAt(1); }
3451 HValue* value() { return OperandAt(2); } 3453 HValue* value() { return OperandAt(2); }
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
3777 HValue* object() { return left(); } 3779 HValue* object() { return left(); }
3778 HValue* key() { return right(); } 3780 HValue* key() { return right(); }
3779 }; 3781 };
3780 3782
3781 #undef DECLARE_INSTRUCTION 3783 #undef DECLARE_INSTRUCTION
3782 #undef DECLARE_CONCRETE_INSTRUCTION 3784 #undef DECLARE_CONCRETE_INSTRUCTION
3783 3785
3784 } } // namespace v8::internal 3786 } } // namespace v8::internal
3785 3787
3786 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3788 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698