| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { | 775 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { |
| 776 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); | 776 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); |
| 777 } | 777 } |
| 778 | 778 |
| 779 | 779 |
| 780 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 780 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 781 // Call the runtime to declare the globals. | 781 // Call the runtime to declare the globals. |
| 782 // The context is the first argument. | 782 // The context is the first argument. |
| 783 __ li(a2, Operand(pairs)); | 783 __ li(a2, Operand(pairs)); |
| 784 __ li(a1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); | 784 __ li(a1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); |
| 785 __ li(a0, Operand(Smi::FromInt(strict_mode_flag()))); | 785 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); |
| 786 __ Push(cp, a2, a1, a0); | 786 __ Push(cp, a2, a1, a0); |
| 787 __ CallRuntime(Runtime::kDeclareGlobals, 4); | 787 __ CallRuntime(Runtime::kDeclareGlobals, 3); |
| 788 // Return value is ignored. | 788 // Return value is ignored. |
| 789 } | 789 } |
| 790 | 790 |
| 791 | 791 |
| 792 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { | 792 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
| 793 Comment cmnt(masm_, "[ SwitchStatement"); | 793 Comment cmnt(masm_, "[ SwitchStatement"); |
| 794 Breakable nested_statement(this, stmt); | 794 Breakable nested_statement(this, stmt); |
| 795 SetStatementPosition(stmt); | 795 SetStatementPosition(stmt); |
| 796 | 796 |
| 797 // Keep the switch value on the stack until a case matches. | 797 // Keep the switch value on the stack until a case matches. |
| (...skipping 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4220 __ Addu(at, a1, Operand(masm_->CodeObject())); | 4220 __ Addu(at, a1, Operand(masm_->CodeObject())); |
| 4221 __ Jump(at); | 4221 __ Jump(at); |
| 4222 } | 4222 } |
| 4223 | 4223 |
| 4224 | 4224 |
| 4225 #undef __ | 4225 #undef __ |
| 4226 | 4226 |
| 4227 } } // namespace v8::internal | 4227 } } // namespace v8::internal |
| 4228 | 4228 |
| 4229 #endif // V8_TARGET_ARCH_MIPS | 4229 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |