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

Side by Side Diff: src/runtime.cc

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. 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/objects-inl.h ('k') | src/runtime-profiler.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 return optimized; 1804 return optimized;
1805 } 1805 }
1806 1806
1807 1807
1808 static MaybeObject* Runtime_SpecialArrayFunctions(RUNTIME_CALLING_CONVENTION) { 1808 static MaybeObject* Runtime_SpecialArrayFunctions(RUNTIME_CALLING_CONVENTION) {
1809 RUNTIME_GET_ISOLATE; 1809 RUNTIME_GET_ISOLATE;
1810 HandleScope scope(isolate); 1810 HandleScope scope(isolate);
1811 ASSERT(args.length() == 1); 1811 ASSERT(args.length() == 1);
1812 CONVERT_ARG_CHECKED(JSObject, holder, 0); 1812 CONVERT_ARG_CHECKED(JSObject, holder, 0);
1813 1813
1814 InstallBuiltin(isolate, holder, "pop", Builtins::ArrayPop); 1814 InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop);
1815 InstallBuiltin(isolate, holder, "push", Builtins::ArrayPush); 1815 InstallBuiltin(isolate, holder, "push", Builtins::kArrayPush);
1816 InstallBuiltin(isolate, holder, "shift", Builtins::ArrayShift); 1816 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift);
1817 InstallBuiltin(isolate, holder, "unshift", Builtins::ArrayUnshift); 1817 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift);
1818 InstallBuiltin(isolate, holder, "slice", Builtins::ArraySlice); 1818 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice);
1819 InstallBuiltin(isolate, holder, "splice", Builtins::ArraySplice); 1819 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice);
1820 InstallBuiltin(isolate, holder, "concat", Builtins::ArrayConcat); 1820 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat);
1821 1821
1822 return *holder; 1822 return *holder;
1823 } 1823 }
1824 1824
1825 1825
1826 static MaybeObject* Runtime_GetGlobalReceiver(RUNTIME_CALLING_CONVENTION) { 1826 static MaybeObject* Runtime_GetGlobalReceiver(RUNTIME_CALLING_CONVENTION) {
1827 RUNTIME_GET_ISOLATE; 1827 RUNTIME_GET_ISOLATE;
1828 // Returns a real global receiver, not one of builtins object. 1828 // Returns a real global receiver, not one of builtins object.
1829 Context* global_context = 1829 Context* global_context =
1830 isolate->context()->global()->global_context(); 1830 isolate->context()->global()->global_context();
(...skipping 5812 matching lines...) Expand 10 before | Expand all | Expand 10 after
7643 } 7643 }
7644 7644
7645 // Revert to the original stack checks in the original unoptimized code. 7645 // Revert to the original stack checks in the original unoptimized code.
7646 if (FLAG_trace_osr) { 7646 if (FLAG_trace_osr) {
7647 PrintF("[restoring original stack checks in "); 7647 PrintF("[restoring original stack checks in ");
7648 function->PrintName(); 7648 function->PrintName();
7649 PrintF("]\n"); 7649 PrintF("]\n");
7650 } 7650 }
7651 StackCheckStub check_stub; 7651 StackCheckStub check_stub;
7652 Handle<Code> check_code = check_stub.GetCode(); 7652 Handle<Code> check_code = check_stub.GetCode();
7653 Handle<Code> replacement_code( 7653 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement();
7654 isolate->builtins()->builtin(Builtins::OnStackReplacement));
7655 Deoptimizer::RevertStackCheckCode(*unoptimized, 7654 Deoptimizer::RevertStackCheckCode(*unoptimized,
7656 *check_code, 7655 *check_code,
7657 *replacement_code); 7656 *replacement_code);
7658 7657
7659 // Allow OSR only at nesting level zero again. 7658 // Allow OSR only at nesting level zero again.
7660 unoptimized->set_allow_osr_at_loop_nesting_level(0); 7659 unoptimized->set_allow_osr_at_loop_nesting_level(0);
7661 7660
7662 // If the optimization attempt succeeded, return the AST id tagged as a 7661 // If the optimization attempt succeeded, return the AST id tagged as a
7663 // smi. This tells the builtin that we need to translate the unoptimized 7662 // smi. This tells the builtin that we need to translate the unoptimized
7664 // frame to an optimized one. 7663 // frame to an optimized one.
(...skipping 4562 matching lines...) Expand 10 before | Expand all | Expand 10 after
12227 } else { 12226 } else {
12228 // Handle last resort GC and make sure to allow future allocations 12227 // Handle last resort GC and make sure to allow future allocations
12229 // to grow the heap without causing GCs (if possible). 12228 // to grow the heap without causing GCs (if possible).
12230 isolate->counters()->gc_last_resort_from_js()->Increment(); 12229 isolate->counters()->gc_last_resort_from_js()->Increment();
12231 isolate->heap()->CollectAllGarbage(false); 12230 isolate->heap()->CollectAllGarbage(false);
12232 } 12231 }
12233 } 12232 }
12234 12233
12235 12234
12236 } } // namespace v8::internal 12235 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698