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

Side by Side Diff: src/assembler.h

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp Created 7 years, 1 month 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/array-iterator.js ('k') | src/assembler.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 (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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool IsCodedSpecially(); 383 bool IsCodedSpecially();
384 384
385 // Read/modify the code target in the branch/call instruction 385 // Read/modify the code target in the branch/call instruction
386 // this relocation applies to; 386 // this relocation applies to;
387 // can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) 387 // can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
388 INLINE(Address target_address()); 388 INLINE(Address target_address());
389 INLINE(void set_target_address(Address target, 389 INLINE(void set_target_address(Address target,
390 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); 390 WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
391 INLINE(Object* target_object()); 391 INLINE(Object* target_object());
392 INLINE(Handle<Object> target_object_handle(Assembler* origin)); 392 INLINE(Handle<Object> target_object_handle(Assembler* origin));
393 INLINE(Object** target_object_address());
394 INLINE(void set_target_object(Object* target, 393 INLINE(void set_target_object(Object* target,
395 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); 394 WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
396 INLINE(Address target_runtime_entry(Assembler* origin)); 395 INLINE(Address target_runtime_entry(Assembler* origin));
397 INLINE(void set_target_runtime_entry(Address target, 396 INLINE(void set_target_runtime_entry(Address target,
398 WriteBarrierMode mode = 397 WriteBarrierMode mode =
399 UPDATE_WRITE_BARRIER)); 398 UPDATE_WRITE_BARRIER));
400 INLINE(Cell* target_cell()); 399 INLINE(Cell* target_cell());
401 INLINE(Handle<Cell> target_cell_handle()); 400 INLINE(Handle<Cell> target_cell_handle());
402 INLINE(void set_target_cell(Cell* cell, 401 INLINE(void set_target_cell(Cell* cell,
403 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); 402 WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
(...skipping 14 matching lines...) Expand all
418 // instruction bits the size of the target will be zero, indicating that the 417 // instruction bits the size of the target will be zero, indicating that the
419 // serializer should not step forwards in memory after a target is resolved 418 // serializer should not step forwards in memory after a target is resolved
420 // and written. In this case the target_address_address function above 419 // and written. In this case the target_address_address function above
421 // should return the end of the instructions to be patched, allowing the 420 // should return the end of the instructions to be patched, allowing the
422 // deserializer to deserialize the instructions as raw bytes and put them in 421 // deserializer to deserialize the instructions as raw bytes and put them in
423 // place, ready to be patched with the target. 422 // place, ready to be patched with the target.
424 INLINE(int target_address_size()); 423 INLINE(int target_address_size());
425 424
426 // Read/modify the reference in the instruction this relocation 425 // Read/modify the reference in the instruction this relocation
427 // applies to; can only be called if rmode_ is external_reference 426 // applies to; can only be called if rmode_ is external_reference
428 INLINE(Address* target_reference_address()); 427 INLINE(Address target_reference());
429 428
430 // Read/modify the address of a call instruction. This is used to relocate 429 // Read/modify the address of a call instruction. This is used to relocate
431 // the break points where straight-line code is patched with a call 430 // the break points where straight-line code is patched with a call
432 // instruction. 431 // instruction.
433 INLINE(Address call_address()); 432 INLINE(Address call_address());
434 INLINE(void set_call_address(Address target)); 433 INLINE(void set_call_address(Address target));
435 INLINE(Object* call_object()); 434 INLINE(Object* call_object());
436 INLINE(void set_call_object(Object* target)); 435 INLINE(void set_call_object(Object* target));
437 INLINE(Object** call_object_address()); 436 INLINE(Object** call_object_address());
438 437
438 // Wipe out a relocation to a fixed value, used for making snapshots
439 // reproducible.
440 INLINE(void WipeOut());
441
439 template<typename StaticVisitor> inline void Visit(Heap* heap); 442 template<typename StaticVisitor> inline void Visit(Heap* heap);
440 inline void Visit(Isolate* isolate, ObjectVisitor* v); 443 inline void Visit(Isolate* isolate, ObjectVisitor* v);
441 444
442 // Patch the code with some other code. 445 // Patch the code with some other code.
443 void PatchCode(byte* instructions, int instruction_count); 446 void PatchCode(byte* instructions, int instruction_count);
444 447
445 // Patch the code with a call. 448 // Patch the code with a call.
446 void PatchCodeWithCall(Address target, int guard_bytes); 449 void PatchCodeWithCall(Address target, int guard_bytes);
447 450
448 // Check whether this return sequence has been patched 451 // Check whether this return sequence has been patched
(...skipping 30 matching lines...) Expand all
479 // to be relocated and not the address of the instruction 482 // to be relocated and not the address of the instruction
480 // referencing the constant pool entry (except when rmode_ == 483 // referencing the constant pool entry (except when rmode_ ==
481 // comment). 484 // comment).
482 byte* pc_; 485 byte* pc_;
483 Mode rmode_; 486 Mode rmode_;
484 union { 487 union {
485 intptr_t data_; 488 intptr_t data_;
486 double data64_; 489 double data64_;
487 }; 490 };
488 Code* host_; 491 Code* host_;
489 // Code and Embedded Object pointers on some platforms are stored split
490 // across two consecutive 32-bit instructions. Heap management
491 // routines expect to access these pointers indirectly. The following
492 // location provides a place for these pointers to exist naturally
493 // when accessed via the Iterator.
494 Object* reconstructed_obj_ptr_;
495 // External-reference pointers are also split across instruction-pairs 492 // External-reference pointers are also split across instruction-pairs
496 // on some platforms, but are accessed via indirect pointers. This location 493 // on some platforms, but are accessed via indirect pointers. This location
497 // provides a place for that pointer to exist naturally. Its address 494 // provides a place for that pointer to exist naturally. Its address
498 // is returned by RelocInfo::target_reference_address(). 495 // is returned by RelocInfo::target_reference_address().
499 Address reconstructed_adr_ptr_; 496 Address reconstructed_adr_ptr_;
500 friend class RelocIterator; 497 friend class RelocIterator;
501 }; 498 };
502 499
503 500
504 // RelocInfoWriter serializes a stream of relocation info. It writes towards 501 // RelocInfoWriter serializes a stream of relocation info. It writes towards
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 // ExternalReferenceTable in serialize.cc manually. 708 // ExternalReferenceTable in serialize.cc manually.
712 709
713 static ExternalReference incremental_marking_record_write_function( 710 static ExternalReference incremental_marking_record_write_function(
714 Isolate* isolate); 711 Isolate* isolate);
715 static ExternalReference incremental_evacuation_record_write_function( 712 static ExternalReference incremental_evacuation_record_write_function(
716 Isolate* isolate); 713 Isolate* isolate);
717 static ExternalReference store_buffer_overflow_function( 714 static ExternalReference store_buffer_overflow_function(
718 Isolate* isolate); 715 Isolate* isolate);
719 static ExternalReference flush_icache_function(Isolate* isolate); 716 static ExternalReference flush_icache_function(Isolate* isolate);
720 static ExternalReference perform_gc_function(Isolate* isolate); 717 static ExternalReference perform_gc_function(Isolate* isolate);
721 static ExternalReference fill_heap_number_with_random_function(
722 Isolate* isolate);
723 static ExternalReference random_uint32_function(Isolate* isolate); 718 static ExternalReference random_uint32_function(Isolate* isolate);
724 static ExternalReference transcendental_cache_array_address(Isolate* isolate); 719 static ExternalReference transcendental_cache_array_address(Isolate* isolate);
725 static ExternalReference delete_handle_scope_extensions(Isolate* isolate); 720 static ExternalReference delete_handle_scope_extensions(Isolate* isolate);
726 721
727 static ExternalReference get_date_field_function(Isolate* isolate); 722 static ExternalReference get_date_field_function(Isolate* isolate);
728 static ExternalReference date_cache_stamp(Isolate* isolate); 723 static ExternalReference date_cache_stamp(Isolate* isolate);
729 724
730 static ExternalReference get_make_code_young_function(Isolate* isolate); 725 static ExternalReference get_make_code_young_function(Isolate* isolate);
731 static ExternalReference get_mark_code_as_executed_function(Isolate* isolate); 726 static ExternalReference get_mark_code_as_executed_function(Isolate* isolate);
732 727
733 // New heap objects tracking support.
734 static ExternalReference record_object_allocation_function(Isolate* isolate);
735
736 // Deoptimization support. 728 // Deoptimization support.
737 static ExternalReference new_deoptimizer_function(Isolate* isolate); 729 static ExternalReference new_deoptimizer_function(Isolate* isolate);
738 static ExternalReference compute_output_frames_function(Isolate* isolate); 730 static ExternalReference compute_output_frames_function(Isolate* isolate);
739 731
740 // Log support. 732 // Log support.
741 static ExternalReference log_enter_external_function(Isolate* isolate); 733 static ExternalReference log_enter_external_function(Isolate* isolate);
742 static ExternalReference log_leave_external_function(Isolate* isolate); 734 static ExternalReference log_leave_external_function(Isolate* isolate);
743 735
744 // Static data in the keyed lookup cache. 736 // Static data in the keyed lookup cache.
745 static ExternalReference keyed_lookup_cache_keys(Isolate* isolate); 737 static ExternalReference keyed_lookup_cache_keys(Isolate* isolate);
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 public: 1066 public:
1075 NullCallWrapper() { } 1067 NullCallWrapper() { }
1076 virtual ~NullCallWrapper() { } 1068 virtual ~NullCallWrapper() { }
1077 virtual void BeforeCall(int call_size) const { } 1069 virtual void BeforeCall(int call_size) const { }
1078 virtual void AfterCall() const { } 1070 virtual void AfterCall() const { }
1079 }; 1071 };
1080 1072
1081 } } // namespace v8::internal 1073 } } // namespace v8::internal
1082 1074
1083 #endif // V8_ASSEMBLER_H_ 1075 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/array-iterator.js ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698