| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ | 55 #define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ |
| 56 V(BitwiseBinaryOperation) \ | 56 V(BitwiseBinaryOperation) \ |
| 57 V(ControlInstruction) \ | 57 V(ControlInstruction) \ |
| 58 V(Instruction) \ | 58 V(Instruction) \ |
| 59 | 59 |
| 60 | 60 |
| 61 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ | 61 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ |
| 62 V(AbnormalExit) \ | 62 V(AbnormalExit) \ |
| 63 V(AccessArgumentsAt) \ | 63 V(AccessArgumentsAt) \ |
| 64 V(Add) \ | 64 V(Add) \ |
| 65 V(AllocateObject) \ |
| 65 V(ApplyArguments) \ | 66 V(ApplyArguments) \ |
| 66 V(ArgumentsElements) \ | 67 V(ArgumentsElements) \ |
| 67 V(ArgumentsLength) \ | 68 V(ArgumentsLength) \ |
| 68 V(ArgumentsObject) \ | 69 V(ArgumentsObject) \ |
| 69 V(ArrayLiteral) \ | 70 V(ArrayLiteral) \ |
| 70 V(Bitwise) \ | 71 V(Bitwise) \ |
| 71 V(BitNot) \ | 72 V(BitNot) \ |
| 72 V(BlockEntry) \ | 73 V(BlockEntry) \ |
| 73 V(BoundsCheck) \ | 74 V(BoundsCheck) \ |
| 74 V(Branch) \ | 75 V(Branch) \ |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 private: | 1337 private: |
| 1337 Type type_; | 1338 Type type_; |
| 1338 }; | 1339 }; |
| 1339 | 1340 |
| 1340 | 1341 |
| 1341 class HEnterInlined: public HTemplateInstruction<0> { | 1342 class HEnterInlined: public HTemplateInstruction<0> { |
| 1342 public: | 1343 public: |
| 1343 HEnterInlined(Handle<JSFunction> closure, | 1344 HEnterInlined(Handle<JSFunction> closure, |
| 1344 int arguments_count, | 1345 int arguments_count, |
| 1345 FunctionLiteral* function, | 1346 FunctionLiteral* function, |
| 1346 CallKind call_kind) | 1347 CallKind call_kind, |
| 1348 bool is_construct) |
| 1347 : closure_(closure), | 1349 : closure_(closure), |
| 1348 arguments_count_(arguments_count), | 1350 arguments_count_(arguments_count), |
| 1349 function_(function), | 1351 function_(function), |
| 1350 call_kind_(call_kind) { | 1352 call_kind_(call_kind), |
| 1353 is_construct_(is_construct) { |
| 1351 } | 1354 } |
| 1352 | 1355 |
| 1353 virtual void PrintDataTo(StringStream* stream); | 1356 virtual void PrintDataTo(StringStream* stream); |
| 1354 | 1357 |
| 1355 Handle<JSFunction> closure() const { return closure_; } | 1358 Handle<JSFunction> closure() const { return closure_; } |
| 1356 int arguments_count() const { return arguments_count_; } | 1359 int arguments_count() const { return arguments_count_; } |
| 1357 FunctionLiteral* function() const { return function_; } | 1360 FunctionLiteral* function() const { return function_; } |
| 1358 CallKind call_kind() const { return call_kind_; } | 1361 CallKind call_kind() const { return call_kind_; } |
| 1362 bool is_construct() const { return is_construct_; } |
| 1359 | 1363 |
| 1360 virtual Representation RequiredInputRepresentation(int index) { | 1364 virtual Representation RequiredInputRepresentation(int index) { |
| 1361 return Representation::None(); | 1365 return Representation::None(); |
| 1362 } | 1366 } |
| 1363 | 1367 |
| 1364 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) | 1368 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) |
| 1365 | 1369 |
| 1366 private: | 1370 private: |
| 1367 Handle<JSFunction> closure_; | 1371 Handle<JSFunction> closure_; |
| 1368 int arguments_count_; | 1372 int arguments_count_; |
| 1369 FunctionLiteral* function_; | 1373 FunctionLiteral* function_; |
| 1370 CallKind call_kind_; | 1374 CallKind call_kind_; |
| 1375 bool is_construct_; |
| 1371 }; | 1376 }; |
| 1372 | 1377 |
| 1373 | 1378 |
| 1374 class HLeaveInlined: public HTemplateInstruction<0> { | 1379 class HLeaveInlined: public HTemplateInstruction<0> { |
| 1375 public: | 1380 public: |
| 1376 HLeaveInlined() {} | 1381 HLeaveInlined() {} |
| 1377 | 1382 |
| 1378 virtual Representation RequiredInputRepresentation(int index) { | 1383 virtual Representation RequiredInputRepresentation(int index) { |
| 1379 return Representation::None(); | 1384 return Representation::None(); |
| 1380 } | 1385 } |
| (...skipping 2885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4266 | 4271 |
| 4267 protected: | 4272 protected: |
| 4268 virtual bool DataEquals(HValue* other) { return true; } | 4273 virtual bool DataEquals(HValue* other) { return true; } |
| 4269 | 4274 |
| 4270 virtual Range* InferRange() { | 4275 virtual Range* InferRange() { |
| 4271 return new Range(0, String::kMaxLength); | 4276 return new Range(0, String::kMaxLength); |
| 4272 } | 4277 } |
| 4273 }; | 4278 }; |
| 4274 | 4279 |
| 4275 | 4280 |
| 4281 class HAllocateObject: public HTemplateInstruction<2> { |
| 4282 public: |
| 4283 HAllocateObject(HValue* context, |
| 4284 HValue* function, |
| 4285 Handle<JSFunction> constructor) |
| 4286 : constructor_(constructor) { |
| 4287 SetOperandAt(0, context); |
| 4288 SetOperandAt(1, function); |
| 4289 set_representation(Representation::Tagged()); |
| 4290 } |
| 4291 |
| 4292 HValue* context() { return OperandAt(0); } |
| 4293 HValue* function() { return OperandAt(1); } |
| 4294 Handle<JSFunction> constructor() { return constructor_; } |
| 4295 |
| 4296 virtual Representation RequiredInputRepresentation(int index) { |
| 4297 return Representation::Tagged(); |
| 4298 } |
| 4299 virtual HType CalculateInferredType(); |
| 4300 |
| 4301 DECLARE_CONCRETE_INSTRUCTION(AllocateObject) |
| 4302 |
| 4303 private: |
| 4304 Handle<JSFunction> constructor_; |
| 4305 }; |
| 4306 |
| 4307 |
| 4276 template <int V> | 4308 template <int V> |
| 4277 class HMaterializedLiteral: public HTemplateInstruction<V> { | 4309 class HMaterializedLiteral: public HTemplateInstruction<V> { |
| 4278 public: | 4310 public: |
| 4279 HMaterializedLiteral<V>(int index, int depth) | 4311 HMaterializedLiteral<V>(int index, int depth) |
| 4280 : literal_index_(index), depth_(depth) { | 4312 : literal_index_(index), depth_(depth) { |
| 4281 this->set_representation(Representation::Tagged()); | 4313 this->set_representation(Representation::Tagged()); |
| 4282 } | 4314 } |
| 4283 | 4315 |
| 4284 int literal_index() const { return literal_index_; } | 4316 int literal_index() const { return literal_index_; } |
| 4285 int depth() const { return depth_; } | 4317 int depth() const { return depth_; } |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4558 | 4590 |
| 4559 DECLARE_CONCRETE_INSTRUCTION(In) | 4591 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4560 }; | 4592 }; |
| 4561 | 4593 |
| 4562 #undef DECLARE_INSTRUCTION | 4594 #undef DECLARE_INSTRUCTION |
| 4563 #undef DECLARE_CONCRETE_INSTRUCTION | 4595 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4564 | 4596 |
| 4565 } } // namespace v8::internal | 4597 } } // namespace v8::internal |
| 4566 | 4598 |
| 4567 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4599 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |