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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 244 } |
245 | 245 |
246 { Comment cmnt(masm_, "[ return <undefined>;"); | 246 { Comment cmnt(masm_, "[ return <undefined>;"); |
247 // Emit a 'return undefined' in case control fell off the end of the body. | 247 // Emit a 'return undefined' in case control fell off the end of the body. |
248 __ mov(eax, Factory::undefined_value()); | 248 __ mov(eax, Factory::undefined_value()); |
249 EmitReturnSequence(); | 249 EmitReturnSequence(); |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 | 253 |
| 254 void FullCodeGenerator::ClearAccumulator() { |
| 255 __ Set(eax, Immediate(Smi::FromInt(0))); |
| 256 } |
| 257 |
| 258 |
254 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) { | 259 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) { |
255 Comment cmnt(masm_, "[ Stack check"); | 260 Comment cmnt(masm_, "[ Stack check"); |
256 NearLabel ok; | 261 NearLabel ok; |
257 ExternalReference stack_limit = ExternalReference::address_of_stack_limit(); | 262 ExternalReference stack_limit = ExternalReference::address_of_stack_limit(); |
258 __ cmp(esp, Operand::StaticVariable(stack_limit)); | 263 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
259 __ j(above_equal, &ok, taken); | 264 __ j(above_equal, &ok, taken); |
260 StackCheckStub stub; | 265 StackCheckStub stub; |
261 __ CallStub(&stub); | 266 __ CallStub(&stub); |
262 __ bind(&ok); | 267 __ bind(&ok); |
263 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); | 268 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); |
(...skipping 3988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4252 // And return. | 4257 // And return. |
4253 __ ret(0); | 4258 __ ret(0); |
4254 } | 4259 } |
4255 | 4260 |
4256 | 4261 |
4257 #undef __ | 4262 #undef __ |
4258 | 4263 |
4259 } } // namespace v8::internal | 4264 } } // namespace v8::internal |
4260 | 4265 |
4261 #endif // V8_TARGET_ARCH_IA32 | 4266 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |