From 1652c8063af5de1e791fedf429bf39b9091e5fd7 Mon Sep 17 00:00:00 2001 From: "zhengxing.li" Date: Mon, 23 Jan 2017 22:30:07 -0800 Subject: [PATCH] X87: Split some SharedFunctionInfo's compiler hints off into debugger hints. port 3a9152ece721903d3b82e60e8d95f51341183f28 (r42594) original commit message: We are planning to add a few more debugger related bits, and are running out of compiler hints bits. The new bit field is going to be part of the debug info struct. If the debug info is not available, we store the bit field in its place on the shared function info. BUG= Review-Url: https://codereview.chromium.org/2649893004 Cr-Commit-Position: refs/heads/master@{#42617} --- src/builtins/x87/builtins-x87.cc | 5 ++--- src/x87/macro-assembler-x87.h | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/builtins/x87/builtins-x87.cc b/src/builtins/x87/builtins-x87.cc index a3942f8211..fcf4a8e967 100644 --- a/src/builtins/x87/builtins-x87.cc +++ b/src/builtins/x87/builtins-x87.cc @@ -535,9 +535,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { // it is present) and load it into kInterpreterBytecodeArrayRegister. __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); Label load_debug_bytecode_array, bytecode_array_loaded; - __ cmp(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), - Immediate(DebugInfo::uninitialized())); - __ j(not_equal, &load_debug_bytecode_array); + __ JumpIfNotSmi(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), + &load_debug_bytecode_array); __ mov(kInterpreterBytecodeArrayRegister, FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); __ bind(&bytecode_array_loaded); diff --git a/src/x87/macro-assembler-x87.h b/src/x87/macro-assembler-x87.h index 96fe63ce18..ebddf21b09 100644 --- a/src/x87/macro-assembler-x87.h +++ b/src/x87/macro-assembler-x87.h @@ -468,7 +468,12 @@ class MacroAssembler: public Assembler { test(value, Immediate(kSmiTagMask)); j(not_zero, not_smi_label, distance); } - + // Jump if the operand is not a smi. + inline void JumpIfNotSmi(Operand value, Label* smi_label, + Label::Distance distance = Label::kFar) { + test(value, Immediate(kSmiTagMask)); + j(not_zero, smi_label, distance); + } // Jump if the value cannot be represented by a smi. inline void JumpIfNotValidSmiValue(Register value, Register scratch, Label* on_invalid,