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

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

Issue 6602081: Stop using plain Arrays internally in built-in functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changed header in bootstrapper.cc 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/v8natives.js ('k') | src/x64/macro-assembler-x64.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 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 // -- rax : argc 1241 // -- rax : argc
1242 // -- rsp[0] : return address 1242 // -- rsp[0] : return address
1243 // -- rsp[8] : last argument 1243 // -- rsp[8] : last argument
1244 // ----------------------------------- 1244 // -----------------------------------
1245 Label generic_array_code; 1245 Label generic_array_code;
1246 1246
1247 // Get the Array function. 1247 // Get the Array function.
1248 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rdi); 1248 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rdi);
1249 1249
1250 if (FLAG_debug_code) { 1250 if (FLAG_debug_code) {
1251 // Initial map for the builtin Array function shoud be a map. 1251 // Initial map for the builtin Array functions should be maps.
1252 __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); 1252 __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
1253 // Will both indicate a NULL and a Smi. 1253 // Will both indicate a NULL and a Smi.
1254 ASSERT(kSmiTag == 0); 1254 ASSERT(kSmiTag == 0);
1255 Condition not_smi = NegateCondition(masm->CheckSmi(rbx)); 1255 Condition not_smi = NegateCondition(masm->CheckSmi(rbx));
1256 __ Check(not_smi, "Unexpected initial map for Array function"); 1256 __ Check(not_smi, "Unexpected initial map for Array function");
1257 __ CmpObjectType(rbx, MAP_TYPE, rcx); 1257 __ CmpObjectType(rbx, MAP_TYPE, rcx);
1258 __ Check(equal, "Unexpected initial map for Array function"); 1258 __ Check(equal, "Unexpected initial map for Array function");
1259 } 1259 }
1260 1260
1261 // Run the native code for the Array function called as a normal function. 1261 // Run the native code for the Array function called as a normal function.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1483 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1484 generator.Generate(); 1484 generator.Generate();
1485 } 1485 }
1486 1486
1487 1487
1488 #undef __ 1488 #undef __
1489 1489
1490 } } // namespace v8::internal 1490 } } // namespace v8::internal
1491 1491
1492 #endif // V8_TARGET_ARCH_X64 1492 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698