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/compiler/code-stub-assembler.h" | 10 #include "src/compiler/code-stub-assembler.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 return true; | 75 return true; |
76 } | 76 } |
77 return false; | 77 return false; |
78 } | 78 } |
79 | 79 |
80 | 80 |
81 void CodeStub::RecordCodeGeneration(Handle<Code> code) { | 81 void CodeStub::RecordCodeGeneration(Handle<Code> code) { |
82 std::ostringstream os; | 82 std::ostringstream os; |
83 os << *this; | 83 os << *this; |
84 PROFILE(isolate(), | 84 PROFILE(isolate(), |
85 CodeCreateEvent(Logger::STUB_TAG, *code, os.str().c_str())); | 85 CodeCreateEvent(Logger::STUB_TAG, AbstractCode::cast(*code), |
| 86 os.str().c_str())); |
86 Counters* counters = isolate()->counters(); | 87 Counters* counters = isolate()->counters(); |
87 counters->total_stubs_code_size()->Increment(code->instruction_size()); | 88 counters->total_stubs_code_size()->Increment(code->instruction_size()); |
88 #ifdef DEBUG | 89 #ifdef DEBUG |
89 code->VerifyEmbeddedObjects(); | 90 code->VerifyEmbeddedObjects(); |
90 #endif | 91 #endif |
91 } | 92 } |
92 | 93 |
93 | 94 |
94 Code::Kind CodeStub::GetCodeKind() const { | 95 Code::Kind CodeStub::GetCodeKind() const { |
95 return Code::STUB; | 96 return Code::STUB; |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 if (type->Is(Type::UntaggedPointer())) { | 987 if (type->Is(Type::UntaggedPointer())) { |
987 return Representation::External(); | 988 return Representation::External(); |
988 } | 989 } |
989 | 990 |
990 DCHECK(!type->Is(Type::Untagged())); | 991 DCHECK(!type->Is(Type::Untagged())); |
991 return Representation::Tagged(); | 992 return Representation::Tagged(); |
992 } | 993 } |
993 | 994 |
994 } // namespace internal | 995 } // namespace internal |
995 } // namespace v8 | 996 } // namespace v8 |
OLD | NEW |