Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: src/ia32/code-stubs-ia32.h

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 38
39 // Compute a transcendental math function natively, or call the 39 // Compute a transcendental math function natively, or call the
40 // TranscendentalCache runtime function. 40 // TranscendentalCache runtime function.
41 class TranscendentalCacheStub: public CodeStub { 41 class TranscendentalCacheStub: public CodeStub {
42 public: 42 public:
43 enum ArgumentType { 43 enum ArgumentType {
44 TAGGED = 0, 44 TAGGED = 0,
45 UNTAGGED = 1 << TranscendentalCache::kTranscendentalTypeBits 45 UNTAGGED = 1 << TranscendentalCache::kTranscendentalTypeBits
46 }; 46 };
47 47
48 explicit TranscendentalCacheStub(TranscendentalCache::Type type, 48 TranscendentalCacheStub(TranscendentalCache::Type type,
49 ArgumentType argument_type) 49 ArgumentType argument_type)
50 : type_(type), argument_type_(argument_type) {} 50 : type_(type), argument_type_(argument_type) {}
51 void Generate(MacroAssembler* masm); 51 void Generate(MacroAssembler* masm);
52 private: 52 private:
53 TranscendentalCache::Type type_; 53 TranscendentalCache::Type type_;
54 ArgumentType argument_type_; 54 ArgumentType argument_type_;
55 55
56 Major MajorKey() { return TranscendentalCache; } 56 Major MajorKey() { return TranscendentalCache; }
57 int MinorKey() { return type_ | argument_type_; } 57 int MinorKey() { return type_ | argument_type_; }
58 Runtime::FunctionId RuntimeFunction(); 58 Runtime::FunctionId RuntimeFunction();
59 void GenerateOperation(MacroAssembler* masm); 59 void GenerateOperation(MacroAssembler* masm);
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 const char* GetName() { return "NumberToStringStub"; } 483 const char* GetName() { return "NumberToStringStub"; }
484 484
485 #ifdef DEBUG 485 #ifdef DEBUG
486 void Print() { 486 void Print() {
487 PrintF("NumberToStringStub\n"); 487 PrintF("NumberToStringStub\n");
488 } 488 }
489 #endif 489 #endif
490 }; 490 };
491 491
492 492
493 // Generate code the to load an element from a pixel array. The receiver is 493 // Generate code to load an element from a pixel array. The receiver is assumed
494 // assumed to not be a smi and to have elements, the caller must guarantee this 494 // to not be a smi and to have elements, the caller must guarantee this
495 // precondition. If the receiver does not have elements that are pixel arrays, 495 // precondition. If key is not a smi, then the generated code branches to
496 // the generated code jumps to not_pixel_array. If key is not a smi, then the 496 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi
497 // generated code branches to key_not_smi. Callers can specify NULL for 497 // check has already been performed on key so that the smi check is not
498 // key_not_smi to signal that a smi check has already been performed on key so 498 // generated. If key is not a valid index within the bounds of the pixel array,
499 // that the smi check is not generated . If key is not a valid index within the 499 // the generated code jumps to out_of_range. receiver, key and elements are
500 // bounds of the pixel array, the generated code jumps to out_of_range. 500 // unchanged throughout the generated code sequence.
501 void GenerateFastPixelArrayLoad(MacroAssembler* masm, 501 void GenerateFastPixelArrayLoad(MacroAssembler* masm,
502 Register receiver, 502 Register receiver,
503 Register key, 503 Register key,
504 Register elements, 504 Register elements,
505 Register untagged_key, 505 Register untagged_key,
506 Register result, 506 Register result,
507 Label* not_pixel_array, 507 Label* not_pixel_array,
508 Label* key_not_smi, 508 Label* key_not_smi,
509 Label* out_of_range); 509 Label* out_of_range);
510 510
511 // Generate code to store an element into a pixel array, clamping values between
512 // [0..255]. The receiver is assumed to not be a smi and to have elements, the
513 // caller must guarantee this precondition. If key is not a smi, then the
514 // generated code branches to key_not_smi. Callers can specify NULL for
515 // key_not_smi to signal that a smi check has already been performed on key so
516 // that the smi check is not generated. If the value is not a smi, the generated
517 // code will branch to value_not_smi. If the receiver doesn't have pixel array
518 // elements, the generated code will branch to not_pixel_array, unless
519 // not_pixel_array is NULL, in which case the caller must ensure that the
520 // receiver has pixel array elements. If key is not a valid index within the
521 // bounds of the pixel array, the generated code jumps to out_of_range.
522 void GenerateFastPixelArrayStore(MacroAssembler* masm,
523 Register receiver,
524 Register key,
525 Register value,
526 Register elements,
527 Register scratch1,
528 bool load_elements_from_receiver,
529 Label* key_not_smi,
530 Label* value_not_smi,
531 Label* not_pixel_array,
532 Label* out_of_range);
511 533
512 } } // namespace v8::internal 534 } } // namespace v8::internal
513 535
514 #endif // V8_IA32_CODE_STUBS_IA32_H_ 536 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698