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

Side by Side Diff: src/isolate.cc

Issue 2247353005: [builtins] support exception handling in TFJ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refactor a bit Created 4 years, 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 offset = js_frame->LookupExceptionHandlerInTable(&stack_slots, nullptr); 1215 offset = js_frame->LookupExceptionHandlerInTable(&stack_slots, nullptr);
1216 if (offset >= 0) { 1216 if (offset >= 0) {
1217 // Compute the stack pointer from the frame pointer. This ensures that 1217 // Compute the stack pointer from the frame pointer. This ensures that
1218 // argument slots on the stack are dropped as returning would. 1218 // argument slots on the stack are dropped as returning would.
1219 Address return_sp = frame->fp() + 1219 Address return_sp = frame->fp() +
1220 StandardFrameConstants::kFixedFrameSizeAboveFp - 1220 StandardFrameConstants::kFixedFrameSizeAboveFp -
1221 stack_slots * kPointerSize; 1221 stack_slots * kPointerSize;
1222 1222
1223 // Gather information from the frame. 1223 // Gather information from the frame.
1224 code = frame->LookupCode(); 1224 code = frame->LookupCode();
1225 if (code->marked_for_deoptimization()) { 1225
1226 // TODO(bmeurer): Turbofanned BUILTIN frames appear as OPTIMIZED, but
1227 // do not have a code kind of OPTIMIZED_FUNCTION.
1228 if (code->kind() == Code::OPTIMIZED_FUNCTION &&
1229 code->marked_for_deoptimization()) {
1226 // If the target code is lazy deoptimized, we jump to the original 1230 // If the target code is lazy deoptimized, we jump to the original
1227 // return address, but we make a note that we are throwing, so that 1231 // return address, but we make a note that we are throwing, so that
1228 // the deoptimizer can do the right thing. 1232 // the deoptimizer can do the right thing.
1229 offset = static_cast<int>(frame->pc() - code->entry()); 1233 offset = static_cast<int>(frame->pc() - code->entry());
1230 set_deoptimizer_lazy_throw(true); 1234 set_deoptimizer_lazy_throw(true);
1231 } 1235 }
1232 handler_sp = return_sp; 1236 handler_sp = return_sp;
1233 handler_fp = frame->fp(); 1237 handler_fp = frame->fp();
1234 break; 1238 break;
1235 } 1239 }
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
3196 // Then check whether this scope intercepts. 3200 // Then check whether this scope intercepts.
3197 if ((flag & intercept_mask_)) { 3201 if ((flag & intercept_mask_)) {
3198 intercepted_flags_ |= flag; 3202 intercepted_flags_ |= flag;
3199 return true; 3203 return true;
3200 } 3204 }
3201 return false; 3205 return false;
3202 } 3206 }
3203 3207
3204 } // namespace internal 3208 } // namespace internal
3205 } // namespace v8 3209 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698