OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 const char* GetName() { return "NumberToStringStub"; } | 445 const char* GetName() { return "NumberToStringStub"; } |
446 | 446 |
447 #ifdef DEBUG | 447 #ifdef DEBUG |
448 void Print() { | 448 void Print() { |
449 PrintF("NumberToStringStub\n"); | 449 PrintF("NumberToStringStub\n"); |
450 } | 450 } |
451 #endif | 451 #endif |
452 }; | 452 }; |
453 | 453 |
454 | 454 |
455 // Generate code to load an element from a pixel array. The receiver is assumed | |
456 // to not be a smi and to have elements, the caller must guarantee this | |
457 // precondition. If key is not a smi, then the generated code branches to | |
458 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi | |
459 // check has already been performed on key so that the smi check is not | |
460 // generated. If key is not a valid index within the bounds of the pixel array, | |
461 // the generated code jumps to out_of_range. receiver, key and elements are | |
462 // unchanged throughout the generated code sequence. | |
463 void GenerateFastPixelArrayLoad(MacroAssembler* masm, | |
464 Register receiver, | |
465 Register key, | |
466 Register elements, | |
467 Register untagged_key, | |
468 Register result, | |
469 Label* not_pixel_array, | |
470 Label* key_not_smi, | |
471 Label* out_of_range); | |
472 | |
473 // Generate code to store an element into a pixel array, clamping values between | |
474 // [0..255]. The receiver is assumed to not be a smi and to have elements, the | |
475 // caller must guarantee this precondition. If key is not a smi, then the | |
476 // generated code branches to key_not_smi. Callers can specify NULL for | |
477 // key_not_smi to signal that a smi check has already been performed on key so | |
478 // that the smi check is not generated. If the value is not a smi, the | |
479 // generated code will branch to value_not_smi. If the receiver | |
480 // doesn't have pixel array elements, the generated code will branch to | |
481 // not_pixel_array, unless not_pixel_array is NULL, in which case the caller | |
482 // must ensure that the receiver has pixel array elements. If key is not a | |
483 // valid index within the bounds of the pixel array, the generated code jumps to | |
484 // out_of_range. | |
485 void GenerateFastPixelArrayStore(MacroAssembler* masm, | |
486 Register receiver, | |
487 Register key, | |
488 Register value, | |
489 Register elements, | |
490 Register scratch1, | |
491 bool load_elements_from_receiver, | |
492 bool key_is_untagged, | |
493 Label* key_not_smi, | |
494 Label* value_not_smi, | |
495 Label* not_pixel_array, | |
496 Label* out_of_range); | |
497 | |
498 } } // namespace v8::internal | 455 } } // namespace v8::internal |
499 | 456 |
500 #endif // V8_X64_CODE_STUBS_X64_H_ | 457 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |