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

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

Issue 10831172: Introduced TypeFeedbackId and BailoutId types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review feedback. Created 8 years, 4 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/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 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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 1289
1290 DECLARE_CONCRETE_INSTRUCTION(ClampToUint8) 1290 DECLARE_CONCRETE_INSTRUCTION(ClampToUint8)
1291 1291
1292 protected: 1292 protected:
1293 virtual bool DataEquals(HValue* other) { return true; } 1293 virtual bool DataEquals(HValue* other) { return true; }
1294 }; 1294 };
1295 1295
1296 1296
1297 class HSimulate: public HInstruction { 1297 class HSimulate: public HInstruction {
1298 public: 1298 public:
1299 HSimulate(int ast_id, int pop_count, Zone* zone) 1299 HSimulate(BailoutId ast_id, int pop_count, Zone* zone)
1300 : ast_id_(ast_id), 1300 : ast_id_(ast_id),
1301 pop_count_(pop_count), 1301 pop_count_(pop_count),
1302 values_(2, zone), 1302 values_(2, zone),
1303 assigned_indexes_(2, zone), 1303 assigned_indexes_(2, zone),
1304 zone_(zone) {} 1304 zone_(zone) {}
1305 virtual ~HSimulate() {} 1305 virtual ~HSimulate() {}
1306 1306
1307 virtual void PrintDataTo(StringStream* stream); 1307 virtual void PrintDataTo(StringStream* stream);
1308 1308
1309 bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; } 1309 bool HasAstId() const { return !ast_id_.IsNone(); }
1310 int ast_id() const { return ast_id_; } 1310 BailoutId ast_id() const { return ast_id_; }
1311 void set_ast_id(int id) { 1311 void set_ast_id(BailoutId id) {
1312 ASSERT(!HasAstId()); 1312 ASSERT(!HasAstId());
1313 ast_id_ = id; 1313 ast_id_ = id;
1314 } 1314 }
1315 1315
1316 int pop_count() const { return pop_count_; } 1316 int pop_count() const { return pop_count_; }
1317 const ZoneList<HValue*>* values() const { return &values_; } 1317 const ZoneList<HValue*>* values() const { return &values_; }
1318 int GetAssignedIndexAt(int index) const { 1318 int GetAssignedIndexAt(int index) const {
1319 ASSERT(HasAssignedIndexAt(index)); 1319 ASSERT(HasAssignedIndexAt(index));
1320 return assigned_indexes_[index]; 1320 return assigned_indexes_[index];
1321 } 1321 }
(...skipping 27 matching lines...) Expand all
1349 private: 1349 private:
1350 static const int kNoIndex = -1; 1350 static const int kNoIndex = -1;
1351 void AddValue(int index, HValue* value) { 1351 void AddValue(int index, HValue* value) {
1352 assigned_indexes_.Add(index, zone_); 1352 assigned_indexes_.Add(index, zone_);
1353 // Resize the list of pushed values. 1353 // Resize the list of pushed values.
1354 values_.Add(NULL, zone_); 1354 values_.Add(NULL, zone_);
1355 // Set the operand through the base method in HValue to make sure that the 1355 // Set the operand through the base method in HValue to make sure that the
1356 // use lists are correctly updated. 1356 // use lists are correctly updated.
1357 SetOperandAt(values_.length() - 1, value); 1357 SetOperandAt(values_.length() - 1, value);
1358 } 1358 }
1359 int ast_id_; 1359 BailoutId ast_id_;
1360 int pop_count_; 1360 int pop_count_;
1361 ZoneList<HValue*> values_; 1361 ZoneList<HValue*> values_;
1362 ZoneList<int> assigned_indexes_; 1362 ZoneList<int> assigned_indexes_;
1363 Zone* zone_; 1363 Zone* zone_;
1364 }; 1364 };
1365 1365
1366 1366
1367 class HStackCheck: public HTemplateInstruction<1> { 1367 class HStackCheck: public HTemplateInstruction<1> {
1368 public: 1368 public:
1369 enum Type { 1369 enum Type {
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
3559 3559
3560 DECLARE_CONCRETE_INSTRUCTION(Sar) 3560 DECLARE_CONCRETE_INSTRUCTION(Sar)
3561 3561
3562 protected: 3562 protected:
3563 virtual bool DataEquals(HValue* other) { return true; } 3563 virtual bool DataEquals(HValue* other) { return true; }
3564 }; 3564 };
3565 3565
3566 3566
3567 class HOsrEntry: public HTemplateInstruction<0> { 3567 class HOsrEntry: public HTemplateInstruction<0> {
3568 public: 3568 public:
3569 explicit HOsrEntry(int ast_id) : ast_id_(ast_id) { 3569 explicit HOsrEntry(BailoutId ast_id) : ast_id_(ast_id) {
3570 SetGVNFlag(kChangesOsrEntries); 3570 SetGVNFlag(kChangesOsrEntries);
3571 } 3571 }
3572 3572
3573 int ast_id() const { return ast_id_; } 3573 BailoutId ast_id() const { return ast_id_; }
3574 3574
3575 virtual Representation RequiredInputRepresentation(int index) { 3575 virtual Representation RequiredInputRepresentation(int index) {
3576 return Representation::None(); 3576 return Representation::None();
3577 } 3577 }
3578 3578
3579 DECLARE_CONCRETE_INSTRUCTION(OsrEntry) 3579 DECLARE_CONCRETE_INSTRUCTION(OsrEntry)
3580 3580
3581 private: 3581 private:
3582 int ast_id_; 3582 BailoutId ast_id_;
3583 }; 3583 };
3584 3584
3585 3585
3586 class HParameter: public HTemplateInstruction<0> { 3586 class HParameter: public HTemplateInstruction<0> {
3587 public: 3587 public:
3588 explicit HParameter(unsigned index) : index_(index) { 3588 explicit HParameter(unsigned index) : index_(index) {
3589 set_representation(Representation::Tagged()); 3589 set_representation(Representation::Tagged());
3590 } 3590 }
3591 3591
3592 unsigned index() const { return index_; } 3592 unsigned index() const { return index_; }
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
5196 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 5196 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
5197 }; 5197 };
5198 5198
5199 5199
5200 #undef DECLARE_INSTRUCTION 5200 #undef DECLARE_INSTRUCTION
5201 #undef DECLARE_CONCRETE_INSTRUCTION 5201 #undef DECLARE_CONCRETE_INSTRUCTION
5202 5202
5203 } } // namespace v8::internal 5203 } } // namespace v8::internal
5204 5204
5205 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5205 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698