| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 | 2166 |
| 2167 // Patch the receiver on the stack with the global proxy if | 2167 // Patch the receiver on the stack with the global proxy if |
| 2168 // necessary. | 2168 // necessary. |
| 2169 if (object->IsGlobalObject()) { | 2169 if (object->IsGlobalObject()) { |
| 2170 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); | 2170 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); |
| 2171 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); | 2171 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); |
| 2172 } | 2172 } |
| 2173 break; | 2173 break; |
| 2174 | 2174 |
| 2175 case STRING_CHECK: | 2175 case STRING_CHECK: |
| 2176 if (function->IsBuiltin() || function->shared()->strict_mode()) { | 2176 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) { |
| 2177 // Check that the object is a string or a symbol. | 2177 // Check that the object is a string or a symbol. |
| 2178 __ CmpObjectType(edx, FIRST_NONSTRING_TYPE, eax); | 2178 __ CmpObjectType(edx, FIRST_NONSTRING_TYPE, eax); |
| 2179 __ j(above_equal, &miss); | 2179 __ j(above_equal, &miss); |
| 2180 // Check that the maps starting from the prototype haven't changed. | 2180 // Check that the maps starting from the prototype haven't changed. |
| 2181 GenerateDirectLoadGlobalFunctionPrototype( | 2181 GenerateDirectLoadGlobalFunctionPrototype( |
| 2182 masm(), Context::STRING_FUNCTION_INDEX, eax, &miss); | 2182 masm(), Context::STRING_FUNCTION_INDEX, eax, &miss); |
| 2183 CheckPrototypes( | 2183 CheckPrototypes( |
| 2184 Handle<JSObject>(JSObject::cast(object->GetPrototype())), | 2184 Handle<JSObject>(JSObject::cast(object->GetPrototype())), |
| 2185 eax, holder, ebx, edx, edi, name, &miss); | 2185 eax, holder, ebx, edx, edi, name, &miss); |
| 2186 } else { | 2186 } else { |
| 2187 // Calling non-strict non-builtins with a value as the receiver | 2187 // Calling non-strict non-builtins with a value as the receiver |
| 2188 // requires boxing. | 2188 // requires boxing. |
| 2189 __ jmp(&miss); | 2189 __ jmp(&miss); |
| 2190 } | 2190 } |
| 2191 break; | 2191 break; |
| 2192 | 2192 |
| 2193 case NUMBER_CHECK: | 2193 case NUMBER_CHECK: |
| 2194 if (function->IsBuiltin() || function->shared()->strict_mode()) { | 2194 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) { |
| 2195 Label fast; | 2195 Label fast; |
| 2196 // Check that the object is a smi or a heap number. | 2196 // Check that the object is a smi or a heap number. |
| 2197 __ JumpIfSmi(edx, &fast); | 2197 __ JumpIfSmi(edx, &fast); |
| 2198 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, eax); | 2198 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, eax); |
| 2199 __ j(not_equal, &miss); | 2199 __ j(not_equal, &miss); |
| 2200 __ bind(&fast); | 2200 __ bind(&fast); |
| 2201 // Check that the maps starting from the prototype haven't changed. | 2201 // Check that the maps starting from the prototype haven't changed. |
| 2202 GenerateDirectLoadGlobalFunctionPrototype( | 2202 GenerateDirectLoadGlobalFunctionPrototype( |
| 2203 masm(), Context::NUMBER_FUNCTION_INDEX, eax, &miss); | 2203 masm(), Context::NUMBER_FUNCTION_INDEX, eax, &miss); |
| 2204 CheckPrototypes( | 2204 CheckPrototypes( |
| 2205 Handle<JSObject>(JSObject::cast(object->GetPrototype())), | 2205 Handle<JSObject>(JSObject::cast(object->GetPrototype())), |
| 2206 eax, holder, ebx, edx, edi, name, &miss); | 2206 eax, holder, ebx, edx, edi, name, &miss); |
| 2207 } else { | 2207 } else { |
| 2208 // Calling non-strict non-builtins with a value as the receiver | 2208 // Calling non-strict non-builtins with a value as the receiver |
| 2209 // requires boxing. | 2209 // requires boxing. |
| 2210 __ jmp(&miss); | 2210 __ jmp(&miss); |
| 2211 } | 2211 } |
| 2212 break; | 2212 break; |
| 2213 | 2213 |
| 2214 case BOOLEAN_CHECK: | 2214 case BOOLEAN_CHECK: |
| 2215 if (function->IsBuiltin() || function->shared()->strict_mode()) { | 2215 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) { |
| 2216 Label fast; | 2216 Label fast; |
| 2217 // Check that the object is a boolean. | 2217 // Check that the object is a boolean. |
| 2218 __ cmp(edx, factory()->true_value()); | 2218 __ cmp(edx, factory()->true_value()); |
| 2219 __ j(equal, &fast); | 2219 __ j(equal, &fast); |
| 2220 __ cmp(edx, factory()->false_value()); | 2220 __ cmp(edx, factory()->false_value()); |
| 2221 __ j(not_equal, &miss); | 2221 __ j(not_equal, &miss); |
| 2222 __ bind(&fast); | 2222 __ bind(&fast); |
| 2223 // Check that the maps starting from the prototype haven't changed. | 2223 // Check that the maps starting from the prototype haven't changed. |
| 2224 GenerateDirectLoadGlobalFunctionPrototype( | 2224 GenerateDirectLoadGlobalFunctionPrototype( |
| 2225 masm(), Context::BOOLEAN_FUNCTION_INDEX, eax, &miss); | 2225 masm(), Context::BOOLEAN_FUNCTION_INDEX, eax, &miss); |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3851 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 3851 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
| 3852 __ jmp(ic_miss, RelocInfo::CODE_TARGET); | 3852 __ jmp(ic_miss, RelocInfo::CODE_TARGET); |
| 3853 } | 3853 } |
| 3854 | 3854 |
| 3855 | 3855 |
| 3856 #undef __ | 3856 #undef __ |
| 3857 | 3857 |
| 3858 } } // namespace v8::internal | 3858 } } // namespace v8::internal |
| 3859 | 3859 |
| 3860 #endif // V8_TARGET_ARCH_IA32 | 3860 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |