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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 break; | 104 break; |
105 case DOUBLE_STACK_SLOT: | 105 case DOUBLE_STACK_SLOT: |
106 stream->Add("[double_stack:%d]", index()); | 106 stream->Add("[double_stack:%d]", index()); |
107 break; | 107 break; |
108 case REGISTER: | 108 case REGISTER: |
109 stream->Add("[%s|R]", Register::AllocationIndexToString(index())); | 109 stream->Add("[%s|R]", Register::AllocationIndexToString(index())); |
110 break; | 110 break; |
111 case DOUBLE_REGISTER: | 111 case DOUBLE_REGISTER: |
112 stream->Add("[%s|R]", DoubleRegister::AllocationIndexToString(index())); | 112 stream->Add("[%s|R]", DoubleRegister::AllocationIndexToString(index())); |
113 break; | 113 break; |
114 case ARGUMENT: | |
115 stream->Add("[arg:%d]", index()); | |
116 break; | |
117 } | 114 } |
118 } | 115 } |
119 | 116 |
120 #define DEFINE_OPERAND_CACHE(name, type) \ | 117 #define DEFINE_OPERAND_CACHE(name, type) \ |
121 L##name* L##name::cache = NULL; \ | 118 L##name* L##name::cache = NULL; \ |
122 \ | 119 \ |
123 void L##name::SetUpCache() { \ | 120 void L##name::SetUpCache() { \ |
124 if (cache) return; \ | 121 if (cache) return; \ |
125 cache = new L##name[kNumCachedOperands]; \ | 122 cache = new L##name[kNumCachedOperands]; \ |
126 for (int i = 0; i < kNumCachedOperands; i++) { \ | 123 for (int i = 0; i < kNumCachedOperands; i++) { \ |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 zone()); | 488 zone()); |
492 int argument_index = *argument_index_accumulator; | 489 int argument_index = *argument_index_accumulator; |
493 | 490 |
494 // Store the environment description into the environment | 491 // Store the environment description into the environment |
495 // (with holes for nested objects) | 492 // (with holes for nested objects) |
496 for (int i = 0; i < hydrogen_env->length(); ++i) { | 493 for (int i = 0; i < hydrogen_env->length(); ++i) { |
497 if (hydrogen_env->is_special_index(i)) continue; | 494 if (hydrogen_env->is_special_index(i)) continue; |
498 | 495 |
499 LOperand* op; | 496 LOperand* op; |
500 HValue* value = hydrogen_env->values()->at(i); | 497 HValue* value = hydrogen_env->values()->at(i); |
| 498 CHECK(!value->IsPushArgument()); // Do not deopt outgoing arguments |
501 if (value->IsArgumentsObject() || value->IsCapturedObject()) { | 499 if (value->IsArgumentsObject() || value->IsCapturedObject()) { |
502 op = LEnvironment::materialization_marker(); | 500 op = LEnvironment::materialization_marker(); |
503 } else if (value->IsPushArgument()) { | |
504 op = new(zone()) LArgument(argument_index++); | |
505 } else { | 501 } else { |
506 op = UseAny(value); | 502 op = UseAny(value); |
507 } | 503 } |
508 result->AddValue(op, | 504 result->AddValue(op, |
509 value->representation(), | 505 value->representation(), |
510 value->CheckFlag(HInstruction::kUint32)); | 506 value->CheckFlag(HInstruction::kUint32)); |
511 } | 507 } |
512 | 508 |
513 // Recursively store the nested objects into the environment | 509 // Recursively store the nested objects into the environment |
514 for (int i = 0; i < hydrogen_env->length(); ++i) { | 510 for (int i = 0; i < hydrogen_env->length(); ++i) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 | 604 |
609 | 605 |
610 LPhase::~LPhase() { | 606 LPhase::~LPhase() { |
611 if (ShouldProduceTraceOutput()) { | 607 if (ShouldProduceTraceOutput()) { |
612 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 608 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
613 } | 609 } |
614 } | 610 } |
615 | 611 |
616 | 612 |
617 } } // namespace v8::internal | 613 } } // namespace v8::internal |
OLD | NEW |