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 rsp: stack pointer (pointing to return address) | 54 // o rsp: 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-x64.h for its layout. | 57 // frames-x64.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 |
64 __ push(rbp); // Caller's frame pointer. | 70 __ push(rbp); // Caller's frame pointer. |
65 __ movq(rbp, rsp); | 71 __ movq(rbp, rsp); |
66 __ push(rsi); // Callee's context. | 72 __ push(rsi); // Callee's context. |
67 __ push(rdi); // Callee's JS Function. | 73 __ push(rdi); // Callee's JS Function. |
68 | 74 |
69 { Comment cmnt(masm_, "[ Allocate locals"); | 75 { Comment cmnt(masm_, "[ Allocate locals"); |
70 int locals_count = scope()->num_stack_slots(); | 76 int locals_count = scope()->num_stack_slots(); |
71 if (locals_count == 1) { | 77 if (locals_count == 1) { |
72 __ PushRoot(Heap::kUndefinedValueRootIndex); | 78 __ PushRoot(Heap::kUndefinedValueRootIndex); |
73 } else if (locals_count > 1) { | 79 } else if (locals_count > 1) { |
(...skipping 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3419 __ ret(0); | 3425 __ ret(0); |
3420 } | 3426 } |
3421 | 3427 |
3422 | 3428 |
3423 #undef __ | 3429 #undef __ |
3424 | 3430 |
3425 | 3431 |
3426 } } // namespace v8::internal | 3432 } } // namespace v8::internal |
3427 | 3433 |
3428 #endif // V8_TARGET_ARCH_X64 | 3434 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |