| 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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 } | 1285 } |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 | 1288 |
| 1289 Register BaseLoadStubCompiler::CallbackHandlerFrontend( | 1289 Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
| 1290 Handle<JSObject> object, | 1290 Handle<JSObject> object, |
| 1291 Register object_reg, | 1291 Register object_reg, |
| 1292 Handle<JSObject> holder, | 1292 Handle<JSObject> holder, |
| 1293 Handle<Name> name, | 1293 Handle<Name> name, |
| 1294 Label* success, | 1294 Label* success, |
| 1295 Handle<ExecutableAccessorInfo> callback) { | 1295 Handle<Object> callback) { |
| 1296 Label miss; | 1296 Label miss; |
| 1297 | 1297 |
| 1298 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); | 1298 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); |
| 1299 | 1299 |
| 1300 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { | 1300 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { |
| 1301 ASSERT(!reg.is(scratch2())); | 1301 ASSERT(!reg.is(scratch2())); |
| 1302 ASSERT(!reg.is(scratch3())); | 1302 ASSERT(!reg.is(scratch3())); |
| 1303 ASSERT(!reg.is(scratch4())); | 1303 ASSERT(!reg.is(scratch4())); |
| 1304 | 1304 |
| 1305 // Load the properties dictionary. | 1305 // Load the properties dictionary. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 | 1374 |
| 1375 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 1375 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { |
| 1376 // Return the constant value. | 1376 // Return the constant value. |
| 1377 __ LoadObject(r0, value); | 1377 __ LoadObject(r0, value); |
| 1378 __ Ret(); | 1378 __ Ret(); |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 | 1381 |
| 1382 void BaseLoadStubCompiler::GenerateLoadCallback( | 1382 void BaseLoadStubCompiler::GenerateLoadCallback( |
| 1383 Register reg, | 1383 Register reg, |
| 1384 const CallOptimization& call_optimization) { |
| 1385 ASSERT(call_optimization.is_simple_api_call()); |
| 1386 ASSERT(!scratch3().is(reg)); |
| 1387 ASSERT(!receiver().is(reg)); |
| 1388 |
| 1389 // assign stack space for the call arguments |
| 1390 __ sub(sp, sp, Operand((kFastApiCallArguments + 1) * kPointerSize)); |
| 1391 |
| 1392 int argc = 0; |
| 1393 int api_call_argc = argc + kFastApiCallArguments; |
| 1394 // write holder to stack frame |
| 1395 Register holder = |
| 1396 call_optimization.expected_receiver_type().is_null() ? |
| 1397 receiver() : reg; |
| 1398 __ str(holder, MemOperand(sp, 1 * kPointerSize)); |
| 1399 // write receiver to stack frame |
| 1400 __ str(receiver(), MemOperand(sp, (api_call_argc + 0) * kPointerSize)); |
| 1401 |
| 1402 GenerateFastApiDirectCall(masm(), call_optimization, argc); |
| 1403 } |
| 1404 |
| 1405 |
| 1406 void BaseLoadStubCompiler::GenerateLoadCallback( |
| 1407 Register reg, |
| 1384 Handle<ExecutableAccessorInfo> callback) { | 1408 Handle<ExecutableAccessorInfo> callback) { |
| 1385 // Build AccessorInfo::args_ list on the stack and push property name below | 1409 // Build AccessorInfo::args_ list on the stack and push property name below |
| 1386 // the exit frame to make GC aware of them and store pointers to them. | 1410 // the exit frame to make GC aware of them and store pointers to them. |
| 1387 __ push(receiver()); | 1411 __ push(receiver()); |
| 1388 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ | 1412 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ |
| 1389 if (heap()->InNewSpace(callback->data())) { | 1413 if (heap()->InNewSpace(callback->data())) { |
| 1390 __ Move(scratch3(), callback); | 1414 __ Move(scratch3(), callback); |
| 1391 __ ldr(scratch3(), FieldMemOperand(scratch3(), | 1415 __ ldr(scratch3(), FieldMemOperand(scratch3(), |
| 1392 ExecutableAccessorInfo::kDataOffset)); | 1416 ExecutableAccessorInfo::kDataOffset)); |
| 1393 } else { | 1417 } else { |
| (...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3152 // ----------------------------------- | 3176 // ----------------------------------- |
| 3153 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3177 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3154 } | 3178 } |
| 3155 | 3179 |
| 3156 | 3180 |
| 3157 #undef __ | 3181 #undef __ |
| 3158 | 3182 |
| 3159 } } // namespace v8::internal | 3183 } } // namespace v8::internal |
| 3160 | 3184 |
| 3161 #endif // V8_TARGET_ARCH_ARM | 3185 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |