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

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

Issue 24243005: Use Unique<Map> in CompareMap. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplify Unique tests and disallow allocation during creation of unique in tests. Created 7 years, 3 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/arm/lithium-arm.h ('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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 1385
1386 1386
1387 class HCompareMap V8_FINAL : public HUnaryControlInstruction { 1387 class HCompareMap V8_FINAL : public HUnaryControlInstruction {
1388 public: 1388 public:
1389 DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>); 1389 DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>);
1390 DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>, 1390 DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>,
1391 HBasicBlock*, HBasicBlock*); 1391 HBasicBlock*, HBasicBlock*);
1392 1392
1393 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1393 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1394 1394
1395 Handle<Map> map() const { return map_; } 1395 Unique<Map> map() const { return map_; }
1396 1396
1397 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 1397 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
1398 return Representation::Tagged(); 1398 return Representation::Tagged();
1399 } 1399 }
1400 1400
1401 DECLARE_CONCRETE_INSTRUCTION(CompareMap) 1401 DECLARE_CONCRETE_INSTRUCTION(CompareMap)
1402 1402
1403 protected: 1403 protected:
1404 virtual int RedefinedOperandIndex() { return 0; } 1404 virtual int RedefinedOperandIndex() { return 0; }
1405 1405
1406 private: 1406 private:
1407 HCompareMap(HValue* value, 1407 HCompareMap(HValue* value,
1408 Handle<Map> map, 1408 Handle<Map> map,
1409 HBasicBlock* true_target = NULL, 1409 HBasicBlock* true_target = NULL,
1410 HBasicBlock* false_target = NULL) 1410 HBasicBlock* false_target = NULL)
1411 : HUnaryControlInstruction(value, true_target, false_target), map_(map) { 1411 : HUnaryControlInstruction(value, true_target, false_target),
1412 map_(Unique<Map>(map)) {
1412 ASSERT(!map.is_null()); 1413 ASSERT(!map.is_null());
1413 } 1414 }
1414 1415
1415 Handle<Map> map_; 1416 Unique<Map> map_;
1416 }; 1417 };
1417 1418
1418 1419
1419 class HContext V8_FINAL : public HTemplateInstruction<0> { 1420 class HContext V8_FINAL : public HTemplateInstruction<0> {
1420 public: 1421 public:
1421 static HContext* New(Zone* zone) { 1422 static HContext* New(Zone* zone) {
1422 return new(zone) HContext(); 1423 return new(zone) HContext();
1423 } 1424 }
1424 1425
1425 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 1426 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
(...skipping 5608 matching lines...) Expand 10 before | Expand all | Expand 10 after
7034 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7035 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7035 }; 7036 };
7036 7037
7037 7038
7038 #undef DECLARE_INSTRUCTION 7039 #undef DECLARE_INSTRUCTION
7039 #undef DECLARE_CONCRETE_INSTRUCTION 7040 #undef DECLARE_CONCRETE_INSTRUCTION
7040 7041
7041 } } // namespace v8::internal 7042 } } // namespace v8::internal
7042 7043
7043 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7044 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698