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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 { Comment cmnt(masm_, "[ Allocate locals"); | 86 { Comment cmnt(masm_, "[ Allocate locals"); |
87 for (int i = 0; i < locals_count; i++) { | 87 for (int i = 0; i < locals_count; i++) { |
88 __ push(ip); | 88 __ push(ip); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 bool function_in_register = true; | 92 bool function_in_register = true; |
93 | 93 |
94 // Possibly allocate a local context. | 94 // Possibly allocate a local context. |
95 int heap_slots = scope()->num_heap_slots(); | 95 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
96 if (heap_slots > 0) { | 96 if (heap_slots > 0) { |
97 Comment cmnt(masm_, "[ Allocate local context"); | 97 Comment cmnt(masm_, "[ Allocate local context"); |
98 // Argument to NewContext is the function, which is in r1. | 98 // Argument to NewContext is the function, which is in r1. |
99 __ push(r1); | 99 __ push(r1); |
100 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 100 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
101 FastNewContextStub stub(heap_slots); | 101 FastNewContextStub stub(heap_slots); |
102 __ CallStub(&stub); | 102 __ CallStub(&stub); |
103 } else { | 103 } else { |
104 __ CallRuntime(Runtime::kNewContext, 1); | 104 __ CallRuntime(Runtime::kNewContext, 1); |
105 } | 105 } |
(...skipping 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3611 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3611 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
3612 __ add(pc, r1, Operand(masm_->CodeObject())); | 3612 __ add(pc, r1, Operand(masm_->CodeObject())); |
3613 } | 3613 } |
3614 | 3614 |
3615 | 3615 |
3616 #undef __ | 3616 #undef __ |
3617 | 3617 |
3618 } } // namespace v8::internal | 3618 } } // namespace v8::internal |
3619 | 3619 |
3620 #endif // V8_TARGET_ARCH_ARM | 3620 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |