OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
11 #include "src/code-stub-assembler.h" | 11 #include "src/code-stub-assembler.h" |
12 #include "src/factory.h" | 12 #include "src/factory.h" |
13 #include "src/gdb-jit.h" | 13 #include "src/gdb-jit.h" |
14 #include "src/ic/handler-compiler.h" | 14 #include "src/ic/handler-compiler.h" |
15 #include "src/ic/ic.h" | 15 #include "src/ic/ic.h" |
16 #include "src/macro-assembler.h" | 16 #include "src/macro-assembler.h" |
17 #include "src/parsing/parser.h" | 17 #include "src/parsing/parser.h" |
18 #include "src/profiler/cpu-profiler.h" | |
19 | 18 |
20 namespace v8 { | 19 namespace v8 { |
21 namespace internal { | 20 namespace internal { |
22 | 21 |
23 | 22 |
24 RUNTIME_FUNCTION(UnexpectedStubMiss) { | 23 RUNTIME_FUNCTION(UnexpectedStubMiss) { |
25 FATAL("Unexpected deopt of a stub"); | 24 FATAL("Unexpected deopt of a stub"); |
26 return Smi::FromInt(0); | 25 return Smi::FromInt(0); |
27 } | 26 } |
28 | 27 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return true; | 75 return true; |
77 } | 76 } |
78 return false; | 77 return false; |
79 } | 78 } |
80 | 79 |
81 | 80 |
82 void CodeStub::RecordCodeGeneration(Handle<Code> code) { | 81 void CodeStub::RecordCodeGeneration(Handle<Code> code) { |
83 std::ostringstream os; | 82 std::ostringstream os; |
84 os << *this; | 83 os << *this; |
85 PROFILE(isolate(), | 84 PROFILE(isolate(), |
86 CodeCreateEvent(Logger::STUB_TAG, AbstractCode::cast(*code), | 85 CodeCreateEvent(CodeEventListener::STUB_TAG, |
87 os.str().c_str())); | 86 AbstractCode::cast(*code), os.str().c_str())); |
88 Counters* counters = isolate()->counters(); | 87 Counters* counters = isolate()->counters(); |
89 counters->total_stubs_code_size()->Increment(code->instruction_size()); | 88 counters->total_stubs_code_size()->Increment(code->instruction_size()); |
90 #ifdef DEBUG | 89 #ifdef DEBUG |
91 code->VerifyEmbeddedObjects(); | 90 code->VerifyEmbeddedObjects(); |
92 #endif | 91 #endif |
93 } | 92 } |
94 | 93 |
95 | 94 |
96 Code::Kind CodeStub::GetCodeKind() const { | 95 Code::Kind CodeStub::GetCodeKind() const { |
97 return Code::STUB; | 96 return Code::STUB; |
(...skipping 4620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4718 if (type->Is(Type::UntaggedPointer())) { | 4717 if (type->Is(Type::UntaggedPointer())) { |
4719 return Representation::External(); | 4718 return Representation::External(); |
4720 } | 4719 } |
4721 | 4720 |
4722 DCHECK(!type->Is(Type::Untagged())); | 4721 DCHECK(!type->Is(Type::Untagged())); |
4723 return Representation::Tagged(); | 4722 return Representation::Tagged(); |
4724 } | 4723 } |
4725 | 4724 |
4726 } // namespace internal | 4725 } // namespace internal |
4727 } // namespace v8 | 4726 } // namespace v8 |
OLD | NEW |