Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index f3497ddfc8f9e5c667760409b188731a3f54eb05..6cd24879354452b9070a0ae330ce08f45e83b4d3 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -304,32 +304,28 @@ void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm, |
Register receiver, |
Register scratch1, |
Register scratch2, |
- Label* miss, |
- bool support_wrappers) { |
+ Label* miss) { |
Label check_wrapper; |
// Check if the object is a string leaving the instance type in the |
// scratch register. |
- GenerateStringCheck(masm, receiver, scratch1, miss, |
- support_wrappers ? &check_wrapper : miss); |
+ GenerateStringCheck(masm, receiver, scratch1, miss, &check_wrapper); |
// Load length directly from the string. |
__ movq(rax, FieldOperand(receiver, String::kLengthOffset)); |
__ ret(0); |
- if (support_wrappers) { |
- // Check if the object is a JSValue wrapper. |
- __ bind(&check_wrapper); |
- __ cmpl(scratch1, Immediate(JS_VALUE_TYPE)); |
- __ j(not_equal, miss); |
+ // Check if the object is a JSValue wrapper. |
+ __ bind(&check_wrapper); |
+ __ cmpl(scratch1, Immediate(JS_VALUE_TYPE)); |
+ __ j(not_equal, miss); |
- // Check if the wrapped value is a string and load the length |
- // directly if it is. |
- __ movq(scratch2, FieldOperand(receiver, JSValue::kValueOffset)); |
- GenerateStringCheck(masm, scratch2, scratch1, miss, miss); |
- __ movq(rax, FieldOperand(scratch2, String::kLengthOffset)); |
- __ ret(0); |
- } |
+ // Check if the wrapped value is a string and load the length |
+ // directly if it is. |
+ __ movq(scratch2, FieldOperand(receiver, JSValue::kValueOffset)); |
+ GenerateStringCheck(masm, scratch2, scratch1, miss, miss); |
+ __ movq(rax, FieldOperand(scratch2, String::kLengthOffset)); |
+ __ ret(0); |
} |