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/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 } | 74 } |
75 | 75 |
76 | 76 |
77 void CodeStub::RecordCodeGeneration(Handle<Code> code) { | 77 void CodeStub::RecordCodeGeneration(Handle<Code> code) { |
78 std::ostringstream os; | 78 std::ostringstream os; |
79 os << *this; | 79 os << *this; |
80 PROFILE(isolate(), | 80 PROFILE(isolate(), |
81 CodeCreateEvent(Logger::STUB_TAG, *code, os.str().c_str())); | 81 CodeCreateEvent(Logger::STUB_TAG, *code, os.str().c_str())); |
82 Counters* counters = isolate()->counters(); | 82 Counters* counters = isolate()->counters(); |
83 counters->total_stubs_code_size()->Increment(code->instruction_size()); | 83 counters->total_stubs_code_size()->Increment(code->instruction_size()); |
| 84 #ifdef DEBUG |
| 85 code->VerifyEmbeddedObjects(); |
| 86 #endif |
84 } | 87 } |
85 | 88 |
86 | 89 |
87 Code::Kind CodeStub::GetCodeKind() const { | 90 Code::Kind CodeStub::GetCodeKind() const { |
88 return Code::STUB; | 91 return Code::STUB; |
89 } | 92 } |
90 | 93 |
91 | 94 |
92 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) { | 95 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) { |
93 Handle<Code> ic = GetCode(); | 96 Handle<Code> ic = GetCode(); |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 } | 968 } |
966 | 969 |
967 | 970 |
968 InternalArrayConstructorStub::InternalArrayConstructorStub( | 971 InternalArrayConstructorStub::InternalArrayConstructorStub( |
969 Isolate* isolate) : PlatformCodeStub(isolate) { | 972 Isolate* isolate) : PlatformCodeStub(isolate) { |
970 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 973 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
971 } | 974 } |
972 | 975 |
973 | 976 |
974 } } // namespace v8::internal | 977 } } // namespace v8::internal |
OLD | NEW |