| 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 if (type->Is(Type::UntaggedPointer())) { | 908 if (type->Is(Type::UntaggedPointer())) { |
| 908 return Representation::External(); | 909 return Representation::External(); |
| 909 } | 910 } |
| 910 | 911 |
| 911 DCHECK(!type->Is(Type::Untagged())); | 912 DCHECK(!type->Is(Type::Untagged())); |
| 912 return Representation::Tagged(); | 913 return Representation::Tagged(); |
| 913 } | 914 } |
| 914 | 915 |
| 915 } // namespace internal | 916 } // namespace internal |
| 916 } // namespace v8 | 917 } // namespace v8 |
| OLD | NEW |