diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-03-18 13:49:34 -0700 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-03-20 01:11:01 +0100 |
commit | 83261e789eb903da39f279cb5a161611482e7df5 (patch) | |
tree | 4133b5ca9f53bed4365e1a94544a227d68a0cf12 /deps/v8/src/mips/macro-assembler-mips.h | |
parent | a05f973f82d2be8527aad4c371d40d3c7e4c564e (diff) | |
download | node-83261e789eb903da39f279cb5a161611482e7df5.tar.gz |
deps: update v8 to 3.17.13
Diffstat (limited to 'deps/v8/src/mips/macro-assembler-mips.h')
-rw-r--r-- | deps/v8/src/mips/macro-assembler-mips.h | 77 |
1 files changed, 55 insertions, 22 deletions
diff --git a/deps/v8/src/mips/macro-assembler-mips.h b/deps/v8/src/mips/macro-assembler-mips.h index b57e51486..e4cf3bcb7 100644 --- a/deps/v8/src/mips/macro-assembler-mips.h +++ b/deps/v8/src/mips/macro-assembler-mips.h @@ -65,6 +65,14 @@ enum AllocationFlags { SIZE_IN_WORDS = 1 << 2 }; +// Flags used for AllocateHeapNumber +enum TaggingMode { + // Tag the result. + TAG_RESULT, + // Don't tag + DONT_TAG_RESULT +}; + // Flags used for the ObjectToDoubleFPURegister function. enum ObjectToDoubleFlags { // No special flags. @@ -469,19 +477,20 @@ class MacroAssembler: public Assembler { // --------------------------------------------------------------------------- // Allocation support. - // Allocate an object in new space. The object_size is specified - // either in bytes or in words if the allocation flag SIZE_IN_WORDS - // is passed. If the new space is exhausted control continues at the - // gc_required label. The allocated object is returned in result. If - // the flag tag_allocated_object is true the result is tagged as as - // a heap object. All registers are clobbered also when control - // continues at the gc_required label. - void AllocateInNewSpace(int object_size, - Register result, - Register scratch1, - Register scratch2, - Label* gc_required, - AllocationFlags flags); + // Allocate an object in new space or old pointer space. The object_size is + // specified either in bytes or in words if the allocation flag SIZE_IN_WORDS + // is passed. If the space is exhausted control continues at the gc_required + // label. The allocated object is returned in result. If the flag + // tag_allocated_object is true the result is tagged as as a heap object. + // All registers are clobbered also when control continues at the gc_required + // label. + void Allocate(int object_size, + Register result, + Register scratch1, + Register scratch2, + Label* gc_required, + AllocationFlags flags); + void AllocateInNewSpace(Register object_size, Register result, Register scratch1, @@ -536,7 +545,8 @@ class MacroAssembler: public Assembler { Register scratch1, Register scratch2, Register heap_number_map, - Label* gc_required); + Label* gc_required, + TaggingMode tagging_mode = TAG_RESULT); void AllocateHeapNumberWithValue(Register result, FPURegister value, Register scratch1, @@ -620,6 +630,7 @@ class MacroAssembler: public Assembler { // Push a handle. void Push(Handle<Object> handle); + void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); } // Push two registers. Pushes leftmost register first (to highest address). void Push(Register src1, Register src2) { @@ -752,14 +763,16 @@ class MacroAssembler: public Assembler { FPURegister double_scratch, Label *not_int32); - // Truncates a double using a specific rounding mode. + // Truncates a double using a specific rounding mode, and writes the value + // to the result register. // The except_flag will contain any exceptions caused by the instruction. - // If check_inexact is kDontCheckForInexactConversion, then the inexacat + // If check_inexact is kDontCheckForInexactConversion, then the inexact // exception is masked. void EmitFPUTruncate(FPURoundingMode rounding_mode, - FPURegister result, + Register result, DoubleRegister double_input, - Register scratch1, + Register scratch, + DoubleRegister double_scratch, Register except_flag, CheckForInexactConversion check_inexact = kDontCheckForInexactConversion); @@ -823,6 +836,7 @@ class MacroAssembler: public Assembler { bool can_have_holes); void LoadGlobalFunction(int index, Register function); + void LoadArrayFunction(Register function); // Load the initial map from the global function. The registers // function and map can be the same, function is then overwritten. @@ -887,6 +901,10 @@ class MacroAssembler: public Assembler { Register scratch, Label* fail); + void IsObjectNameType(Register object, + Register scratch, + Label* fail); + #ifdef ENABLE_DEBUGGER_SUPPORT // ------------------------------------------------------------------------- // Debugger Support. @@ -972,14 +990,14 @@ class MacroAssembler: public Assembler { // case scratch2, scratch3 and scratch4 are unmodified. void StoreNumberToDoubleElements(Register value_reg, Register key_reg, - Register receiver_reg, // All regs below here overwritten. Register elements_reg, Register scratch1, Register scratch2, Register scratch3, Register scratch4, - Label* fail); + Label* fail, + int elements_offset = 0); // Compare an object's map with the specified map and its transitioned // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. Jumps to @@ -1129,6 +1147,7 @@ class MacroAssembler: public Assembler { // Call a code stub. void CallStub(CodeStub* stub, + TypeFeedbackId ast_id = TypeFeedbackId::None(), Condition cond = cc_always, Register r1 = zero_reg, const Operand& r2 = Operand(zero_reg), @@ -1343,6 +1362,9 @@ class MacroAssembler: public Assembler { // Abort execution if argument is not a string, enabled via --debug-code. void AssertString(Register object); + // Abort execution if argument is not a name, enabled via --debug-code. + void AssertName(Register object); + // Abort execution if argument is not the root value with the given index, // enabled via --debug-code. void AssertRootValue(Register src, @@ -1427,6 +1449,17 @@ class MacroAssembler: public Assembler { // in a0. Assumes that any other register can be used as a scratch. void CheckEnumCache(Register null_value, Label* call_runtime); + // AllocationSiteInfo support. Arrays may have an associated + // AllocationSiteInfo object that can be checked for in order to pretransition + // to another type. + // On entry, receiver_reg should point to the array object. + // scratch_reg gets clobbered. + // If allocation info is present, jump to allocation_info_present + void TestJSArrayForAllocationSiteInfo(Register receiver_reg, + Register scratch_reg, + Condition cond, + Label* allocation_info_present); + private: void CallCFunctionHelper(Register function, int num_reg_arguments, @@ -1501,9 +1534,9 @@ class MacroAssembler: public Assembler { // This handle will be patched with the code object on installation. Handle<Object> code_object_; - // Needs access to SafepointRegisterStackIndex for optimized frame + // Needs access to SafepointRegisterStackIndex for compiled frame // traversal. - friend class OptimizedFrame; + friend class StandardFrame; }; |