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

Side by Side Diff: src/hydrogen.h

Issue 369673007: Hydrogenized KeyedLoadGeneric stub: Fix BuildDecodeField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 static const int kElementLoopUnrollThreshold = 8; 1304 static const int kElementLoopUnrollThreshold = 8;
1305 1305
1306 protected: 1306 protected:
1307 virtual bool BuildGraph() = 0; 1307 virtual bool BuildGraph() = 0;
1308 1308
1309 HBasicBlock* CreateBasicBlock(HEnvironment* env); 1309 HBasicBlock* CreateBasicBlock(HEnvironment* env);
1310 HBasicBlock* CreateLoopHeaderBlock(); 1310 HBasicBlock* CreateLoopHeaderBlock();
1311 1311
1312 template <class BitFieldClass> 1312 template <class BitFieldClass>
1313 HValue* BuildDecodeField(HValue* encoded_field) { 1313 HValue* BuildDecodeField(HValue* encoded_field) {
1314 HValue* shifted_field = AddUncasted<HShr>(encoded_field, 1314 HValue* mask_value = Add<HConstant>(static_cast<int>(BitFieldClass::kMask));
1315 HValue* masked_field =
1316 AddUncasted<HBitwise>(Token::BIT_AND, encoded_field, mask_value);
1317 return AddUncasted<HShr>(masked_field,
1315 Add<HConstant>(static_cast<int>(BitFieldClass::kShift))); 1318 Add<HConstant>(static_cast<int>(BitFieldClass::kShift)));
1316 HValue* mask_value = Add<HConstant>(static_cast<int>(BitFieldClass::kMask));
1317 return AddUncasted<HBitwise>(Token::BIT_AND, shifted_field, mask_value);
1318 } 1319 }
1319 1320
1320 HValue* BuildGetElementsKind(HValue* object); 1321 HValue* BuildGetElementsKind(HValue* object);
1321 1322
1322 HValue* BuildCheckHeapObject(HValue* object); 1323 HValue* BuildCheckHeapObject(HValue* object);
1323 HValue* BuildCheckString(HValue* string); 1324 HValue* BuildCheckString(HValue* string);
1324 HValue* BuildWrapReceiver(HValue* object, HValue* function); 1325 HValue* BuildWrapReceiver(HValue* object, HValue* function);
1325 1326
1326 // Building common constructs 1327 // Building common constructs
1327 HValue* BuildCheckForCapacityGrow(HValue* object, 1328 HValue* BuildCheckForCapacityGrow(HValue* object,
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 } 2895 }
2895 2896
2896 private: 2897 private:
2897 HGraphBuilder* builder_; 2898 HGraphBuilder* builder_;
2898 }; 2899 };
2899 2900
2900 2901
2901 } } // namespace v8::internal 2902 } } // namespace v8::internal
2902 2903
2903 #endif // V8_HYDROGEN_H_ 2904 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698