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

Side by Side Diff: src/execution.cc

Issue 240053010: Return Object* instead of MaybeObject* from runtime calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cmpp Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/execution.h ('k') | src/heap.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "execution.h" 5 #include "execution.h"
6 6
7 #include "bootstrapper.h" 7 #include "bootstrapper.h"
8 #include "codegen.h" 8 #include "codegen.h"
9 #include "deoptimizer.h" 9 #include "deoptimizer.h"
10 #include "isolate-inl.h" 10 #include "isolate-inl.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Entering JavaScript. 47 // Entering JavaScript.
48 VMState<JS> state(isolate); 48 VMState<JS> state(isolate);
49 CHECK(AllowJavascriptExecution::IsAllowed(isolate)); 49 CHECK(AllowJavascriptExecution::IsAllowed(isolate));
50 if (!ThrowOnJavascriptExecution::IsAllowed(isolate)) { 50 if (!ThrowOnJavascriptExecution::IsAllowed(isolate)) {
51 isolate->ThrowIllegalOperation(); 51 isolate->ThrowIllegalOperation();
52 isolate->ReportPendingMessages(); 52 isolate->ReportPendingMessages();
53 return MaybeHandle<Object>(); 53 return MaybeHandle<Object>();
54 } 54 }
55 55
56 // Placeholder for return value. 56 // Placeholder for return value.
57 MaybeObject* value = reinterpret_cast<Object*>(kZapValue); 57 Object* value = NULL;
58 58
59 typedef Object* (*JSEntryFunction)(byte* entry, 59 typedef Object* (*JSEntryFunction)(byte* entry,
60 Object* function, 60 Object* function,
61 Object* receiver, 61 Object* receiver,
62 int argc, 62 int argc,
63 Object*** args); 63 Object*** args);
64 64
65 Handle<Code> code = is_construct 65 Handle<Code> code = is_construct
66 ? isolate->factory()->js_construct_entry_code() 66 ? isolate->factory()->js_construct_entry_code()
67 : isolate->factory()->js_entry_code(); 67 : isolate->factory()->js_entry_code();
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 return; 934 return;
935 } 935 }
936 936
937 // Notify the debug event listeners. Indicate auto continue if the break was 937 // Notify the debug event listeners. Indicate auto continue if the break was
938 // a debug command break. 938 // a debug command break.
939 isolate->debugger()->OnDebugBreak(isolate->factory()->undefined_value(), 939 isolate->debugger()->OnDebugBreak(isolate->factory()->undefined_value(),
940 debug_command_only); 940 debug_command_only);
941 } 941 }
942 #endif 942 #endif
943 943
944 MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { 944 Object* Execution::HandleStackGuardInterrupt(Isolate* isolate) {
945 StackGuard* stack_guard = isolate->stack_guard(); 945 StackGuard* stack_guard = isolate->stack_guard();
946 if (stack_guard->ShouldPostponeInterrupts()) { 946 if (stack_guard->ShouldPostponeInterrupts()) {
947 return isolate->heap()->undefined_value(); 947 return isolate->heap()->undefined_value();
948 } 948 }
949 949
950 if (stack_guard->IsAPIInterrupt()) { 950 if (stack_guard->IsAPIInterrupt()) {
951 stack_guard->InvokeInterruptCallback(); 951 stack_guard->InvokeInterruptCallback();
952 stack_guard->Continue(API_INTERRUPT); 952 stack_guard->Continue(API_INTERRUPT);
953 } 953 }
954 954
(...skipping 30 matching lines...) Expand all
985 if (stack_guard->IsInstallCodeRequest()) { 985 if (stack_guard->IsInstallCodeRequest()) {
986 ASSERT(isolate->concurrent_recompilation_enabled()); 986 ASSERT(isolate->concurrent_recompilation_enabled());
987 stack_guard->Continue(INSTALL_CODE); 987 stack_guard->Continue(INSTALL_CODE);
988 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); 988 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
989 } 989 }
990 isolate->runtime_profiler()->OptimizeNow(); 990 isolate->runtime_profiler()->OptimizeNow();
991 return isolate->heap()->undefined_value(); 991 return isolate->heap()->undefined_value();
992 } 992 }
993 993
994 } } // namespace v8::internal 994 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698