| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2334 __ LoadRoot(ip, Heap::kTrueValueRootIndex); | 2334 __ LoadRoot(ip, Heap::kTrueValueRootIndex); |
| 2335 __ cmp(object, ip); | 2335 __ cmp(object, ip); |
| 2336 __ b(eq, &success); | 2336 __ b(eq, &success); |
| 2337 __ LoadRoot(ip, Heap::kFalseValueRootIndex); | 2337 __ LoadRoot(ip, Heap::kFalseValueRootIndex); |
| 2338 __ cmp(object, ip); | 2338 __ cmp(object, ip); |
| 2339 __ b(ne, miss); | 2339 __ b(ne, miss); |
| 2340 __ bind(&success); | 2340 __ bind(&success); |
| 2341 } | 2341 } |
| 2342 | 2342 |
| 2343 | 2343 |
| 2344 void CallStubCompiler::PatchGlobalProxy(Handle<Object> object) { | 2344 void CallStubCompiler::PatchImplicitReceiver(Handle<Object> object) { |
| 2345 if (object->IsGlobalObject()) { | 2345 if (object->IsGlobalObject()) { |
| 2346 const int argc = arguments().immediate(); | 2346 const int argc = arguments().immediate(); |
| 2347 const int receiver_offset = argc * kPointerSize; | 2347 const int receiver_offset = argc * kPointerSize; |
| 2348 __ ldr(r3, FieldMemOperand(r0, GlobalObject::kGlobalReceiverOffset)); | 2348 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
| 2349 __ str(r3, MemOperand(sp, receiver_offset)); | 2349 __ str(r3, MemOperand(sp, receiver_offset)); |
| 2350 } | 2350 } |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 | 2353 |
| 2354 Register CallStubCompiler::HandlerFrontendHeader(Handle<Object> object, | 2354 Register CallStubCompiler::HandlerFrontendHeader(Handle<Object> object, |
| 2355 Handle<JSObject> holder, | 2355 Handle<JSObject> holder, |
| 2356 Handle<Name> name, | 2356 Handle<Name> name, |
| 2357 CheckType check, | 2357 CheckType check, |
| 2358 Label* miss) { | 2358 Label* miss) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2437 return reg; | 2437 return reg; |
| 2438 } | 2438 } |
| 2439 | 2439 |
| 2440 | 2440 |
| 2441 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 2441 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
| 2442 Register function, | 2442 Register function, |
| 2443 Label* miss) { | 2443 Label* miss) { |
| 2444 ASSERT(function.is(r1)); | 2444 ASSERT(function.is(r1)); |
| 2445 // Check that the function really is a function. | 2445 // Check that the function really is a function. |
| 2446 GenerateFunctionCheck(function, r3, miss); | 2446 GenerateFunctionCheck(function, r3, miss); |
| 2447 PatchGlobalProxy(object); | 2447 PatchImplicitReceiver(object); |
| 2448 | 2448 |
| 2449 // Invoke the function. | 2449 // Invoke the function. |
| 2450 __ InvokeFunction(r1, arguments(), JUMP_FUNCTION, | 2450 __ InvokeFunction(r1, arguments(), JUMP_FUNCTION, |
| 2451 NullCallWrapper(), call_kind()); | 2451 NullCallWrapper(), call_kind()); |
| 2452 } | 2452 } |
| 2453 | 2453 |
| 2454 | 2454 |
| 2455 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, | 2455 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
| 2456 Handle<JSObject> holder, | 2456 Handle<JSObject> holder, |
| 2457 Handle<Name> name) { | 2457 Handle<Name> name) { |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2891 // ----------------------------------- | 2891 // ----------------------------------- |
| 2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2893 } | 2893 } |
| 2894 | 2894 |
| 2895 | 2895 |
| 2896 #undef __ | 2896 #undef __ |
| 2897 | 2897 |
| 2898 } } // namespace v8::internal | 2898 } } // namespace v8::internal |
| 2899 | 2899 |
| 2900 #endif // V8_TARGET_ARCH_ARM | 2900 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |