| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // Call a code stub. | 326 // Call a code stub. |
| 327 void CallStub(CodeStub* stub, Condition cond = al); | 327 void CallStub(CodeStub* stub, Condition cond = al); |
| 328 | 328 |
| 329 // Call a code stub. | 329 // Call a code stub. |
| 330 void TailCallStub(CodeStub* stub, Condition cond = al); | 330 void TailCallStub(CodeStub* stub, Condition cond = al); |
| 331 | 331 |
| 332 // Return from a code stub after popping its arguments. | 332 // Return from a code stub after popping its arguments. |
| 333 void StubReturn(int argc); | 333 void StubReturn(int argc); |
| 334 | 334 |
| 335 // Call a runtime routine. | 335 // Call a runtime routine. |
| 336 // Eventually this should be used for all C calls. | |
| 337 void CallRuntime(Runtime::Function* f, int num_arguments); | 336 void CallRuntime(Runtime::Function* f, int num_arguments); |
| 338 | 337 |
| 339 // Convenience function: Same as above, but takes the fid instead. | 338 // Convenience function: Same as above, but takes the fid instead. |
| 340 void CallRuntime(Runtime::FunctionId fid, int num_arguments); | 339 void CallRuntime(Runtime::FunctionId fid, int num_arguments); |
| 341 | 340 |
| 342 // Convenience function: call an external reference. | 341 // Convenience function: call an external reference. |
| 343 void CallExternalReference(const ExternalReference& ext, | 342 void CallExternalReference(const ExternalReference& ext, |
| 344 int num_arguments); | 343 int num_arguments); |
| 345 | 344 |
| 346 // Tail call of a runtime routine (jump). | 345 // Tail call of a runtime routine (jump). |
| 347 // Like JumpToRuntime, but also takes care of passing the number | 346 // Like JumpToExternalReference, but also takes care of passing the number |
| 348 // of parameters. | 347 // of parameters. |
| 349 void TailCallRuntime(const ExternalReference& ext, | 348 void TailCallExternalReference(const ExternalReference& ext, |
| 349 int num_arguments, |
| 350 int result_size); |
| 351 |
| 352 // Convenience function: tail call a runtime routine (jump). |
| 353 void TailCallRuntime(Runtime::FunctionId fid, |
| 350 int num_arguments, | 354 int num_arguments, |
| 351 int result_size); | 355 int result_size); |
| 352 | 356 |
| 353 // Jump to a runtime routine. | 357 // Jump to a runtime routine. |
| 354 void JumpToRuntime(const ExternalReference& builtin); | 358 void JumpToExternalReference(const ExternalReference& builtin); |
| 355 | 359 |
| 356 // Invoke specified builtin JavaScript function. Adds an entry to | 360 // Invoke specified builtin JavaScript function. Adds an entry to |
| 357 // the unresolved list if the name does not resolve. | 361 // the unresolved list if the name does not resolve. |
| 358 void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags); | 362 void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags); |
| 359 | 363 |
| 360 // Store the code object for the given builtin in the target register and | 364 // Store the code object for the given builtin in the target register and |
| 361 // setup the function in r1. | 365 // setup the function in r1. |
| 362 void GetBuiltinEntry(Register target, Builtins::JavaScript id); | 366 void GetBuiltinEntry(Register target, Builtins::JavaScript id); |
| 363 | 367 |
| 364 Handle<Object> CodeObject() { return code_object_; } | 368 Handle<Object> CodeObject() { return code_object_; } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 Label *failure); | 418 Label *failure); |
| 415 | 419 |
| 416 // Checks if both objects are sequential ASCII strings and jumps to label | 420 // Checks if both objects are sequential ASCII strings and jumps to label |
| 417 // if either is not. | 421 // if either is not. |
| 418 void JumpIfNotBothSequentialAsciiStrings(Register first, | 422 void JumpIfNotBothSequentialAsciiStrings(Register first, |
| 419 Register second, | 423 Register second, |
| 420 Register scratch1, | 424 Register scratch1, |
| 421 Register scratch2, | 425 Register scratch2, |
| 422 Label* not_flat_ascii_strings); | 426 Label* not_flat_ascii_strings); |
| 423 | 427 |
| 428 // Checks if both instance types are sequential ASCII strings and jumps to |
| 429 // label if either is not. |
| 430 void JumpIfBothInstanceTypesAreNotSequentialAscii( |
| 431 Register first_object_instance_type, |
| 432 Register second_object_instance_type, |
| 433 Register scratch1, |
| 434 Register scratch2, |
| 435 Label* failure); |
| 436 |
| 437 // Check if instance type is sequential ASCII string and jump to label if |
| 438 // it is not. |
| 439 void JumpIfInstanceTypeIsNotSequentialAscii(Register type, |
| 440 Register scratch, |
| 441 Label* failure); |
| 442 |
| 443 |
| 424 private: | 444 private: |
| 425 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); | 445 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 426 void Call(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); | 446 void Call(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 427 | 447 |
| 428 // Helper functions for generating invokes. | 448 // Helper functions for generating invokes. |
| 429 void InvokePrologue(const ParameterCount& expected, | 449 void InvokePrologue(const ParameterCount& expected, |
| 430 const ParameterCount& actual, | 450 const ParameterCount& actual, |
| 431 Handle<Code> code_constant, | 451 Handle<Code> code_constant, |
| 432 Register code_reg, | 452 Register code_reg, |
| 433 Label* done, | 453 Label* done, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 502 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 483 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 503 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 484 #else | 504 #else |
| 485 #define ACCESS_MASM(masm) masm-> | 505 #define ACCESS_MASM(masm) masm-> |
| 486 #endif | 506 #endif |
| 487 | 507 |
| 488 | 508 |
| 489 } } // namespace v8::internal | 509 } } // namespace v8::internal |
| 490 | 510 |
| 491 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 511 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |