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

Side by Side Diff: src/runtime/runtime-interpreter.cc

Issue 2487173002: [turbofan] Advance bytecode offset after lazy deopt. (Closed)
Patch Set: Properly restore context. Created 4 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/runtime.h ('k') | test/debugger/debugger.status » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 RUNTIME_FUNCTION(Runtime_InterpreterSetPendingMessage) { 166 RUNTIME_FUNCTION(Runtime_InterpreterSetPendingMessage) {
167 SealHandleScope shs(isolate); 167 SealHandleScope shs(isolate);
168 DCHECK_EQ(1, args.length()); 168 DCHECK_EQ(1, args.length());
169 CONVERT_ARG_HANDLE_CHECKED(Object, message, 0); 169 CONVERT_ARG_HANDLE_CHECKED(Object, message, 0);
170 isolate->thread_local_top()->pending_message_obj_ = *message; 170 isolate->thread_local_top()->pending_message_obj_ = *message;
171 return isolate->heap()->undefined_value(); 171 return isolate->heap()->undefined_value();
172 } 172 }
173 173
174 RUNTIME_FUNCTION(Runtime_InterpreterAdvanceBytecodeOffset) {
175 SealHandleScope shs(isolate);
176 DCHECK_EQ(2, args.length());
177 CONVERT_ARG_HANDLE_CHECKED(BytecodeArray, bytecode_array, 0);
178 CONVERT_SMI_ARG_CHECKED(bytecode_offset, 1);
179 interpreter::BytecodeArrayIterator it(bytecode_array);
180 int offset = bytecode_offset - BytecodeArray::kHeaderSize + kHeapObjectTag;
181 while (it.current_offset() < offset) it.Advance();
182 DCHECK_EQ(offset, it.current_offset());
183 it.Advance(); // Advance by one bytecode.
184 offset = it.current_offset() + BytecodeArray::kHeaderSize - kHeapObjectTag;
185 return Smi::FromInt(offset);
186 }
187
174 } // namespace internal 188 } // namespace internal
175 } // namespace v8 189 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/debugger/debugger.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698