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

Side by Side Diff: src/runtime.cc

Issue 341082: Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor (Closed)
Patch Set: Created 11 years, 1 month 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/stub-cache.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 4813 matching lines...) Expand 10 before | Expand all | Expand 10 after
4824 4824
4825 4825
4826 static Object* Runtime_ReThrow(Arguments args) { 4826 static Object* Runtime_ReThrow(Arguments args) {
4827 HandleScope scope; 4827 HandleScope scope;
4828 ASSERT(args.length() == 1); 4828 ASSERT(args.length() == 1);
4829 4829
4830 return Top::ReThrow(args[0]); 4830 return Top::ReThrow(args[0]);
4831 } 4831 }
4832 4832
4833 4833
4834 static Object* Runtime_PromoteScheduledException(Arguments args) {
4835 ASSERT_EQ(0, args.length());
4836 return Top::PromoteScheduledException();
4837 }
4838
4839
4834 static Object* Runtime_ThrowReferenceError(Arguments args) { 4840 static Object* Runtime_ThrowReferenceError(Arguments args) {
4835 HandleScope scope; 4841 HandleScope scope;
4836 ASSERT(args.length() == 1); 4842 ASSERT(args.length() == 1);
4837 4843
4838 Handle<Object> name(args[0]); 4844 Handle<Object> name(args[0]);
4839 Handle<Object> reference_error = 4845 Handle<Object> reference_error =
4840 Factory::NewReferenceError("not_defined", HandleVector(&name, 1)); 4846 Factory::NewReferenceError("not_defined", HandleVector(&name, 1));
4841 return Top::Throw(*reference_error); 4847 return Top::Throw(*reference_error);
4842 } 4848 }
4843 4849
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after
7785 ASSERT(args.length() == 2); 7791 ASSERT(args.length() == 2);
7786 OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) + 7792 OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) +
7787 Smi::cast(args[1])->value()); 7793 Smi::cast(args[1])->value());
7788 Top::PrintStack(); 7794 Top::PrintStack();
7789 OS::Abort(); 7795 OS::Abort();
7790 UNREACHABLE(); 7796 UNREACHABLE();
7791 return NULL; 7797 return NULL;
7792 } 7798 }
7793 7799
7794 7800
7801 static Object* Runtime_DeleteHandleScopeExtensions(Arguments args) {
7802 ASSERT(args.length() == 0);
7803 HandleScope::DeleteExtensions();
7804 return Heap::undefined_value();
7805 }
7806
7807
7795 #ifdef DEBUG 7808 #ifdef DEBUG
7796 // ListNatives is ONLY used by the fuzz-natives.js in debug mode 7809 // ListNatives is ONLY used by the fuzz-natives.js in debug mode
7797 // Exclude the code in release mode. 7810 // Exclude the code in release mode.
7798 static Object* Runtime_ListNatives(Arguments args) { 7811 static Object* Runtime_ListNatives(Arguments args) {
7799 ASSERT(args.length() == 0); 7812 ASSERT(args.length() == 0);
7800 HandleScope scope; 7813 HandleScope scope;
7801 Handle<JSArray> result = Factory::NewJSArray(0); 7814 Handle<JSArray> result = Factory::NewJSArray(0);
7802 int index = 0; 7815 int index = 0;
7803 #define ADD_ENTRY(Name, argc, ressize) \ 7816 #define ADD_ENTRY(Name, argc, ressize) \
7804 { \ 7817 { \
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
7873 } else { 7886 } else {
7874 // Handle last resort GC and make sure to allow future allocations 7887 // Handle last resort GC and make sure to allow future allocations
7875 // to grow the heap without causing GCs (if possible). 7888 // to grow the heap without causing GCs (if possible).
7876 Counters::gc_last_resort_from_js.Increment(); 7889 Counters::gc_last_resort_from_js.Increment();
7877 Heap::CollectAllGarbage(false); 7890 Heap::CollectAllGarbage(false);
7878 } 7891 }
7879 } 7892 }
7880 7893
7881 7894
7882 } } // namespace v8::internal 7895 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698