| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 | 191 |
| 192 { Comment cmnt(masm_, "[ return <undefined>;"); | 192 { Comment cmnt(masm_, "[ return <undefined>;"); |
| 193 // Emit a 'return undefined' in case control fell off the end of the body. | 193 // Emit a 'return undefined' in case control fell off the end of the body. |
| 194 __ mov(eax, Factory::undefined_value()); | 194 __ mov(eax, Factory::undefined_value()); |
| 195 EmitReturnSequence(); | 195 EmitReturnSequence(); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 | 199 |
| 200 void FullCodeGenerator::ClearAccumulator() { |
| 201 __ Set(eax, Immediate(Smi::FromInt(0))); |
| 202 } |
| 203 |
| 204 |
| 200 void FullCodeGenerator::EmitReturnSequence() { | 205 void FullCodeGenerator::EmitReturnSequence() { |
| 201 Comment cmnt(masm_, "[ Return sequence"); | 206 Comment cmnt(masm_, "[ Return sequence"); |
| 202 if (return_label_.is_bound()) { | 207 if (return_label_.is_bound()) { |
| 203 __ jmp(&return_label_); | 208 __ jmp(&return_label_); |
| 204 } else { | 209 } else { |
| 205 // Common return label | 210 // Common return label |
| 206 __ bind(&return_label_); | 211 __ bind(&return_label_); |
| 207 if (FLAG_trace) { | 212 if (FLAG_trace) { |
| 208 __ push(eax); | 213 __ push(eax); |
| 209 __ CallRuntime(Runtime::kTraceExit, 1); | 214 __ CallRuntime(Runtime::kTraceExit, 1); |
| (...skipping 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3948 // And return. | 3953 // And return. |
| 3949 __ ret(0); | 3954 __ ret(0); |
| 3950 } | 3955 } |
| 3951 | 3956 |
| 3952 | 3957 |
| 3953 #undef __ | 3958 #undef __ |
| 3954 | 3959 |
| 3955 } } // namespace v8::internal | 3960 } } // namespace v8::internal |
| 3956 | 3961 |
| 3957 #endif // V8_TARGET_ARCH_IA32 | 3962 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |