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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 6613016: Remove tests for being the normal array constructor from the ArrayConstructCode builtin. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-ia32
Patch Set: Created 9 years, 9 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/builtins-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { 1273 void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
1274 // ----------- S t a t e ------------- 1274 // ----------- S t a t e -------------
1275 // -- rax : argc 1275 // -- rax : argc
1276 // -- rdi : constructor 1276 // -- rdi : constructor
1277 // -- rsp[0] : return address 1277 // -- rsp[0] : return address
1278 // -- rsp[8] : last argument 1278 // -- rsp[8] : last argument
1279 // ----------------------------------- 1279 // -----------------------------------
1280 Label generic_constructor; 1280 Label generic_constructor;
1281 1281
1282 if (FLAG_debug_code) { 1282 if (FLAG_debug_code) {
1283 // The array construct code is only set for the builtin Array function which 1283 // The array construct code is only set for the builtin and internal
1284 // does always have a map. 1284 // Array functions which always have a map.
1285 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rbx);
1286 __ cmpq(rdi, rbx);
1287 __ Check(equal, "Unexpected Array function");
1288 // Initial map for the builtin Array function should be a map. 1285 // Initial map for the builtin Array function should be a map.
1289 __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); 1286 __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
1290 // Will both indicate a NULL and a Smi. 1287 // Will both indicate a NULL and a Smi.
1291 ASSERT(kSmiTag == 0); 1288 ASSERT(kSmiTag == 0);
1292 Condition not_smi = NegateCondition(masm->CheckSmi(rbx)); 1289 Condition not_smi = NegateCondition(masm->CheckSmi(rbx));
1293 __ Check(not_smi, "Unexpected initial map for Array function"); 1290 __ Check(not_smi, "Unexpected initial map for Array function");
1294 __ CmpObjectType(rbx, MAP_TYPE, rcx); 1291 __ CmpObjectType(rbx, MAP_TYPE, rcx);
1295 __ Check(equal, "Unexpected initial map for Array function"); 1292 __ Check(equal, "Unexpected initial map for Array function");
1296 } 1293 }
1297 1294
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1480 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1484 generator.Generate(); 1481 generator.Generate();
1485 } 1482 }
1486 1483
1487 1484
1488 #undef __ 1485 #undef __
1489 1486
1490 } } // namespace v8::internal 1487 } } // namespace v8::internal
1491 1488
1492 #endif // V8_TARGET_ARCH_X64 1489 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698