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

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

Issue 6677076: Merge up to bleeding_edge r7201 to isolates branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Fix lint. Created 9 years, 9 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/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 V(Simulate) \ 144 V(Simulate) \
145 V(StackCheck) \ 145 V(StackCheck) \
146 V(StoreContextSlot) \ 146 V(StoreContextSlot) \
147 V(StoreGlobal) \ 147 V(StoreGlobal) \
148 V(StoreKeyedFastElement) \ 148 V(StoreKeyedFastElement) \
149 V(StorePixelArrayElement) \ 149 V(StorePixelArrayElement) \
150 V(StoreKeyedGeneric) \ 150 V(StoreKeyedGeneric) \
151 V(StoreNamedField) \ 151 V(StoreNamedField) \
152 V(StoreNamedGeneric) \ 152 V(StoreNamedGeneric) \
153 V(StringCharCodeAt) \ 153 V(StringCharCodeAt) \
154 V(StringCharFromCode) \
154 V(StringLength) \ 155 V(StringLength) \
155 V(Sub) \ 156 V(Sub) \
156 V(Test) \ 157 V(Test) \
157 V(Throw) \ 158 V(Throw) \
158 V(Typeof) \ 159 V(Typeof) \
159 V(TypeofIs) \ 160 V(TypeofIs) \
160 V(UnaryMathOperation) \ 161 V(UnaryMathOperation) \
161 V(UnknownOSRValue) \ 162 V(UnknownOSRValue) \
162 V(ValueOf) 163 V(ValueOf)
163 164
(...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 virtual Range* InferRange(); 2557 virtual Range* InferRange();
2557 }; 2558 };
2558 2559
2559 2560
2560 class HMod: public HArithmeticBinaryOperation { 2561 class HMod: public HArithmeticBinaryOperation {
2561 public: 2562 public:
2562 HMod(HValue* left, HValue* right) : HArithmeticBinaryOperation(left, right) { 2563 HMod(HValue* left, HValue* right) : HArithmeticBinaryOperation(left, right) {
2563 SetFlag(kCanBeDivByZero); 2564 SetFlag(kCanBeDivByZero);
2564 } 2565 }
2565 2566
2567 bool HasPowerOf2Divisor() {
2568 if (right()->IsConstant() &&
2569 HConstant::cast(right())->HasInteger32Value()) {
2570 int32_t value = HConstant::cast(right())->Integer32Value();
2571 return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value));
2572 }
2573
2574 return false;
2575 }
2576
2566 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); 2577 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
2567 2578
2568 DECLARE_CONCRETE_INSTRUCTION(Mod, "mod") 2579 DECLARE_CONCRETE_INSTRUCTION(Mod, "mod")
2569 2580
2570 protected: 2581 protected:
2571 virtual bool DataEquals(HValue* other) { return true; } 2582 virtual bool DataEquals(HValue* other) { return true; }
2572 2583
2573 virtual Range* InferRange(); 2584 virtual Range* InferRange();
2574 }; 2585 };
2575 2586
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 3258
3248 protected: 3259 protected:
3249 virtual bool DataEquals(HValue* other) { return true; } 3260 virtual bool DataEquals(HValue* other) { return true; }
3250 3261
3251 virtual Range* InferRange() { 3262 virtual Range* InferRange() {
3252 return new Range(0, String::kMaxUC16CharCode); 3263 return new Range(0, String::kMaxUC16CharCode);
3253 } 3264 }
3254 }; 3265 };
3255 3266
3256 3267
3268 class HStringCharFromCode: public HUnaryOperation {
3269 public:
3270 explicit HStringCharFromCode(HValue* char_code) : HUnaryOperation(char_code) {
3271 set_representation(Representation::Tagged());
3272 SetFlag(kUseGVN);
3273 }
3274
3275 virtual Representation RequiredInputRepresentation(int index) const {
3276 return Representation::Integer32();
3277 }
3278
3279 virtual bool DataEquals(HValue* other) { return true; }
3280
3281 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string_char_from_code")
3282 };
3283
3284
3257 class HStringLength: public HUnaryOperation { 3285 class HStringLength: public HUnaryOperation {
3258 public: 3286 public:
3259 explicit HStringLength(HValue* string) : HUnaryOperation(string) { 3287 explicit HStringLength(HValue* string) : HUnaryOperation(string) {
3260 set_representation(Representation::Tagged()); 3288 set_representation(Representation::Tagged());
3261 SetFlag(kUseGVN); 3289 SetFlag(kUseGVN);
3262 } 3290 }
3263 3291
3264 virtual Representation RequiredInputRepresentation(int index) const { 3292 virtual Representation RequiredInputRepresentation(int index) const {
3265 return Representation::Tagged(); 3293 return Representation::Tagged();
3266 } 3294 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3447 HValue* object() { return left(); } 3475 HValue* object() { return left(); }
3448 HValue* key() { return right(); } 3476 HValue* key() { return right(); }
3449 }; 3477 };
3450 3478
3451 #undef DECLARE_INSTRUCTION 3479 #undef DECLARE_INSTRUCTION
3452 #undef DECLARE_CONCRETE_INSTRUCTION 3480 #undef DECLARE_CONCRETE_INSTRUCTION
3453 3481
3454 } } // namespace v8::internal 3482 } } // namespace v8::internal
3455 3483
3456 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3484 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698