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

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

Issue 2570213002: [stubs] Enable machine graph verification for CodeStubAssembler and friends by default in debug mode (Closed)
Patch Set: Created 4 years 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 OperandScale operand_scale, 97 OperandScale operand_scale,
98 BytecodeGeneratorFunc generator) { 98 BytecodeGeneratorFunc generator) {
99 if (!Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) return; 99 if (!Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) return;
100 100
101 InterpreterDispatchDescriptor descriptor(isolate_); 101 InterpreterDispatchDescriptor descriptor(isolate_);
102 compiler::CodeAssemblerState state( 102 compiler::CodeAssemblerState state(
103 isolate_, zone, descriptor, Code::ComputeFlags(Code::BYTECODE_HANDLER), 103 isolate_, zone, descriptor, Code::ComputeFlags(Code::BYTECODE_HANDLER),
104 Bytecodes::ToString(bytecode), Bytecodes::ReturnCount(bytecode)); 104 Bytecodes::ToString(bytecode), Bytecodes::ReturnCount(bytecode));
105 InterpreterAssembler assembler(&state, bytecode, operand_scale); 105 InterpreterAssembler assembler(&state, bytecode, operand_scale);
106 (this->*generator)(&assembler); 106 (this->*generator)(&assembler);
107 // TODO(ishell): enable verification once all issues are fixed. 107 Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state);
108 // Enable verification only in mksnapshot.
109 bool verify_graph = FLAG_csa_verify && FLAG_startup_blob != nullptr;
110 Handle<Code> code =
111 compiler::CodeAssembler::GenerateCode(&state, verify_graph);
112 size_t index = GetDispatchTableIndex(bytecode, operand_scale); 108 size_t index = GetDispatchTableIndex(bytecode, operand_scale);
113 dispatch_table_[index] = code->entry(); 109 dispatch_table_[index] = code->entry();
114 TraceCodegen(code); 110 TraceCodegen(code);
115 PROFILE(isolate_, CodeCreateEvent( 111 PROFILE(isolate_, CodeCreateEvent(
116 CodeEventListener::BYTECODE_HANDLER_TAG, 112 CodeEventListener::BYTECODE_HANDLER_TAG,
117 AbstractCode::cast(*code), 113 AbstractCode::cast(*code),
118 Bytecodes::ToString(bytecode, operand_scale).c_str())); 114 Bytecodes::ToString(bytecode, operand_scale).c_str()));
119 } 115 }
120 116
121 Code* Interpreter::GetBytecodeHandler(Bytecode bytecode, 117 Code* Interpreter::GetBytecodeHandler(Bytecode bytecode,
(...skipping 2738 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2856 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2861 __ SmiTag(new_state)); 2857 __ SmiTag(new_state));
2862 __ SetAccumulator(old_state); 2858 __ SetAccumulator(old_state);
2863 2859
2864 __ Dispatch(); 2860 __ Dispatch();
2865 } 2861 }
2866 2862
2867 } // namespace interpreter 2863 } // namespace interpreter
2868 } // namespace internal 2864 } // namespace internal
2869 } // namespace v8 2865 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698