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

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

Issue 2636913002: [liveedit] reimplement frame restarting. (Closed)
Patch Set: Created 3 years, 11 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 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/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 Node* accumulator = __ GetAccumulator(); 2977 Node* accumulator = __ GetAccumulator();
2978 __ Return(accumulator); 2978 __ Return(accumulator);
2979 } 2979 }
2980 2980
2981 // Debugger 2981 // Debugger
2982 // 2982 //
2983 // Call runtime to handle debugger statement. 2983 // Call runtime to handle debugger statement.
2984 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { 2984 void Interpreter::DoDebugger(InterpreterAssembler* assembler) {
2985 Node* context = __ GetContext(); 2985 Node* context = __ GetContext();
2986 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); 2986 __ CallRuntime(Runtime::kHandleDebuggerStatement, context);
2987 __ MaybeDropFrames(context);
2987 __ Dispatch(); 2988 __ Dispatch();
2988 } 2989 }
2989 2990
2990 // DebugBreak 2991 // DebugBreak
2991 // 2992 //
2992 // Call runtime to handle a debug break. 2993 // Call runtime to handle a debug break.
2993 #define DEBUG_BREAK(Name, ...) \ 2994 #define DEBUG_BREAK(Name, ...) \
2994 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \ 2995 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \
2995 Node* context = __ GetContext(); \ 2996 Node* context = __ GetContext(); \
2996 Node* accumulator = __ GetAccumulator(); \ 2997 Node* accumulator = __ GetAccumulator(); \
2997 Node* original_handler = \ 2998 Node* original_handler = \
2998 __ CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \ 2999 __ CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \
3000 __ MaybeDropFrames(context); \
2999 __ DispatchToBytecodeHandler(original_handler); \ 3001 __ DispatchToBytecodeHandler(original_handler); \
3000 } 3002 }
3001 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); 3003 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK);
3002 #undef DEBUG_BREAK 3004 #undef DEBUG_BREAK
3003 3005
3004 void Interpreter::BuildForInPrepareResult(Node* output_register, 3006 void Interpreter::BuildForInPrepareResult(Node* output_register,
3005 Node* cache_type, Node* cache_array, 3007 Node* cache_type, Node* cache_array,
3006 Node* cache_length, 3008 Node* cache_length,
3007 InterpreterAssembler* assembler) { 3009 InterpreterAssembler* assembler) {
3008 __ StoreRegister(cache_type, output_register); 3010 __ StoreRegister(cache_type, output_register);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3259 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 3261 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3260 __ SmiTag(new_state)); 3262 __ SmiTag(new_state));
3261 __ SetAccumulator(old_state); 3263 __ SetAccumulator(old_state);
3262 3264
3263 __ Dispatch(); 3265 __ Dispatch();
3264 } 3266 }
3265 3267
3266 } // namespace interpreter 3268 } // namespace interpreter
3267 } // namespace internal 3269 } // namespace internal
3268 } // namespace v8 3270 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698