| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 case FAST_HOLEY_ELEMENTS: | 250 case FAST_HOLEY_ELEMENTS: |
| 251 case DICTIONARY_ELEMENTS: | 251 case DICTIONARY_ELEMENTS: |
| 252 case NON_STRICT_ARGUMENTS_ELEMENTS: | 252 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 253 return kPointerSizeLog2; | 253 return kPointerSizeLog2; |
| 254 } | 254 } |
| 255 UNREACHABLE(); | 255 UNREACHABLE(); |
| 256 return 0; | 256 return 0; |
| 257 } | 257 } |
| 258 | 258 |
| 259 | 259 |
| 260 int StackSlotOffset(int index) { |
| 261 if (index >= 0) { |
| 262 // Local or spill slot. Skip the frame pointer, function, and |
| 263 // context in the fixed part of the frame. |
| 264 return -(index + 3) * kPointerSize; |
| 265 } else { |
| 266 // Incoming parameter. Skip the return address. |
| 267 return -(index - 1) * kPointerSize; |
| 268 } |
| 269 } |
| 270 |
| 271 |
| 260 LChunk::LChunk(CompilationInfo* info, HGraph* graph) | 272 LChunk::LChunk(CompilationInfo* info, HGraph* graph) |
| 261 : spill_slot_count_(0), | 273 : spill_slot_count_(0), |
| 262 info_(info), | 274 info_(info), |
| 263 graph_(graph), | 275 graph_(graph), |
| 264 instructions_(32, graph->zone()), | 276 instructions_(32, graph->zone()), |
| 265 pointer_maps_(8, graph->zone()), | 277 pointer_maps_(8, graph->zone()), |
| 266 inlined_closures_(1, graph->zone()) { | 278 inlined_closures_(1, graph->zone()) { |
| 267 } | 279 } |
| 268 | 280 |
| 269 | 281 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 } else { | 500 } else { |
| 489 spill_slot_count_++; | 501 spill_slot_count_++; |
| 490 } | 502 } |
| 491 } | 503 } |
| 492 iterator.Advance(); | 504 iterator.Advance(); |
| 493 } | 505 } |
| 494 } | 506 } |
| 495 | 507 |
| 496 | 508 |
| 497 } } // namespace v8::internal | 509 } } // namespace v8::internal |
| OLD | NEW |