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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
767 | 767 |
768 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { | 768 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { |
769 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); | 769 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); |
770 } | 770 } |
771 | 771 |
772 | 772 |
773 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 773 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
774 // Call the runtime to declare the globals. | 774 // Call the runtime to declare the globals. |
775 // The context is the first argument. | 775 // The context is the first argument. |
776 __ mov(r2, Operand(pairs)); | 776 __ mov(r2, Operand(pairs)); |
777 __ mov(r1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); | 777 __ mov(r1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); |
Kevin Millikin (Chromium)
2011/09/01 07:58:24
Don't you have to remove this argument?
Lasse Reichstein
2011/09/01 09:26:58
Absolutely. I'm amazed that it seemed to work.
Fix
| |
778 __ mov(r0, Operand(Smi::FromInt(strict_mode_flag()))); | 778 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); |
779 __ Push(cp, r2, r1, r0); | 779 __ Push(cp, r2, r1, r0); |
780 __ CallRuntime(Runtime::kDeclareGlobals, 4); | 780 __ CallRuntime(Runtime::kDeclareGlobals, 3); |
781 // Return value is ignored. | 781 // Return value is ignored. |
782 } | 782 } |
783 | 783 |
784 | 784 |
785 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { | 785 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
786 Comment cmnt(masm_, "[ SwitchStatement"); | 786 Comment cmnt(masm_, "[ SwitchStatement"); |
787 Breakable nested_statement(this, stmt); | 787 Breakable nested_statement(this, stmt); |
788 SetStatementPosition(stmt); | 788 SetStatementPosition(stmt); |
789 | 789 |
790 // Keep the switch value on the stack until a case matches. | 790 // Keep the switch value on the stack until a case matches. |
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4198 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4198 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
4199 __ add(pc, r1, Operand(masm_->CodeObject())); | 4199 __ add(pc, r1, Operand(masm_->CodeObject())); |
4200 } | 4200 } |
4201 | 4201 |
4202 | 4202 |
4203 #undef __ | 4203 #undef __ |
4204 | 4204 |
4205 } } // namespace v8::internal | 4205 } } // namespace v8::internal |
4206 | 4206 |
4207 #endif // V8_TARGET_ARCH_ARM | 4207 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |