OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 ASSERT(frame_ == NULL); | 109 ASSERT(frame_ == NULL); |
110 frame_ = new VirtualFrame(this); | 110 frame_ = new VirtualFrame(this); |
111 set_in_spilled_code(false); | 111 set_in_spilled_code(false); |
112 | 112 |
113 // Adjust for function-level loop nesting. | 113 // Adjust for function-level loop nesting. |
114 loop_nesting_ += fun->loop_nesting(); | 114 loop_nesting_ += fun->loop_nesting(); |
115 | 115 |
116 JumpTarget::set_compiling_deferred_code(false); | 116 JumpTarget::set_compiling_deferred_code(false); |
117 | 117 |
118 { | 118 { |
| 119 HistogramTimerScope codegen_timer(&Counters::code_generation); |
119 CodeGenState state(this); | 120 CodeGenState state(this); |
120 | 121 |
121 // Entry: | 122 // Entry: |
122 // Stack: receiver, arguments, return address. | 123 // Stack: receiver, arguments, return address. |
123 // ebp: caller's frame pointer | 124 // ebp: caller's frame pointer |
124 // esp: stack pointer | 125 // esp: stack pointer |
125 // edi: called JS function | 126 // edi: called JS function |
126 // esi: callee's context | 127 // esi: callee's context |
127 allocator_->Initialize(); | 128 allocator_->Initialize(); |
128 frame_->Enter(); | 129 frame_->Enter(); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 ASSERT(state_ == NULL); | 312 ASSERT(state_ == NULL); |
312 ASSERT(loop_nesting() == 0); | 313 ASSERT(loop_nesting() == 0); |
313 ASSERT(!function_return_is_shadowed_); | 314 ASSERT(!function_return_is_shadowed_); |
314 function_return_.Unuse(); | 315 function_return_.Unuse(); |
315 DeleteFrame(); | 316 DeleteFrame(); |
316 | 317 |
317 // Process any deferred code using the register allocator. | 318 // Process any deferred code using the register allocator. |
318 if (HasStackOverflow()) { | 319 if (HasStackOverflow()) { |
319 ClearDeferred(); | 320 ClearDeferred(); |
320 } else { | 321 } else { |
| 322 HistogramTimerScope deferred_timer(&Counters::deferred_code_generation); |
321 JumpTarget::set_compiling_deferred_code(true); | 323 JumpTarget::set_compiling_deferred_code(true); |
322 ProcessDeferred(); | 324 ProcessDeferred(); |
323 JumpTarget::set_compiling_deferred_code(false); | 325 JumpTarget::set_compiling_deferred_code(false); |
324 } | 326 } |
325 | 327 |
326 // There is no need to delete the register allocator, it is a | 328 // There is no need to delete the register allocator, it is a |
327 // stack-allocated local. | 329 // stack-allocated local. |
328 allocator_ = NULL; | 330 allocator_ = NULL; |
329 scope_ = NULL; | 331 scope_ = NULL; |
330 } | 332 } |
(...skipping 6909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7240 | 7242 |
7241 // Slow-case: Go through the JavaScript implementation. | 7243 // Slow-case: Go through the JavaScript implementation. |
7242 __ bind(&slow); | 7244 __ bind(&slow); |
7243 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 7245 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
7244 } | 7246 } |
7245 | 7247 |
7246 | 7248 |
7247 #undef __ | 7249 #undef __ |
7248 | 7250 |
7249 } } // namespace v8::internal | 7251 } } // namespace v8::internal |
OLD | NEW |