| 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 735 |
| 736 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { | 736 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { |
| 737 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); | 737 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); |
| 738 } | 738 } |
| 739 | 739 |
| 740 | 740 |
| 741 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 741 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 742 // Call the runtime to declare the globals. | 742 // Call the runtime to declare the globals. |
| 743 __ push(rsi); // The context is the first argument. | 743 __ push(rsi); // The context is the first argument. |
| 744 __ Push(pairs); | 744 __ Push(pairs); |
| 745 __ Push(Smi::FromInt(is_eval() ? 1 : 0)); | 745 __ Push(Smi::FromInt(DeclareGlobalsFlags())); |
| 746 __ Push(Smi::FromInt(strict_mode_flag())); | 746 __ CallRuntime(Runtime::kDeclareGlobals, 3); |
| 747 __ CallRuntime(Runtime::kDeclareGlobals, 4); | |
| 748 // Return value is ignored. | 747 // Return value is ignored. |
| 749 } | 748 } |
| 750 | 749 |
| 751 | 750 |
| 752 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { | 751 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
| 753 Comment cmnt(masm_, "[ SwitchStatement"); | 752 Comment cmnt(masm_, "[ SwitchStatement"); |
| 754 Breakable nested_statement(this, stmt); | 753 Breakable nested_statement(this, stmt); |
| 755 SetStatementPosition(stmt); | 754 SetStatementPosition(stmt); |
| 756 | 755 |
| 757 // Keep the switch value on the stack until a case matches. | 756 // Keep the switch value on the stack until a case matches. |
| (...skipping 3447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4205 __ jmp(rdx); | 4204 __ jmp(rdx); |
| 4206 } | 4205 } |
| 4207 | 4206 |
| 4208 | 4207 |
| 4209 #undef __ | 4208 #undef __ |
| 4210 | 4209 |
| 4211 | 4210 |
| 4212 } } // namespace v8::internal | 4211 } } // namespace v8::internal |
| 4213 | 4212 |
| 4214 #endif // V8_TARGET_ARCH_X64 | 4213 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |