| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 76c70acd300cf783be181663ea67b629bec32233..1645d6733766c6d5188232d7b81702b8e6af09b4 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -119,8 +119,8 @@ bool CompilationInfo::has_scope() const {
|
|
|
|
|
| CompilationInfo::CompilationInfo(ParseInfo* parse_info)
|
| - : CompilationInfo(parse_info, nullptr, BASE, parse_info->isolate(),
|
| - parse_info->zone()) {
|
| + : CompilationInfo(parse_info, nullptr, interpreter::Bytecode::kLast, BASE,
|
| + parse_info->isolate(), parse_info->zone()) {
|
| // Compiling for the snapshot typically results in different code than
|
| // compiling later on. This means that code recompiled with deoptimization
|
| // support won't be "equivalent" (as defined by SharedFunctionInfo::
|
| @@ -148,15 +148,22 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info)
|
|
|
|
|
| CompilationInfo::CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone)
|
| - : CompilationInfo(nullptr, stub, STUB, isolate, zone) {}
|
| + : CompilationInfo(nullptr, stub, interpreter::Bytecode::kLast, STUB,
|
| + isolate, zone) {}
|
|
|
| +CompilationInfo::CompilationInfo(interpreter::Bytecode bytecode,
|
| + Isolate* isolate, Zone* zone)
|
| + : CompilationInfo(nullptr, nullptr, bytecode, BYTECODE_HANDLER, isolate,
|
| + zone) {}
|
|
|
| CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub,
|
| - Mode mode, Isolate* isolate, Zone* zone)
|
| + interpreter::Bytecode bytecode, Mode mode,
|
| + Isolate* isolate, Zone* zone)
|
| : parse_info_(parse_info),
|
| isolate_(isolate),
|
| flags_(0),
|
| code_stub_(code_stub),
|
| + bytecode_(bytecode),
|
| mode_(mode),
|
| osr_ast_id_(BailoutId::None()),
|
| zone_(zone),
|
| @@ -216,11 +223,15 @@ int CompilationInfo::num_heap_slots() const {
|
|
|
|
|
| Code::Flags CompilationInfo::flags() const {
|
| - return code_stub() != nullptr
|
| - ? Code::ComputeFlags(
|
| - code_stub()->GetCodeKind(), code_stub()->GetICState(),
|
| - code_stub()->GetExtraICState(), code_stub()->GetStubType())
|
| - : Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
|
| + if (IsBytecodeHandler()) {
|
| + return Code::ComputeFlags(Code::STUB);
|
| + } else if (code_stub() != nullptr) {
|
| + return Code::ComputeFlags(
|
| + code_stub()->GetCodeKind(), code_stub()->GetICState(),
|
| + code_stub()->GetExtraICState(), code_stub()->GetStubType());
|
| + } else {
|
| + return Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
|
| + }
|
| }
|
|
|
|
|
|
|