OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); | 81 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); |
82 for (int i = 0; i < locals_count; i++) { | 82 for (int i = 0; i < locals_count; i++) { |
83 __ push(rdx); | 83 __ push(rdx); |
84 } | 84 } |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 bool function_in_register = true; | 88 bool function_in_register = true; |
89 | 89 |
90 // Possibly allocate a local context. | 90 // Possibly allocate a local context. |
91 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 91 int heap_slots = scope()->num_heap_slots(); |
92 if (heap_slots > 0) { | 92 if (heap_slots > 0) { |
93 Comment cmnt(masm_, "[ Allocate local context"); | 93 Comment cmnt(masm_, "[ Allocate local context"); |
94 // Argument to NewContext is the function, which is still in rdi. | 94 // Argument to NewContext is the function, which is still in rdi. |
95 __ push(rdi); | 95 __ push(rdi); |
96 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 96 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
97 FastNewContextStub stub(heap_slots); | 97 FastNewContextStub stub(heap_slots); |
98 __ CallStub(&stub); | 98 __ CallStub(&stub); |
99 } else { | 99 } else { |
100 __ CallRuntime(Runtime::kNewContext, 1); | 100 __ CallRuntime(Runtime::kNewContext, 1); |
101 } | 101 } |
(...skipping 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3643 __ ret(0); | 3643 __ ret(0); |
3644 } | 3644 } |
3645 | 3645 |
3646 | 3646 |
3647 #undef __ | 3647 #undef __ |
3648 | 3648 |
3649 | 3649 |
3650 } } // namespace v8::internal | 3650 } } // namespace v8::internal |
3651 | 3651 |
3652 #endif // V8_TARGET_ARCH_X64 | 3652 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |