Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 23984002: load ics for js api accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 } 1254 }
1255 } 1255 }
1256 1256
1257 1257
1258 Register BaseLoadStubCompiler::CallbackHandlerFrontend( 1258 Register BaseLoadStubCompiler::CallbackHandlerFrontend(
1259 Handle<JSObject> object, 1259 Handle<JSObject> object,
1260 Register object_reg, 1260 Register object_reg,
1261 Handle<JSObject> holder, 1261 Handle<JSObject> holder,
1262 Handle<Name> name, 1262 Handle<Name> name,
1263 Label* success, 1263 Label* success,
1264 Handle<ExecutableAccessorInfo> callback) { 1264 Handle<Object> callback) {
1265 Label miss; 1265 Label miss;
1266 1266
1267 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); 1267 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss);
1268 1268
1269 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { 1269 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) {
1270 ASSERT(!reg.is(scratch2())); 1270 ASSERT(!reg.is(scratch2()));
1271 ASSERT(!reg.is(scratch3())); 1271 ASSERT(!reg.is(scratch3()));
1272 Register dictionary = scratch1(); 1272 Register dictionary = scratch1();
1273 bool must_preserve_dictionary_reg = reg.is(dictionary); 1273 bool must_preserve_dictionary_reg = reg.is(dictionary);
1274 1274
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 } else { 1348 } else {
1349 KeyedLoadFieldStub stub(field.is_inobject(holder), 1349 KeyedLoadFieldStub stub(field.is_inobject(holder),
1350 field.translate(holder), 1350 field.translate(holder),
1351 representation); 1351 representation);
1352 GenerateTailCall(masm(), stub.GetCode(isolate())); 1352 GenerateTailCall(masm(), stub.GetCode(isolate()));
1353 } 1353 }
1354 } 1354 }
1355 1355
1356 1356
1357 void BaseLoadStubCompiler::GenerateLoadCallback( 1357 void BaseLoadStubCompiler::GenerateLoadCallback(
1358 const CallOptimization& call_optimization) {
1359 ASSERT(call_optimization.is_simple_api_call());
1360
1361 // Copy return value.
1362 __ mov(scratch3(), Operand(esp, 0));
1363 // Assign stack space for the call arguments.
1364 __ sub(esp, Immediate((kFastApiCallArguments + 1) * kPointerSize));
1365 // Move the return address on top of the stack.
1366 __ mov(Operand(esp, 0), scratch3());
1367
1368 int argc = 0;
1369 int api_call_argc = argc + kFastApiCallArguments;
1370 // Write holder to stack frame.
1371 __ mov(Operand(esp, 1 * kPointerSize), receiver());
1372 // Write receiver to stack frame.
1373 __ mov(Operand(esp, (api_call_argc + 1) * kPointerSize), receiver());
1374
1375 GenerateFastApiCall(masm(), call_optimization, argc);
1376 }
1377
1378
1379 void BaseLoadStubCompiler::GenerateLoadCallback(
1358 Register reg, 1380 Register reg,
1359 Handle<ExecutableAccessorInfo> callback) { 1381 Handle<ExecutableAccessorInfo> callback) {
1360 // Insert additional parameters into the stack frame above return address. 1382 // Insert additional parameters into the stack frame above return address.
1361 ASSERT(!scratch3().is(reg)); 1383 ASSERT(!scratch3().is(reg));
1362 __ pop(scratch3()); // Get return address to place it below. 1384 __ pop(scratch3()); // Get return address to place it below.
1363 1385
1364 __ push(receiver()); // receiver 1386 __ push(receiver()); // receiver
1365 __ mov(scratch2(), esp); 1387 __ mov(scratch2(), esp);
1366 ASSERT(!scratch2().is(reg)); 1388 ASSERT(!scratch2().is(reg));
1367 __ push(reg); // holder 1389 __ push(reg); // holder
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
3242 // ----------------------------------- 3264 // -----------------------------------
3243 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3265 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3244 } 3266 }
3245 3267
3246 3268
3247 #undef __ 3269 #undef __
3248 3270
3249 } } // namespace v8::internal 3271 } } // namespace v8::internal
3250 3272
3251 #endif // V8_TARGET_ARCH_IA32 3273 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698