OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 SetFunctionPosition(function()); | 134 SetFunctionPosition(function()); |
135 Comment cmnt(masm_, "[ function compiled by full code generator"); | 135 Comment cmnt(masm_, "[ function compiled by full code generator"); |
136 | 136 |
137 #ifdef DEBUG | 137 #ifdef DEBUG |
138 if (strlen(FLAG_stop_at) > 0 && | 138 if (strlen(FLAG_stop_at) > 0 && |
139 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | 139 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
140 __ stop("stop-at"); | 140 __ stop("stop-at"); |
141 } | 141 } |
142 #endif | 142 #endif |
143 | 143 |
| 144 const FunctionEntryHook* hook_location = V8::GetFunctionEntryHookLocation(); |
| 145 if (*hook_location != NULL) { |
| 146 ProfileEntryHookStub stub; |
| 147 __ push(lr); |
| 148 __ CallStub(&stub); |
| 149 __ pop(lr); |
| 150 } |
| 151 |
144 // Strict mode functions and builtins need to replace the receiver | 152 // Strict mode functions and builtins need to replace the receiver |
145 // with undefined when called as functions (without an explicit | 153 // with undefined when called as functions (without an explicit |
146 // receiver object). r5 is zero for method calls and non-zero for | 154 // receiver object). r5 is zero for method calls and non-zero for |
147 // function calls. | 155 // function calls. |
148 if (!info->is_classic_mode() || info->is_native()) { | 156 if (!info->is_classic_mode() || info->is_native()) { |
149 Label ok; | 157 Label ok; |
150 __ cmp(r5, Operand(0)); | 158 __ cmp(r5, Operand(0)); |
151 __ b(eq, &ok); | 159 __ b(eq, &ok); |
152 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 160 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
153 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 161 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
(...skipping 4423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4577 *context_length = 0; | 4585 *context_length = 0; |
4578 return previous_; | 4586 return previous_; |
4579 } | 4587 } |
4580 | 4588 |
4581 | 4589 |
4582 #undef __ | 4590 #undef __ |
4583 | 4591 |
4584 } } // namespace v8::internal | 4592 } } // namespace v8::internal |
4585 | 4593 |
4586 #endif // V8_TARGET_ARCH_ARM | 4594 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |