| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ic/handler-compiler.h" | 5 #include "src/ic/handler-compiler.h" |
| 6 | 6 |
| 7 #include "src/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
| 8 #include "src/field-type.h" | 8 #include "src/field-type.h" |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-configuration-inl.h" | 10 #include "src/ic/handler-configuration-inl.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 if (code == nullptr) return Handle<Code>(); | 23 if (code == nullptr) return Handle<Code>(); |
| 24 return handle(code); | 24 return handle(code); |
| 25 } | 25 } |
| 26 | 26 |
| 27 Handle<Code> PropertyHandlerCompiler::GetCode(Code::Kind kind, | 27 Handle<Code> PropertyHandlerCompiler::GetCode(Code::Kind kind, |
| 28 Handle<Name> name) { | 28 Handle<Name> name) { |
| 29 Code::Flags flags = Code::ComputeHandlerFlags(kind); | 29 Code::Flags flags = Code::ComputeHandlerFlags(kind); |
| 30 | 30 |
| 31 // Create code object in the heap. | 31 // Create code object in the heap. |
| 32 CodeDesc desc; | 32 CodeDesc desc; |
| 33 masm()->GetCode(&desc); | 33 masm()->GetCode(isolate(), &desc); |
| 34 Handle<Code> code = factory()->NewCode(desc, flags, masm()->CodeObject()); | 34 Handle<Code> code = factory()->NewCode(desc, flags, masm()->CodeObject()); |
| 35 if (code->IsCodeStubOrIC()) code->set_stub_key(CodeStub::NoCacheKey()); | 35 if (code->IsCodeStubOrIC()) code->set_stub_key(CodeStub::NoCacheKey()); |
| 36 #ifdef ENABLE_DISASSEMBLER | 36 #ifdef ENABLE_DISASSEMBLER |
| 37 if (FLAG_print_code_stubs) { | 37 if (FLAG_print_code_stubs) { |
| 38 char* raw_name = !name.is_null() && name->IsString() | 38 char* raw_name = !name.is_null() && name->IsString() |
| 39 ? String::cast(*name)->ToCString().get() | 39 ? String::cast(*name)->ToCString().get() |
| 40 : nullptr; | 40 : nullptr; |
| 41 CodeTracer::Scope trace_scope(isolate()->GetCodeTracer()); | 41 CodeTracer::Scope trace_scope(isolate()->GetCodeTracer()); |
| 42 OFStream os(trace_scope.file()); | 42 OFStream os(trace_scope.file()); |
| 43 code->Disassemble(raw_name, os); | 43 code->Disassemble(raw_name, os); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 receiver(), scratch2(), true, value(), holder, | 147 receiver(), scratch2(), true, value(), holder, |
| 148 accessor_index); | 148 accessor_index); |
| 149 return GetCode(kind(), name); | 149 return GetCode(kind(), name); |
| 150 } | 150 } |
| 151 | 151 |
| 152 | 152 |
| 153 #undef __ | 153 #undef __ |
| 154 | 154 |
| 155 } // namespace internal | 155 } // namespace internal |
| 156 } // namespace v8 | 156 } // namespace v8 |
| OLD | NEW |