| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // to be in the proper registers or even in registers. The | 308 // to be in the proper registers or even in registers. The |
| 309 // arguments are consumed by the call. | 309 // arguments are consumed by the call. |
| 310 Result CallStub(CodeStub* stub, Result* arg0, Result* arg1); | 310 Result CallStub(CodeStub* stub, Result* arg0, Result* arg1); |
| 311 | 311 |
| 312 // Call JS function from top of the stack with arguments | 312 // Call JS function from top of the stack with arguments |
| 313 // taken from the stack. | 313 // taken from the stack. |
| 314 Result CallJSFunction(int arg_count); | 314 Result CallJSFunction(int arg_count); |
| 315 | 315 |
| 316 // Call runtime given the number of arguments expected on (and | 316 // Call runtime given the number of arguments expected on (and |
| 317 // removed from) the stack. | 317 // removed from) the stack. |
| 318 Result CallRuntime(Runtime::Function* f, int arg_count); | 318 Result CallRuntime(const Runtime::Function* f, int arg_count); |
| 319 Result CallRuntime(Runtime::FunctionId id, int arg_count); | 319 Result CallRuntime(Runtime::FunctionId id, int arg_count); |
| 320 | 320 |
| 321 #ifdef ENABLE_DEBUGGER_SUPPORT | 321 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 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 // Receiver is not 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. They are not 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 | 339 // 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. | 340 // and by the order of the three arguments on the frame. |
| 342 Result CallCommonStoreIC(Handle<Code> ic, | 341 Result CallCommonStoreIC(Handle<Code> ic, |
| 343 Result* value, | 342 Result* value, |
| 344 Result *key, | 343 Result *key, |
| 345 Result* receiver); | 344 Result* receiver); |
| 346 | 345 |
| 347 // Call store IC. Name, value, and receiver are found on top | 346 // Call store IC. Name, value, and receiver are found on top |
| 348 // of the frame. All are dropped. | 347 // of the frame. All are dropped. |
| 349 Result CallStoreIC() { | 348 Result CallStoreIC() { |
| 350 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); | 349 Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
| 350 Builtins::StoreIC_Initialize)); |
| 351 Result name = Pop(); | 351 Result name = Pop(); |
| 352 Result value = Pop(); | 352 Result value = Pop(); |
| 353 Result receiver = Pop(); | 353 Result receiver = Pop(); |
| 354 return CallCommonStoreIC(ic, &value, &name, &receiver); | 354 return CallCommonStoreIC(ic, &value, &name, &receiver); |
| 355 } | 355 } |
| 356 | 356 |
| 357 // Call keyed store IC. Value, key, and receiver are found on top | 357 // Call keyed store IC. Value, key, and receiver are found on top |
| 358 // of the frame. All are dropped. | 358 // of the frame. All are dropped. |
| 359 Result CallKeyedStoreIC() { | 359 Result CallKeyedStoreIC() { |
| 360 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); | 360 Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
| 361 Builtins::KeyedStoreIC_Initialize)); |
| 361 Result value = Pop(); | 362 Result value = Pop(); |
| 362 Result key = Pop(); | 363 Result key = Pop(); |
| 363 Result receiver = Pop(); | 364 Result receiver = Pop(); |
| 364 return CallCommonStoreIC(ic, &value, &key, &receiver); | 365 return CallCommonStoreIC(ic, &value, &key, &receiver); |
| 365 } | 366 } |
| 366 | 367 |
| 367 // Call call IC. Function name, arguments, and receiver are found on top | 368 // Call call IC. Function name, arguments, and receiver are found on top |
| 368 // of the frame and dropped by the call. | 369 // of the frame and dropped by the call. |
| 369 // The argument count does not include the receiver. | 370 // The argument count does not include the receiver. |
| 370 Result CallCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting); | 371 Result CallCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 | 594 |
| 594 // Classes that need raw access to the elements_ array. | 595 // Classes that need raw access to the elements_ array. |
| 595 friend class FrameRegisterState; | 596 friend class FrameRegisterState; |
| 596 friend class JumpTarget; | 597 friend class JumpTarget; |
| 597 }; | 598 }; |
| 598 | 599 |
| 599 | 600 |
| 600 } } // namespace v8::internal | 601 } } // namespace v8::internal |
| 601 | 602 |
| 602 #endif // V8_X64_VIRTUAL_FRAME_X64_H_ | 603 #endif // V8_X64_VIRTUAL_FRAME_X64_H_ |
| OLD | NEW |