| OLD | NEW | 
|     1 // Copyright 2009 the V8 project authors. All rights reserved. |     1 // Copyright 2009 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   167     stack_pointer_ = end; |   167     stack_pointer_ = end; | 
|   168     __ sub(Operand(esp), Immediate(delta * kPointerSize)); |   168     __ sub(Operand(esp), Immediate(delta * kPointerSize)); | 
|   169   } |   169   } | 
|   170  |   170  | 
|   171   for (int i = start; i <= end; i++) { |   171   for (int i = start; i <= end; i++) { | 
|   172     if (!elements_[i].is_synced()) SyncElementBelowStackPointer(i); |   172     if (!elements_[i].is_synced()) SyncElementBelowStackPointer(i); | 
|   173   } |   173   } | 
|   174 } |   174 } | 
|   175  |   175  | 
|   176  |   176  | 
|   177 void VirtualFrame::MakeMergable(int mergable_elements) { |   177 void VirtualFrame::MakeMergable() { | 
|   178   if (mergable_elements == JumpTarget::kAllElements) { |   178   for (int i = 0; i < element_count(); i++) { | 
|   179     mergable_elements = element_count(); |  | 
|   180   } |  | 
|   181   ASSERT(mergable_elements <= element_count()); |  | 
|   182  |  | 
|   183   int start_index = element_count() - mergable_elements; |  | 
|   184   for (int i = start_index; i < element_count(); i++) { |  | 
|   185     FrameElement element = elements_[i]; |   179     FrameElement element = elements_[i]; | 
|   186  |   180  | 
|   187     if (element.is_constant() || element.is_copy()) { |   181     if (element.is_constant() || element.is_copy()) { | 
|   188       if (element.is_synced()) { |   182       if (element.is_synced()) { | 
|   189         // Just spill. |   183         // Just spill. | 
|   190         elements_[i] = FrameElement::MemoryElement(); |   184         elements_[i] = FrameElement::MemoryElement(); | 
|   191       } else { |   185       } else { | 
|   192         // Allocate to a register. |   186         // Allocate to a register. | 
|   193         FrameElement backing_element;  // Invalid if not a copy. |   187         FrameElement backing_element;  // Invalid if not a copy. | 
|   194         if (element.is_copy()) { |   188         if (element.is_copy()) { | 
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1085   ASSERT(stack_pointer_ == element_count() - 1); |  1079   ASSERT(stack_pointer_ == element_count() - 1); | 
|  1086   elements_.Add(FrameElement::MemoryElement()); |  1080   elements_.Add(FrameElement::MemoryElement()); | 
|  1087   stack_pointer_++; |  1081   stack_pointer_++; | 
|  1088   __ push(immediate); |  1082   __ push(immediate); | 
|  1089 } |  1083 } | 
|  1090  |  1084  | 
|  1091  |  1085  | 
|  1092 #undef __ |  1086 #undef __ | 
|  1093  |  1087  | 
|  1094 } }  // namespace v8::internal |  1088 } }  // namespace v8::internal | 
| OLD | NEW |