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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 | 1373 |
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 const CallOptimization& call_optimization) { |
| 1384 ASSERT(call_optimization.is_simple_api_call()); |
| 1385 |
| 1386 // Assign stack space for the call arguments. |
| 1387 __ sub(sp, sp, Operand((kFastApiCallArguments + 1) * kPointerSize)); |
| 1388 |
| 1389 int argc = 0; |
| 1390 int api_call_argc = argc + kFastApiCallArguments; |
| 1391 // Write holder to stack frame. |
| 1392 __ str(receiver(), MemOperand(sp, 0)); |
| 1393 // Write receiver to stack frame. |
| 1394 __ str(receiver(), MemOperand(sp, api_call_argc * kPointerSize)); |
| 1395 |
| 1396 GenerateFastApiDirectCall(masm(), call_optimization, argc); |
| 1397 } |
| 1398 |
| 1399 |
| 1400 void BaseLoadStubCompiler::GenerateLoadCallback( |
1383 Register reg, | 1401 Register reg, |
1384 Handle<ExecutableAccessorInfo> callback) { | 1402 Handle<ExecutableAccessorInfo> callback) { |
1385 // Build AccessorInfo::args_ list on the stack and push property name below | 1403 // 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. | 1404 // the exit frame to make GC aware of them and store pointers to them. |
1387 __ push(receiver()); | 1405 __ push(receiver()); |
1388 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ | 1406 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ |
1389 if (heap()->InNewSpace(callback->data())) { | 1407 if (heap()->InNewSpace(callback->data())) { |
1390 __ Move(scratch3(), callback); | 1408 __ Move(scratch3(), callback); |
1391 __ ldr(scratch3(), FieldMemOperand(scratch3(), | 1409 __ ldr(scratch3(), FieldMemOperand(scratch3(), |
1392 ExecutableAccessorInfo::kDataOffset)); | 1410 ExecutableAccessorInfo::kDataOffset)); |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3152 // ----------------------------------- | 3170 // ----------------------------------- |
3153 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3171 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3154 } | 3172 } |
3155 | 3173 |
3156 | 3174 |
3157 #undef __ | 3175 #undef __ |
3158 | 3176 |
3159 } } // namespace v8::internal | 3177 } } // namespace v8::internal |
3160 | 3178 |
3161 #endif // V8_TARGET_ARCH_ARM | 3179 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |