| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } | 182 } |
| 183 | 183 |
| 184 { Comment cmnt(masm_, "[ return <undefined>;"); | 184 { Comment cmnt(masm_, "[ return <undefined>;"); |
| 185 // Emit a 'return undefined' in case control fell off the end of the body. | 185 // Emit a 'return undefined' in case control fell off the end of the body. |
| 186 __ mov(eax, Factory::undefined_value()); | 186 __ mov(eax, Factory::undefined_value()); |
| 187 EmitReturnSequence(); | 187 EmitReturnSequence(); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 | 191 |
| 192 void FullCodeGenerator::ClearAccumulator() { |
| 193 __ Set(eax, Immediate(Smi::FromInt(0))); |
| 194 } |
| 195 |
| 196 |
| 192 void FullCodeGenerator::EmitReturnSequence() { | 197 void FullCodeGenerator::EmitReturnSequence() { |
| 193 Comment cmnt(masm_, "[ Return sequence"); | 198 Comment cmnt(masm_, "[ Return sequence"); |
| 194 if (return_label_.is_bound()) { | 199 if (return_label_.is_bound()) { |
| 195 __ jmp(&return_label_); | 200 __ jmp(&return_label_); |
| 196 } else { | 201 } else { |
| 197 // Common return label | 202 // Common return label |
| 198 __ bind(&return_label_); | 203 __ bind(&return_label_); |
| 199 if (FLAG_trace) { | 204 if (FLAG_trace) { |
| 200 __ push(eax); | 205 __ push(eax); |
| 201 __ CallRuntime(Runtime::kTraceExit, 1); | 206 __ CallRuntime(Runtime::kTraceExit, 1); |
| (...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3716 // And return. | 3721 // And return. |
| 3717 __ ret(0); | 3722 __ ret(0); |
| 3718 } | 3723 } |
| 3719 | 3724 |
| 3720 | 3725 |
| 3721 #undef __ | 3726 #undef __ |
| 3722 | 3727 |
| 3723 } } // namespace v8::internal | 3728 } } // namespace v8::internal |
| 3724 | 3729 |
| 3725 #endif // V8_TARGET_ARCH_IA32 | 3730 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |