| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // o esp: stack pointer (pointing to return address) | 54 // o esp: stack pointer (pointing to return address) |
| 55 // | 55 // |
| 56 // The function builds a JS frame. Please see JavaScriptFrameConstants in | 56 // The function builds a JS frame. Please see JavaScriptFrameConstants in |
| 57 // frames-ia32.h for its layout. | 57 // frames-ia32.h for its layout. |
| 58 void FullCodeGenerator::Generate(CompilationInfo* info) { | 58 void FullCodeGenerator::Generate(CompilationInfo* info) { |
| 59 ASSERT(info_ == NULL); | 59 ASSERT(info_ == NULL); |
| 60 info_ = info; | 60 info_ = info; |
| 61 SetFunctionPosition(function()); | 61 SetFunctionPosition(function()); |
| 62 Comment cmnt(masm_, "[ function compiled by full code generator"); | 62 Comment cmnt(masm_, "[ function compiled by full code generator"); |
| 63 | 63 |
| 64 #ifdef DEBUG |
| 65 if (strlen(FLAG_stop_at) > 0 && |
| 66 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
| 67 __ int3(); |
| 68 } |
| 69 #endif |
| 70 |
| 64 __ push(ebp); // Caller's frame pointer. | 71 __ push(ebp); // Caller's frame pointer. |
| 65 __ mov(ebp, esp); | 72 __ mov(ebp, esp); |
| 66 __ push(esi); // Callee's context. | 73 __ push(esi); // Callee's context. |
| 67 __ push(edi); // Callee's JS Function. | 74 __ push(edi); // Callee's JS Function. |
| 68 | 75 |
| 69 { Comment cmnt(masm_, "[ Allocate locals"); | 76 { Comment cmnt(masm_, "[ Allocate locals"); |
| 70 int locals_count = scope()->num_stack_slots(); | 77 int locals_count = scope()->num_stack_slots(); |
| 71 if (locals_count == 1) { | 78 if (locals_count == 1) { |
| 72 __ push(Immediate(Factory::undefined_value())); | 79 __ push(Immediate(Factory::undefined_value())); |
| 73 } else if (locals_count > 1) { | 80 } else if (locals_count > 1) { |
| (...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3716 // And return. | 3723 // And return. |
| 3717 __ ret(0); | 3724 __ ret(0); |
| 3718 } | 3725 } |
| 3719 | 3726 |
| 3720 | 3727 |
| 3721 #undef __ | 3728 #undef __ |
| 3722 | 3729 |
| 3723 } } // namespace v8::internal | 3730 } } // namespace v8::internal |
| 3724 | 3731 |
| 3725 #endif // V8_TARGET_ARCH_IA32 | 3732 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |