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

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

Issue 2575473002: [interpreter][stubs] Enable graph verification for bytecode handlers and stubs included into snapsh… (Closed)
Patch Set: Addressing comments 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
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/compiler/code-assembler-tester.h » ('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/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 Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); 107 // TODO(ishell): enable verification once all issues are fixed.
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);
108 size_t index = GetDispatchTableIndex(bytecode, operand_scale); 112 size_t index = GetDispatchTableIndex(bytecode, operand_scale);
109 dispatch_table_[index] = code->entry(); 113 dispatch_table_[index] = code->entry();
110 TraceCodegen(code); 114 TraceCodegen(code);
111 PROFILE(isolate_, CodeCreateEvent( 115 PROFILE(isolate_, CodeCreateEvent(
112 CodeEventListener::BYTECODE_HANDLER_TAG, 116 CodeEventListener::BYTECODE_HANDLER_TAG,
113 AbstractCode::cast(*code), 117 AbstractCode::cast(*code),
114 Bytecodes::ToString(bytecode, operand_scale).c_str())); 118 Bytecodes::ToString(bytecode, operand_scale).c_str()));
115 } 119 }
116 120
117 Code* Interpreter::GetBytecodeHandler(Bytecode bytecode, 121 Code* Interpreter::GetBytecodeHandler(Bytecode bytecode,
(...skipping 2738 matching lines...) Expand 10 before | Expand all | Expand 10 after
2856 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2860 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2857 __ SmiTag(new_state)); 2861 __ SmiTag(new_state));
2858 __ SetAccumulator(old_state); 2862 __ SetAccumulator(old_state);
2859 2863
2860 __ Dispatch(); 2864 __ Dispatch();
2861 } 2865 }
2862 2866
2863 } // namespace interpreter 2867 } // namespace interpreter
2864 } // namespace internal 2868 } // namespace internal
2865 } // namespace v8 2869 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/compiler/code-assembler-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698