| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // Caught exception: Store result (exception) in the pending | 274 // Caught exception: Store result (exception) in the pending |
| 275 // exception field in the JSEnv and return a failure sentinel. | 275 // exception field in the JSEnv and return a failure sentinel. |
| 276 ExternalReference pending_exception(Top::k_pending_exception_address); | 276 ExternalReference pending_exception(Top::k_pending_exception_address); |
| 277 __ store_rax(pending_exception); | 277 __ store_rax(pending_exception); |
| 278 __ movq(rax, Failure::Exception(), RelocInfo::NONE); | 278 __ movq(rax, Failure::Exception(), RelocInfo::NONE); |
| 279 __ jmp(&exit); | 279 __ jmp(&exit); |
| 280 | 280 |
| 281 // Invoke: Link this frame into the handler chain. | 281 // Invoke: Link this frame into the handler chain. |
| 282 __ bind(&invoke); | 282 __ bind(&invoke); |
| 283 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER); | 283 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER); |
| 284 __ push(rax); // flush TOS | |
| 285 | 284 |
| 286 // Clear any pending exceptions. | 285 // Clear any pending exceptions. |
| 287 __ load_rax(ExternalReference::the_hole_value_location()); | 286 __ load_rax(ExternalReference::the_hole_value_location()); |
| 288 __ store_rax(pending_exception); | 287 __ store_rax(pending_exception); |
| 289 | 288 |
| 290 // Fake a receiver (NULL). | 289 // Fake a receiver (NULL). |
| 291 __ push(Immediate(0)); // receiver | 290 __ push(Immediate(0)); // receiver |
| 292 | 291 |
| 293 // Invoke the function by calling through JS entry trampoline | 292 // Invoke the function by calling through JS entry trampoline |
| 294 // builtin and pop the faked function when we return. We load the address | 293 // builtin and pop the faked function when we return. We load the address |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 326 |
| 328 // Restore frame pointer and return. | 327 // Restore frame pointer and return. |
| 329 __ pop(rbp); | 328 __ pop(rbp); |
| 330 __ ret(0); | 329 __ ret(0); |
| 331 } | 330 } |
| 332 | 331 |
| 333 | 332 |
| 334 #undef __ | 333 #undef __ |
| 335 | 334 |
| 336 } } // namespace v8::internal | 335 } } // namespace v8::internal |
| OLD | NEW |