| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 void DebugBreak(); | 322 void DebugBreak(); |
| 323 #endif | 323 #endif |
| 324 | 324 |
| 325 // Invoke builtin given the number of arguments it expects on (and | 325 // Invoke builtin given the number of arguments it expects on (and |
| 326 // removes from) the stack. | 326 // removes from) the stack. |
| 327 Result InvokeBuiltin(Builtins::JavaScript id, | 327 Result InvokeBuiltin(Builtins::JavaScript id, |
| 328 InvokeFlag flag, | 328 InvokeFlag flag, |
| 329 int arg_count); | 329 int arg_count); |
| 330 | 330 |
| 331 // Call load IC. Name and receiver are found on top of the frame. | 331 // Call load IC. Name and receiver are found on top of the frame. |
| 332 // Receiver is not dropped. | 332 // Both are dropped. |
| 333 Result CallLoadIC(RelocInfo::Mode mode); | 333 Result CallLoadIC(RelocInfo::Mode mode); |
| 334 | 334 |
| 335 // Call keyed load IC. Key and receiver are found on top of the | 335 // Call keyed load IC. Key and receiver are found on top of the |
| 336 // frame. They are not dropped. | 336 // frame. Both are dropped. |
| 337 Result CallKeyedLoadIC(RelocInfo::Mode mode); | 337 Result CallKeyedLoadIC(RelocInfo::Mode mode); |
| 338 | 338 |
| 339 | |
| 340 // Calling a store IC and a keyed store IC differ only by which ic is called | |
| 341 // and by the order of the three arguments on the frame. | |
| 342 Result CallCommonStoreIC(Handle<Code> ic, | |
| 343 Result* value, | |
| 344 Result* key, | |
| 345 Result* receiver); | |
| 346 | |
| 347 // Call store IC. Name, value, and receiver are found on top | |
| 348 // of the frame. All are dropped. | |
| 349 Result CallStoreIC() { | |
| 350 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); | |
| 351 Result name = Pop(); | |
| 352 Result value = Pop(); | |
| 353 Result receiver = Pop(); | |
| 354 return CallCommonStoreIC(ic, &value, &name, &receiver); | |
| 355 } | |
| 356 | |
| 357 // Call store IC. If the load is contextual, value is found on top of the | 339 // Call store IC. If the load is contextual, value is found on top of the |
| 358 // frame. If not, value and receiver are on the frame. Both are dropped. | 340 // frame. If not, value and receiver are on the frame. Both are dropped. |
| 359 Result CallStoreIC(Handle<String> name, bool is_contextual); | 341 Result CallStoreIC(Handle<String> name, bool is_contextual); |
| 360 | 342 |
| 361 // Call keyed store IC. Value, key, and receiver are found on top | 343 // Call keyed store IC. Value, key, and receiver are found on top |
| 362 // of the frame. All are dropped. | 344 // of the frame. All three are dropped. |
| 363 Result CallKeyedStoreIC() { | 345 Result CallKeyedStoreIC(); |
| 364 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); | |
| 365 Result value = Pop(); | |
| 366 Result key = Pop(); | |
| 367 Result receiver = Pop(); | |
| 368 return CallCommonStoreIC(ic, &value, &key, &receiver); | |
| 369 } | |
| 370 | 346 |
| 371 // Call call IC. Function name, arguments, and receiver are found on top | 347 // Call call IC. Function name, arguments, and receiver are found on top |
| 372 // of the frame and dropped by the call. | 348 // of the frame and dropped by the call. |
| 373 // The argument count does not include the receiver. | 349 // The argument count does not include the receiver. |
| 374 Result CallCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting); | 350 Result CallCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting); |
| 375 | 351 |
| 352 // Call keyed call IC. Same calling convention as CallCallIC. |
| 376 Result CallKeyedCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting); | 353 Result CallKeyedCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting); |
| 377 | 354 |
| 378 // Allocate and call JS function as constructor. Arguments, | 355 // Allocate and call JS function as constructor. Arguments, |
| 379 // receiver (global object), and function are found on top of the | 356 // receiver (global object), and function are found on top of the |
| 380 // frame. Function is not dropped. The argument count does not | 357 // frame. Function is not dropped. The argument count does not |
| 381 // include the receiver. | 358 // include the receiver. |
| 382 Result CallConstructor(int arg_count); | 359 Result CallConstructor(int arg_count); |
| 383 | 360 |
| 384 // Drop a number of elements from the top of the expression stack. May | 361 // Drop a number of elements from the top of the expression stack. May |
| 385 // emit code to affect the physical frame. Does not clobber any registers | 362 // emit code to affect the physical frame. Does not clobber any registers |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 581 |
| 605 // Classes that need raw access to the elements_ array. | 582 // Classes that need raw access to the elements_ array. |
| 606 friend class FrameRegisterState; | 583 friend class FrameRegisterState; |
| 607 friend class JumpTarget; | 584 friend class JumpTarget; |
| 608 }; | 585 }; |
| 609 | 586 |
| 610 | 587 |
| 611 } } // namespace v8::internal | 588 } } // namespace v8::internal |
| 612 | 589 |
| 613 #endif // V8_X64_VIRTUAL_FRAME_X64_H_ | 590 #endif // V8_X64_VIRTUAL_FRAME_X64_H_ |
| OLD | NEW |