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

Side by Side Diff: src/runtime.cc

Issue 1623004: Faster invocation of custom comparator function. (Closed)
Patch Set: Next round Created 10 years, 8 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/runtime.h ('k') | src/x64/codegen-x64.h » ('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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 InstallBuiltin(holder, "shift", Builtins::ArrayShift); 1356 InstallBuiltin(holder, "shift", Builtins::ArrayShift);
1357 InstallBuiltin(holder, "unshift", Builtins::ArrayUnshift); 1357 InstallBuiltin(holder, "unshift", Builtins::ArrayUnshift);
1358 InstallBuiltin(holder, "slice", Builtins::ArraySlice); 1358 InstallBuiltin(holder, "slice", Builtins::ArraySlice);
1359 InstallBuiltin(holder, "splice", Builtins::ArraySplice); 1359 InstallBuiltin(holder, "splice", Builtins::ArraySplice);
1360 InstallBuiltin(holder, "concat", Builtins::ArrayConcat); 1360 InstallBuiltin(holder, "concat", Builtins::ArrayConcat);
1361 1361
1362 return *holder; 1362 return *holder;
1363 } 1363 }
1364 1364
1365 1365
1366 static Object* Runtime_GetGlobalReceiver(Arguments args) {
1367 // Returns a real global receiver, not one of builtins object.
1368 Context* global_context = Top::context()->global()->global_context();
1369 return global_context->global()->global_receiver();
1370 }
1371
1372
1366 static Object* Runtime_MaterializeRegExpLiteral(Arguments args) { 1373 static Object* Runtime_MaterializeRegExpLiteral(Arguments args) {
1367 HandleScope scope; 1374 HandleScope scope;
1368 ASSERT(args.length() == 4); 1375 ASSERT(args.length() == 4);
1369 CONVERT_ARG_CHECKED(FixedArray, literals, 0); 1376 CONVERT_ARG_CHECKED(FixedArray, literals, 0);
1370 int index = Smi::cast(args[1])->value(); 1377 int index = Smi::cast(args[1])->value();
1371 Handle<String> pattern = args.at<String>(2); 1378 Handle<String> pattern = args.at<String>(2);
1372 Handle<String> flags = args.at<String>(3); 1379 Handle<String> flags = args.at<String>(3);
1373 1380
1374 // Get the RegExp function from the context in the literals array. 1381 // Get the RegExp function from the context in the literals array.
1375 // This is the RegExp function from the context in which the 1382 // This is the RegExp function from the context in which the
(...skipping 8680 matching lines...) Expand 10 before | Expand all | Expand 10 after
10056 } else { 10063 } else {
10057 // Handle last resort GC and make sure to allow future allocations 10064 // Handle last resort GC and make sure to allow future allocations
10058 // to grow the heap without causing GCs (if possible). 10065 // to grow the heap without causing GCs (if possible).
10059 Counters::gc_last_resort_from_js.Increment(); 10066 Counters::gc_last_resort_from_js.Increment();
10060 Heap::CollectAllGarbage(false); 10067 Heap::CollectAllGarbage(false);
10061 } 10068 }
10062 } 10069 }
10063 10070
10064 10071
10065 } } // namespace v8::internal 10072 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698