OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 // Is the pointer this relocation info refers to coded like a plain pointer | 273 // Is the pointer this relocation info refers to coded like a plain pointer |
274 // or is it strange in some way (eg relative or patched into a series of | 274 // or is it strange in some way (eg relative or patched into a series of |
275 // instructions). | 275 // instructions). |
276 bool IsCodedSpecially(); | 276 bool IsCodedSpecially(); |
277 | 277 |
278 // Read/modify the code target in the branch/call instruction | 278 // Read/modify the code target in the branch/call instruction |
279 // this relocation applies to; | 279 // this relocation applies to; |
280 // can only be called if IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY | 280 // can only be called if IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY |
281 INLINE(Address target_address()); | 281 INLINE(Address target_address()); |
282 INLINE(void set_target_address(Address target)); | 282 INLINE(void set_target_address(Address target, |
| 283 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
283 INLINE(Object* target_object()); | 284 INLINE(Object* target_object()); |
284 INLINE(Handle<Object> target_object_handle(Assembler* origin)); | 285 INLINE(Handle<Object> target_object_handle(Assembler* origin)); |
285 INLINE(Object** target_object_address()); | 286 INLINE(Object** target_object_address()); |
286 INLINE(void set_target_object(Object* target)); | 287 INLINE(void set_target_object(Object* target, |
| 288 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
287 INLINE(JSGlobalPropertyCell* target_cell()); | 289 INLINE(JSGlobalPropertyCell* target_cell()); |
288 INLINE(Handle<JSGlobalPropertyCell> target_cell_handle()); | 290 INLINE(Handle<JSGlobalPropertyCell> target_cell_handle()); |
289 INLINE(void set_target_cell(JSGlobalPropertyCell* cell)); | 291 INLINE(void set_target_cell(JSGlobalPropertyCell* cell, |
| 292 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
290 | 293 |
291 | 294 |
292 // Read the address of the word containing the target_address in an | 295 // Read the address of the word containing the target_address in an |
293 // instruction stream. What this means exactly is architecture-independent. | 296 // instruction stream. What this means exactly is architecture-independent. |
294 // The only architecture-independent user of this function is the serializer. | 297 // The only architecture-independent user of this function is the serializer. |
295 // The serializer uses it to find out how many raw bytes of instruction to | 298 // The serializer uses it to find out how many raw bytes of instruction to |
296 // output before the next target. Architecture-independent code shouldn't | 299 // output before the next target. Architecture-independent code shouldn't |
297 // dereference the pointer it gets back from this. | 300 // dereference the pointer it gets back from this. |
298 INLINE(Address target_address_address()); | 301 INLINE(Address target_address_address()); |
299 // This indicates how much space a target takes up when deserializing a code | 302 // This indicates how much space a target takes up when deserializing a code |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 589 |
587 // Deoptimization support. | 590 // Deoptimization support. |
588 static ExternalReference new_deoptimizer_function(Isolate* isolate); | 591 static ExternalReference new_deoptimizer_function(Isolate* isolate); |
589 static ExternalReference compute_output_frames_function(Isolate* isolate); | 592 static ExternalReference compute_output_frames_function(Isolate* isolate); |
590 static ExternalReference global_contexts_list(Isolate* isolate); | 593 static ExternalReference global_contexts_list(Isolate* isolate); |
591 | 594 |
592 // Static data in the keyed lookup cache. | 595 // Static data in the keyed lookup cache. |
593 static ExternalReference keyed_lookup_cache_keys(Isolate* isolate); | 596 static ExternalReference keyed_lookup_cache_keys(Isolate* isolate); |
594 static ExternalReference keyed_lookup_cache_field_offsets(Isolate* isolate); | 597 static ExternalReference keyed_lookup_cache_field_offsets(Isolate* isolate); |
595 | 598 |
596 // Static variable Heap::roots_address() | 599 // Static variable Heap::roots_array_start() |
597 static ExternalReference roots_address(Isolate* isolate); | 600 static ExternalReference roots_array_start(Isolate* isolate); |
598 | 601 |
599 // Static variable StackGuard::address_of_jslimit() | 602 // Static variable StackGuard::address_of_jslimit() |
600 static ExternalReference address_of_stack_limit(Isolate* isolate); | 603 static ExternalReference address_of_stack_limit(Isolate* isolate); |
601 | 604 |
602 // Static variable StackGuard::address_of_real_jslimit() | 605 // Static variable StackGuard::address_of_real_jslimit() |
603 static ExternalReference address_of_real_stack_limit(Isolate* isolate); | 606 static ExternalReference address_of_real_stack_limit(Isolate* isolate); |
604 | 607 |
605 // Static variable RegExpStack::limit_address() | 608 // Static variable RegExpStack::limit_address() |
606 static ExternalReference address_of_regexp_stack_limit(Isolate* isolate); | 609 static ExternalReference address_of_regexp_stack_limit(Isolate* isolate); |
607 | 610 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 static inline bool is_uint28(int x) { return is_uintn(x, 28); } | 843 static inline bool is_uint28(int x) { return is_uintn(x, 28); } |
841 | 844 |
842 static inline int NumberOfBitsSet(uint32_t x) { | 845 static inline int NumberOfBitsSet(uint32_t x) { |
843 unsigned int num_bits_set; | 846 unsigned int num_bits_set; |
844 for (num_bits_set = 0; x; x >>= 1) { | 847 for (num_bits_set = 0; x; x >>= 1) { |
845 num_bits_set += x & 1; | 848 num_bits_set += x & 1; |
846 } | 849 } |
847 return num_bits_set; | 850 return num_bits_set; |
848 } | 851 } |
849 | 852 |
| 853 bool EvalComparison(Token::Value op, double op1, double op2); |
| 854 |
850 // Computes pow(x, y) with the special cases in the spec for Math.pow. | 855 // Computes pow(x, y) with the special cases in the spec for Math.pow. |
851 double power_double_int(double x, int y); | 856 double power_double_int(double x, int y); |
852 double power_double_double(double x, double y); | 857 double power_double_double(double x, double y); |
853 | 858 |
854 // Helper class for generating code or data associated with the code | 859 // Helper class for generating code or data associated with the code |
855 // right after a call instruction. As an example this can be used to | 860 // right after a call instruction. As an example this can be used to |
856 // generate safepoint data after calls for crankshaft. | 861 // generate safepoint data after calls for crankshaft. |
857 class CallWrapper { | 862 class CallWrapper { |
858 public: | 863 public: |
859 CallWrapper() { } | 864 CallWrapper() { } |
860 virtual ~CallWrapper() { } | 865 virtual ~CallWrapper() { } |
861 // Called just before emitting a call. Argument is the size of the generated | 866 // Called just before emitting a call. Argument is the size of the generated |
862 // call code. | 867 // call code. |
863 virtual void BeforeCall(int call_size) const = 0; | 868 virtual void BeforeCall(int call_size) const = 0; |
864 // Called just after emitting a call, i.e., at the return site for the call. | 869 // Called just after emitting a call, i.e., at the return site for the call. |
865 virtual void AfterCall() const = 0; | 870 virtual void AfterCall() const = 0; |
866 }; | 871 }; |
867 | 872 |
868 class NullCallWrapper : public CallWrapper { | 873 class NullCallWrapper : public CallWrapper { |
869 public: | 874 public: |
870 NullCallWrapper() { } | 875 NullCallWrapper() { } |
871 virtual ~NullCallWrapper() { } | 876 virtual ~NullCallWrapper() { } |
872 virtual void BeforeCall(int call_size) const { } | 877 virtual void BeforeCall(int call_size) const { } |
873 virtual void AfterCall() const { } | 878 virtual void AfterCall() const { } |
874 }; | 879 }; |
875 | 880 |
876 } } // namespace v8::internal | 881 } } // namespace v8::internal |
877 | 882 |
878 #endif // V8_ASSEMBLER_H_ | 883 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |