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 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2258 | 2258 |
2259 // Patch the receiver on the stack with the global proxy if | 2259 // Patch the receiver on the stack with the global proxy if |
2260 // necessary. | 2260 // necessary. |
2261 if (object->IsGlobalObject()) { | 2261 if (object->IsGlobalObject()) { |
2262 __ ldr(r3, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); | 2262 __ ldr(r3, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); |
2263 __ str(r3, MemOperand(sp, argc * kPointerSize)); | 2263 __ str(r3, MemOperand(sp, argc * kPointerSize)); |
2264 } | 2264 } |
2265 break; | 2265 break; |
2266 | 2266 |
2267 case STRING_CHECK: | 2267 case STRING_CHECK: |
2268 if (function->IsBuiltin() || function->shared()->strict_mode()) { | 2268 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) { |
2269 // Check that the object is a two-byte string or a symbol. | 2269 // Check that the object is a two-byte string or a symbol. |
2270 __ CompareObjectType(r1, r3, r3, FIRST_NONSTRING_TYPE); | 2270 __ CompareObjectType(r1, r3, r3, FIRST_NONSTRING_TYPE); |
2271 __ b(ge, &miss); | 2271 __ b(ge, &miss); |
2272 // Check that the maps starting from the prototype haven't changed. | 2272 // Check that the maps starting from the prototype haven't changed. |
2273 GenerateDirectLoadGlobalFunctionPrototype( | 2273 GenerateDirectLoadGlobalFunctionPrototype( |
2274 masm(), Context::STRING_FUNCTION_INDEX, r0, &miss); | 2274 masm(), Context::STRING_FUNCTION_INDEX, r0, &miss); |
2275 CheckPrototypes( | 2275 CheckPrototypes( |
2276 Handle<JSObject>(JSObject::cast(object->GetPrototype())), | 2276 Handle<JSObject>(JSObject::cast(object->GetPrototype())), |
2277 r0, holder, r3, r1, r4, name, &miss); | 2277 r0, holder, r3, r1, r4, name, &miss); |
2278 } else { | 2278 } else { |
2279 // Calling non-strict non-builtins with a value as the receiver | 2279 // Calling non-strict non-builtins with a value as the receiver |
2280 // requires boxing. | 2280 // requires boxing. |
2281 __ jmp(&miss); | 2281 __ jmp(&miss); |
2282 } | 2282 } |
2283 break; | 2283 break; |
2284 | 2284 |
2285 case NUMBER_CHECK: | 2285 case NUMBER_CHECK: |
2286 if (function->IsBuiltin() || function->shared()->strict_mode()) { | 2286 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) { |
2287 Label fast; | 2287 Label fast; |
2288 // Check that the object is a smi or a heap number. | 2288 // Check that the object is a smi or a heap number. |
2289 __ JumpIfSmi(r1, &fast); | 2289 __ JumpIfSmi(r1, &fast); |
2290 __ CompareObjectType(r1, r0, r0, HEAP_NUMBER_TYPE); | 2290 __ CompareObjectType(r1, r0, r0, HEAP_NUMBER_TYPE); |
2291 __ b(ne, &miss); | 2291 __ b(ne, &miss); |
2292 __ bind(&fast); | 2292 __ bind(&fast); |
2293 // Check that the maps starting from the prototype haven't changed. | 2293 // Check that the maps starting from the prototype haven't changed. |
2294 GenerateDirectLoadGlobalFunctionPrototype( | 2294 GenerateDirectLoadGlobalFunctionPrototype( |
2295 masm(), Context::NUMBER_FUNCTION_INDEX, r0, &miss); | 2295 masm(), Context::NUMBER_FUNCTION_INDEX, r0, &miss); |
2296 CheckPrototypes( | 2296 CheckPrototypes( |
2297 Handle<JSObject>(JSObject::cast(object->GetPrototype())), | 2297 Handle<JSObject>(JSObject::cast(object->GetPrototype())), |
2298 r0, holder, r3, r1, r4, name, &miss); | 2298 r0, holder, r3, r1, r4, name, &miss); |
2299 } else { | 2299 } else { |
2300 // Calling non-strict non-builtins with a value as the receiver | 2300 // Calling non-strict non-builtins with a value as the receiver |
2301 // requires boxing. | 2301 // requires boxing. |
2302 __ jmp(&miss); | 2302 __ jmp(&miss); |
2303 } | 2303 } |
2304 break; | 2304 break; |
2305 | 2305 |
2306 case BOOLEAN_CHECK: | 2306 case BOOLEAN_CHECK: |
2307 if (function->IsBuiltin() || function->shared()->strict_mode()) { | 2307 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) { |
2308 Label fast; | 2308 Label fast; |
2309 // Check that the object is a boolean. | 2309 // Check that the object is a boolean. |
2310 __ LoadRoot(ip, Heap::kTrueValueRootIndex); | 2310 __ LoadRoot(ip, Heap::kTrueValueRootIndex); |
2311 __ cmp(r1, ip); | 2311 __ cmp(r1, ip); |
2312 __ b(eq, &fast); | 2312 __ b(eq, &fast); |
2313 __ LoadRoot(ip, Heap::kFalseValueRootIndex); | 2313 __ LoadRoot(ip, Heap::kFalseValueRootIndex); |
2314 __ cmp(r1, ip); | 2314 __ cmp(r1, ip); |
2315 __ b(ne, &miss); | 2315 __ b(ne, &miss); |
2316 __ bind(&fast); | 2316 __ bind(&fast); |
2317 // Check that the maps starting from the prototype haven't changed. | 2317 // Check that the maps starting from the prototype haven't changed. |
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4234 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4234 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
4235 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4235 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
4236 } | 4236 } |
4237 | 4237 |
4238 | 4238 |
4239 #undef __ | 4239 #undef __ |
4240 | 4240 |
4241 } } // namespace v8::internal | 4241 } } // namespace v8::internal |
4242 | 4242 |
4243 #endif // V8_TARGET_ARCH_ARM | 4243 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |