| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS | 
| 6 | 6 | 
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: | 
| 8 // | 8 // | 
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined | 
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first | 
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 753   VariableProxy* proxy = declaration->proxy(); | 753   VariableProxy* proxy = declaration->proxy(); | 
| 754   Variable* variable = proxy->var(); | 754   Variable* variable = proxy->var(); | 
| 755   DCHECK(!variable->binding_needs_init()); | 755   DCHECK(!variable->binding_needs_init()); | 
| 756   switch (variable->location()) { | 756   switch (variable->location()) { | 
| 757     case VariableLocation::UNALLOCATED: { | 757     case VariableLocation::UNALLOCATED: { | 
| 758       globals_->Add(variable->name(), zone()); | 758       globals_->Add(variable->name(), zone()); | 
| 759       FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 759       FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 
| 760       DCHECK(!slot.IsInvalid()); | 760       DCHECK(!slot.IsInvalid()); | 
| 761       globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 761       globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 
| 762       globals_->Add(isolate()->factory()->undefined_value(), zone()); | 762       globals_->Add(isolate()->factory()->undefined_value(), zone()); | 
| 763       globals_->Add(isolate()->factory()->undefined_value(), zone()); |  | 
| 764       break; | 763       break; | 
| 765     } | 764     } | 
| 766     case VariableLocation::PARAMETER: | 765     case VariableLocation::PARAMETER: | 
| 767     case VariableLocation::LOCAL: | 766     case VariableLocation::LOCAL: | 
| 768     case VariableLocation::CONTEXT: | 767     case VariableLocation::CONTEXT: | 
| 769       break; | 768       break; | 
| 770 | 769 | 
| 771     case VariableLocation::LOOKUP: | 770     case VariableLocation::LOOKUP: | 
| 772     case VariableLocation::MODULE: | 771     case VariableLocation::MODULE: | 
| 773       UNREACHABLE(); | 772       UNREACHABLE(); | 
| 774   } | 773   } | 
| 775 } | 774 } | 
| 776 | 775 | 
| 777 | 776 | 
| 778 void FullCodeGenerator::VisitFunctionDeclaration( | 777 void FullCodeGenerator::VisitFunctionDeclaration( | 
| 779     FunctionDeclaration* declaration) { | 778     FunctionDeclaration* declaration) { | 
| 780   VariableProxy* proxy = declaration->proxy(); | 779   VariableProxy* proxy = declaration->proxy(); | 
| 781   Variable* variable = proxy->var(); | 780   Variable* variable = proxy->var(); | 
| 782   switch (variable->location()) { | 781   switch (variable->location()) { | 
| 783     case VariableLocation::UNALLOCATED: { | 782     case VariableLocation::UNALLOCATED: { | 
| 784       globals_->Add(variable->name(), zone()); | 783       globals_->Add(variable->name(), zone()); | 
| 785       FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 784       FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 
| 786       DCHECK(!slot.IsInvalid()); | 785       DCHECK(!slot.IsInvalid()); | 
| 787       globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 786       globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 
| 788 |  | 
| 789       // We need the slot where the literals array lives, too. |  | 
| 790       slot = declaration->fun()->LiteralFeedbackSlot(); |  | 
| 791       DCHECK(!slot.IsInvalid()); |  | 
| 792       globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |  | 
| 793 |  | 
| 794       Handle<SharedFunctionInfo> function = | 787       Handle<SharedFunctionInfo> function = | 
| 795           Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 788           Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 
| 796       // Check for stack-overflow exception. | 789       // Check for stack-overflow exception. | 
| 797       if (function.is_null()) return SetStackOverflow(); | 790       if (function.is_null()) return SetStackOverflow(); | 
| 798       globals_->Add(function, zone()); | 791       globals_->Add(function, zone()); | 
| 799       break; | 792       break; | 
| 800     } | 793     } | 
| 801 | 794 | 
| 802     case VariableLocation::PARAMETER: | 795     case VariableLocation::PARAMETER: | 
| 803     case VariableLocation::LOCAL: { | 796     case VariableLocation::LOCAL: { | 
| (...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2799          reinterpret_cast<uint32_t>( | 2792          reinterpret_cast<uint32_t>( | 
| 2800              isolate->builtins()->OnStackReplacement()->entry())); | 2793              isolate->builtins()->OnStackReplacement()->entry())); | 
| 2801   return ON_STACK_REPLACEMENT; | 2794   return ON_STACK_REPLACEMENT; | 
| 2802 } | 2795 } | 
| 2803 | 2796 | 
| 2804 | 2797 | 
| 2805 }  // namespace internal | 2798 }  // namespace internal | 
| 2806 }  // namespace v8 | 2799 }  // namespace v8 | 
| 2807 | 2800 | 
| 2808 #endif  // V8_TARGET_ARCH_MIPS | 2801 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW | 
|---|