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

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

Issue 3144002: Copy-on-write arrays. (Closed)
Patch Set: Review fixes. Created 10 years, 4 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
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/builtins.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 const int argc = arguments().immediate(); 1290 const int argc = arguments().immediate();
1291 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); 1291 __ ldr(r1, MemOperand(sp, argc * kPointerSize));
1292 1292
1293 // Check that the receiver isn't a smi. 1293 // Check that the receiver isn't a smi.
1294 __ tst(r1, Operand(kSmiTagMask)); 1294 __ tst(r1, Operand(kSmiTagMask));
1295 __ b(eq, &miss); 1295 __ b(eq, &miss);
1296 1296
1297 // Check that the maps haven't changed. 1297 // Check that the maps haven't changed.
1298 CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, r4, name, &miss); 1298 CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, r4, name, &miss);
1299 1299
1300 if (object->IsGlobalObject()) {
1301 __ ldr(r3, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset));
1302 __ str(r3, MemOperand(sp, argc * kPointerSize));
1303 }
1304
1305 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPush), 1300 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPush),
1306 argc + 1, 1301 argc + 1,
1307 1); 1302 1);
1308 1303
1309 // Handle call cache miss. 1304 // Handle call cache miss.
1310 __ bind(&miss); 1305 __ bind(&miss);
1311 Object* obj = GenerateMissBranch(); 1306 Object* obj = GenerateMissBranch();
1312 if (obj->IsFailure()) return obj; 1307 if (obj->IsFailure()) return obj;
1313 1308
1314 // Return the generated code. 1309 // Return the generated code.
(...skipping 27 matching lines...) Expand all
1342 const int argc = arguments().immediate(); 1337 const int argc = arguments().immediate();
1343 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); 1338 __ ldr(r1, MemOperand(sp, argc * kPointerSize));
1344 1339
1345 // Check that the receiver isn't a smi. 1340 // Check that the receiver isn't a smi.
1346 __ tst(r1, Operand(kSmiTagMask)); 1341 __ tst(r1, Operand(kSmiTagMask));
1347 __ b(eq, &miss); 1342 __ b(eq, &miss);
1348 1343
1349 // Check that the maps haven't changed. 1344 // Check that the maps haven't changed.
1350 CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, r4, name, &miss); 1345 CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, r4, name, &miss);
1351 1346
1352 if (object->IsGlobalObject()) {
1353 __ ldr(r3, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset));
1354 __ str(r3, MemOperand(sp, argc * kPointerSize));
1355 }
1356
1357 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPop), 1347 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPop),
1358 argc + 1, 1348 argc + 1,
1359 1); 1349 1);
1360 1350
1361 // Handle call cache miss. 1351 // Handle call cache miss.
1362 __ bind(&miss); 1352 __ bind(&miss);
1363 Object* obj = GenerateMissBranch(); 1353 Object* obj = GenerateMissBranch();
1364 if (obj->IsFailure()) return obj; 1354 if (obj->IsFailure()) return obj;
1365 1355
1366 // Return the generated code. 1356 // Return the generated code.
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 // Return the generated code. 2344 // Return the generated code.
2355 return GetCode(); 2345 return GetCode();
2356 } 2346 }
2357 2347
2358 2348
2359 #undef __ 2349 #undef __
2360 2350
2361 } } // namespace v8::internal 2351 } } // namespace v8::internal
2362 2352
2363 #endif // V8_TARGET_ARCH_ARM 2353 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698