| 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 764 |
| 765 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { | 765 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { |
| 766 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); | 766 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); |
| 767 } | 767 } |
| 768 | 768 |
| 769 | 769 |
| 770 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 770 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 771 // Call the runtime to declare the globals. | 771 // Call the runtime to declare the globals. |
| 772 __ push(esi); // The context is the first argument. | 772 __ push(esi); // The context is the first argument. |
| 773 __ push(Immediate(pairs)); | 773 __ push(Immediate(pairs)); |
| 774 __ push(Immediate(Smi::FromInt(is_eval() ? 1 : 0))); | 774 __ push(Immediate(Smi::FromInt(DeclareGlobalsFlags()))); |
| 775 __ push(Immediate(Smi::FromInt(strict_mode_flag()))); | 775 __ CallRuntime(Runtime::kDeclareGlobals, 3); |
| 776 __ CallRuntime(Runtime::kDeclareGlobals, 4); | |
| 777 // Return value is ignored. | 776 // Return value is ignored. |
| 778 } | 777 } |
| 779 | 778 |
| 780 | 779 |
| 781 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { | 780 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
| 782 Comment cmnt(masm_, "[ SwitchStatement"); | 781 Comment cmnt(masm_, "[ SwitchStatement"); |
| 783 Breakable nested_statement(this, stmt); | 782 Breakable nested_statement(this, stmt); |
| 784 SetStatementPosition(stmt); | 783 SetStatementPosition(stmt); |
| 785 | 784 |
| 786 int switch_clause_stack_height = stack_height(); | 785 int switch_clause_stack_height = stack_height(); |
| (...skipping 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4324 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 4323 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
| 4325 __ jmp(Operand(edx)); | 4324 __ jmp(Operand(edx)); |
| 4326 } | 4325 } |
| 4327 | 4326 |
| 4328 | 4327 |
| 4329 #undef __ | 4328 #undef __ |
| 4330 | 4329 |
| 4331 } } // namespace v8::internal | 4330 } } // namespace v8::internal |
| 4332 | 4331 |
| 4333 #endif // V8_TARGET_ARCH_IA32 | 4332 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |