| 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 23 matching lines...) Expand all Loading... |
| 34 #include "ia32/lithium-codegen-ia32.h" | 34 #include "ia32/lithium-codegen-ia32.h" |
| 35 #elif V8_TARGET_ARCH_X64 | 35 #elif V8_TARGET_ARCH_X64 |
| 36 #include "x64/lithium-x64.h" | 36 #include "x64/lithium-x64.h" |
| 37 #include "x64/lithium-codegen-x64.h" | 37 #include "x64/lithium-codegen-x64.h" |
| 38 #elif V8_TARGET_ARCH_ARM | 38 #elif V8_TARGET_ARCH_ARM |
| 39 #include "arm/lithium-arm.h" | 39 #include "arm/lithium-arm.h" |
| 40 #include "arm/lithium-codegen-arm.h" | 40 #include "arm/lithium-codegen-arm.h" |
| 41 #elif V8_TARGET_ARCH_MIPS | 41 #elif V8_TARGET_ARCH_MIPS |
| 42 #include "mips/lithium-mips.h" | 42 #include "mips/lithium-mips.h" |
| 43 #include "mips/lithium-codegen-mips.h" | 43 #include "mips/lithium-codegen-mips.h" |
| 44 #elif V8_TARGET_ARCH_A64 |
| 45 #include "a64/lithium-a64.h" |
| 46 #include "a64/lithium-codegen-a64.h" |
| 44 #else | 47 #else |
| 45 #error "Unknown architecture." | 48 #error "Unknown architecture." |
| 46 #endif | 49 #endif |
| 47 | 50 |
| 48 namespace v8 { | 51 namespace v8 { |
| 49 namespace internal { | 52 namespace internal { |
| 50 | 53 |
| 51 | 54 |
| 52 void LOperand::PrintTo(StringStream* stream) { | 55 void LOperand::PrintTo(StringStream* stream) { |
| 53 LUnallocated* unalloc = NULL; | 56 LUnallocated* unalloc = NULL; |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 } | 528 } |
| 526 | 529 |
| 527 | 530 |
| 528 // Add an object to the supplied environment and object materialization list. | 531 // Add an object to the supplied environment and object materialization list. |
| 529 // | 532 // |
| 530 // Notes: | 533 // Notes: |
| 531 // | 534 // |
| 532 // We are building three lists here: | 535 // We are building three lists here: |
| 533 // | 536 // |
| 534 // 1. In the result->object_mapping_ list (added to by the | 537 // 1. In the result->object_mapping_ list (added to by the |
| 535 // LEnvironment::Add*Object methods), we store the lengths (number | 538 // LEnvironment::Add*Object methods), we store the lengths (number |
| 536 // of fields) of the captured objects in depth-first traversal order, or | 539 // of fields) of the captured objects in depth-first traversal order, or |
| 537 // in case of duplicated objects, we store the index to the duplicate object | 540 // in case of duplicated objects, we store the index to the duplicate object |
| 538 // (with a tag to differentiate between captured and duplicated objects). | 541 // (with a tag to differentiate between captured and duplicated objects). |
| 539 // | 542 // |
| 540 // 2. The object fields are stored in the result->values_ list | 543 // 2. The object fields are stored in the result->values_ list |
| 541 // (added to by the LEnvironment.AddValue method) sequentially as lists | 544 // (added to by the LEnvironment.AddValue method) sequentially as lists |
| 542 // of fields with holes for nested objects (the holes will be expanded | 545 // of fields with holes for nested objects (the holes will be expanded |
| 543 // later by LCodegen::AddToTranslation according to the | 546 // later by LCodegen::AddToTranslation according to the |
| 544 // LEnvironment.object_mapping_ list). | 547 // LEnvironment.object_mapping_ list). |
| 545 // | 548 // |
| 546 // 3. The auxiliary objects_to_materialize array stores the hydrogen values | 549 // 3. The auxiliary objects_to_materialize array stores the hydrogen values |
| 547 // in the same order as result->object_mapping_ list. This is used | 550 // in the same order as result->object_mapping_ list. This is used |
| 548 // to detect duplicate values and calculate the corresponding object index. | 551 // to detect duplicate values and calculate the corresponding object index. |
| 549 void LChunkBuilderBase::AddObjectToMaterialize(HValue* value, | 552 void LChunkBuilderBase::AddObjectToMaterialize(HValue* value, |
| 550 ZoneList<HValue*>* objects_to_materialize, LEnvironment* result) { | 553 ZoneList<HValue*>* objects_to_materialize, LEnvironment* result) { |
| 551 int object_index = objects_to_materialize->length(); | 554 int object_index = objects_to_materialize->length(); |
| 552 // Store the hydrogen value into the de-duplication array | 555 // Store the hydrogen value into the de-duplication array |
| 553 objects_to_materialize->Add(value, zone()); | 556 objects_to_materialize->Add(value, zone()); |
| 554 // Find out whether we are storing a duplicated value | 557 // Find out whether we are storing a duplicated value |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 608 |
| 606 | 609 |
| 607 LPhase::~LPhase() { | 610 LPhase::~LPhase() { |
| 608 if (ShouldProduceTraceOutput()) { | 611 if (ShouldProduceTraceOutput()) { |
| 609 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 612 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 610 } | 613 } |
| 611 } | 614 } |
| 612 | 615 |
| 613 | 616 |
| 614 } } // namespace v8::internal | 617 } } // namespace v8::internal |
| OLD | NEW |