diff options
Diffstat (limited to 'deps/v8/src/x64/macro-assembler-x64.h')
-rw-r--r-- | deps/v8/src/x64/macro-assembler-x64.h | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/deps/v8/src/x64/macro-assembler-x64.h b/deps/v8/src/x64/macro-assembler-x64.h index 7852d39c03..1fca0e3594 100644 --- a/deps/v8/src/x64/macro-assembler-x64.h +++ b/deps/v8/src/x64/macro-assembler-x64.h @@ -133,6 +133,10 @@ class MacroAssembler: public Assembler { // Operations on roots in the root-array. void LoadRoot(Register destination, Heap::RootListIndex index); + void LoadRoot(const Operand& destination, Heap::RootListIndex index) { + LoadRoot(kScratchRegister, index); + movp(destination, kScratchRegister); + } void StoreRoot(Register source, Heap::RootListIndex index); // Load a root value where the index (or part of it) is variable. // The variable_offset register is added to the fixed_offset value @@ -144,6 +148,21 @@ class MacroAssembler: public Assembler { void CompareRoot(const Operand& with, Heap::RootListIndex index); void PushRoot(Heap::RootListIndex index); + // Compare the object in a register to a value and jump if they are equal. + void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, + Label::Distance if_equal_distance = Label::kNear) { + CompareRoot(with, index); + j(equal, if_equal, if_equal_distance); + } + + // Compare the object in a register to a value and jump if they are not equal. + void JumpIfNotRoot(Register with, Heap::RootListIndex index, + Label* if_not_equal, + Label::Distance if_not_equal_distance = Label::kNear) { + CompareRoot(with, index); + j(not_equal, if_not_equal, if_not_equal_distance); + } + // These functions do not arrange the registers in any particular order so // they are not useful for calls that can cause a GC. The caller can // exclude up to 3 registers that do not need to be saved and restored. @@ -375,17 +394,15 @@ class MacroAssembler: public Assembler { InvokeFlag flag, const CallWrapper& call_wrapper); - // Invoke specified builtin JavaScript function. Adds an entry to - // the unresolved list if the name does not resolve. - void InvokeBuiltin(Builtins::JavaScript id, - InvokeFlag flag, + // Invoke specified builtin JavaScript function. + void InvokeBuiltin(int native_context_index, InvokeFlag flag, const CallWrapper& call_wrapper = NullCallWrapper()); // Store the function for the given builtin in the target register. - void GetBuiltinFunction(Register target, Builtins::JavaScript id); + void GetBuiltinFunction(Register target, int native_context_index); // Store the code object for the given builtin in the target register. - void GetBuiltinEntry(Register target, Builtins::JavaScript id); + void GetBuiltinEntry(Register target, int native_context_index); // --------------------------------------------------------------------------- @@ -742,17 +759,6 @@ class MacroAssembler: public Assembler { // --------------------------------------------------------------------------- // String macros. - // Generate code to do a lookup in the number string cache. If the number in - // the register object is found in the cache the generated code falls through - // with the result in the result register. The object and the result register - // can be the same. If the number is not found in the cache the code jumps to - // the label not_found with only the content of register object unchanged. - void LookupNumberStringCache(Register object, - Register result, - Register scratch1, - Register scratch2, - Label* not_found); - // If object is a string, its map is loaded into object_map. void JumpIfNotString(Register object, Register object_map, @@ -1099,6 +1105,9 @@ class MacroAssembler: public Assembler { // Abort execution if argument is not a name, enabled via --debug-code. void AssertName(Register object); + // Abort execution if argument is not a JSFunction, enabled via --debug-code. + void AssertFunction(Register object); + // Abort execution if argument is not undefined or an AllocationSite, enabled // via --debug-code. void AssertUndefinedOrAllocationSite(Register object); @@ -1240,10 +1249,7 @@ class MacroAssembler: public Assembler { // function and jumps to the miss label if the fast checks fail. The // function register will be untouched; the other register may be // clobbered. - void TryGetFunctionPrototype(Register function, - Register result, - Label* miss, - bool miss_on_bound_function = false); + void TryGetFunctionPrototype(Register function, Register result, Label* miss); // Picks out an array index from the hash field. // Register use: @@ -1254,6 +1260,9 @@ class MacroAssembler: public Assembler { // Find the function context up the context chain. void LoadContext(Register dst, int context_chain_length); + // Load the global proxy from the current context. + void LoadGlobalProxy(Register dst); + // Conditionally load the cached Array transitioned map of type // transitioned_kind from the native context if the map in register // map_in_out is the cached Array map in the native context of @@ -1417,6 +1426,9 @@ class MacroAssembler: public Assembler { return SafepointRegisterStackIndex(reg.code()); } + // Load the type feedback vector from a JavaScript frame. + void EmitLoadTypeFeedbackVector(Register vector); + // Activation support. void EnterFrame(StackFrame::Type type); void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg); |