Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 380 if (!found_it) return Heap::undefined_value(); | 380 if (!found_it) return Heap::undefined_value(); |
| 381 Handle<JSFunction> function(holder); | 381 Handle<JSFunction> function(holder); |
| 382 | 382 |
| 383 // Find the top invocation of the function by traversing frames. | 383 // Find the top invocation of the function by traversing frames. |
| 384 for (JavaScriptFrameIterator it; !it.done(); it.Advance()) { | 384 for (JavaScriptFrameIterator it; !it.done(); it.Advance()) { |
| 385 // Skip all frames that aren't invocations of the given function. | 385 // Skip all frames that aren't invocations of the given function. |
| 386 JavaScriptFrame* frame = it.frame(); | 386 JavaScriptFrame* frame = it.frame(); |
| 387 if (frame->function() != *function) continue; | 387 if (frame->function() != *function) continue; |
| 388 | 388 |
| 389 // If there is an arguments variable in the stack, we return that. | 389 // If there is an arguments variable in the stack, we return that. |
| 390 int index = ScopeInfo<>::StackSlotIndex(frame->FindCode(), | 390 int index = ScopeInfo<>::StackSlotIndex(frame->code(), |
| 391 Heap::arguments_symbol()); | 391 Heap::arguments_symbol()); |
|
Kevin Millikin (Chromium)
2009/02/25 14:54:33
Screwy indentation here.
Kasper Lund
2009/02/25 15:00:19
Indentation is slightly off here.
iposva
2009/02/25 16:42:54
Done.
iposva
2009/02/25 16:42:54
Done.
| |
| 392 if (index >= 0) return frame->GetExpression(index); | 392 if (index >= 0) return frame->GetExpression(index); |
| 393 | 393 |
| 394 // If there isn't an arguments variable in the stack, we need to | 394 // If there isn't an arguments variable in the stack, we need to |
| 395 // find the frame that holds the actual arguments passed to the | 395 // find the frame that holds the actual arguments passed to the |
| 396 // function on the stack. | 396 // function on the stack. |
| 397 it.AdvanceToArgumentsFrame(); | 397 it.AdvanceToArgumentsFrame(); |
| 398 frame = it.frame(); | 398 frame = it.frame(); |
| 399 | 399 |
| 400 // Get the number of arguments and construct an arguments object | 400 // Get the number of arguments and construct an arguments object |
| 401 // mirror for the right frame. | 401 // mirror for the right frame. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 const AccessorDescriptor Accessors::ObjectPrototype = { | 523 const AccessorDescriptor Accessors::ObjectPrototype = { |
| 524 ObjectGetPrototype, | 524 ObjectGetPrototype, |
| 525 ObjectSetPrototype, | 525 ObjectSetPrototype, |
| 526 0 | 526 0 |
| 527 }; | 527 }; |
| 528 | 528 |
| 529 } } // namespace v8::internal | 529 } } // namespace v8::internal |
| OLD | NEW |