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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 } | 1280 } |
1281 } | 1281 } |
1282 | 1282 |
1283 | 1283 |
1284 Register BaseLoadStubCompiler::CallbackHandlerFrontend( | 1284 Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
1285 Handle<JSObject> object, | 1285 Handle<JSObject> object, |
1286 Register object_reg, | 1286 Register object_reg, |
1287 Handle<JSObject> holder, | 1287 Handle<JSObject> holder, |
1288 Handle<Name> name, | 1288 Handle<Name> name, |
1289 Label* success, | 1289 Label* success, |
1290 Handle<ExecutableAccessorInfo> callback) { | 1290 Handle<Object> callback) { |
1291 Label miss; | 1291 Label miss; |
1292 | 1292 |
1293 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); | 1293 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); |
1294 | 1294 |
1295 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { | 1295 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { |
1296 ASSERT(!reg.is(scratch2())); | 1296 ASSERT(!reg.is(scratch2())); |
1297 ASSERT(!reg.is(scratch3())); | 1297 ASSERT(!reg.is(scratch3())); |
1298 ASSERT(!reg.is(scratch4())); | 1298 ASSERT(!reg.is(scratch4())); |
1299 | 1299 |
1300 // Load the properties dictionary. | 1300 // Load the properties dictionary. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 | 1367 |
1368 | 1368 |
1369 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 1369 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { |
1370 // Return the constant value. | 1370 // Return the constant value. |
1371 __ LoadObject(v0, value); | 1371 __ LoadObject(v0, value); |
1372 __ Ret(); | 1372 __ Ret(); |
1373 } | 1373 } |
1374 | 1374 |
1375 | 1375 |
1376 void BaseLoadStubCompiler::GenerateLoadCallback( | 1376 void BaseLoadStubCompiler::GenerateLoadCallback( |
| 1377 const CallOptimization& call_optimization) { |
| 1378 ASSERT(call_optimization.is_simple_api_call()); |
| 1379 |
| 1380 // Assign stack space for the call arguments. |
| 1381 __ Subu(sp, sp, Operand((kFastApiCallArguments + 1) * kPointerSize)); |
| 1382 |
| 1383 int argc = 0; |
| 1384 int api_call_argc = argc + kFastApiCallArguments; |
| 1385 // Write holder to stack frame. |
| 1386 __ sw(receiver(), MemOperand(sp, 0)); |
| 1387 // Write receiver to stack frame. |
| 1388 __ sw(receiver(), MemOperand(sp, api_call_argc * kPointerSize)); |
| 1389 |
| 1390 GenerateFastApiDirectCall(masm(), call_optimization, argc); |
| 1391 } |
| 1392 |
| 1393 |
| 1394 void BaseLoadStubCompiler::GenerateLoadCallback( |
1377 Register reg, | 1395 Register reg, |
1378 Handle<ExecutableAccessorInfo> callback) { | 1396 Handle<ExecutableAccessorInfo> callback) { |
1379 // Build AccessorInfo::args_ list on the stack and push property name below | 1397 // Build AccessorInfo::args_ list on the stack and push property name below |
1380 // the exit frame to make GC aware of them and store pointers to them. | 1398 // the exit frame to make GC aware of them and store pointers to them. |
1381 __ push(receiver()); | 1399 __ push(receiver()); |
1382 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ | 1400 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ |
1383 if (heap()->InNewSpace(callback->data())) { | 1401 if (heap()->InNewSpace(callback->data())) { |
1384 __ li(scratch3(), callback); | 1402 __ li(scratch3(), callback); |
1385 __ lw(scratch3(), FieldMemOperand(scratch3(), | 1403 __ lw(scratch3(), FieldMemOperand(scratch3(), |
1386 ExecutableAccessorInfo::kDataOffset)); | 1404 ExecutableAccessorInfo::kDataOffset)); |
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3169 // ----------------------------------- | 3187 // ----------------------------------- |
3170 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3188 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3171 } | 3189 } |
3172 | 3190 |
3173 | 3191 |
3174 #undef __ | 3192 #undef __ |
3175 | 3193 |
3176 } } // namespace v8::internal | 3194 } } // namespace v8::internal |
3177 | 3195 |
3178 #endif // V8_TARGET_ARCH_MIPS | 3196 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |