| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 int index = stubs->FindEntry(GetKey()); | 68 int index = stubs->FindEntry(GetKey()); |
| 69 if (index != UnseededNumberDictionary::kNotFound) { | 69 if (index != UnseededNumberDictionary::kNotFound) { |
| 70 *code_out = Code::cast(stubs->ValueAt(index)); | 70 *code_out = Code::cast(stubs->ValueAt(index)); |
| 71 return true; | 71 return true; |
| 72 } | 72 } |
| 73 return false; | 73 return false; |
| 74 } | 74 } |
| 75 | 75 |
| 76 | 76 |
| 77 void CodeStub::RecordCodeGeneration(Handle<Code> code) { | 77 void CodeStub::RecordCodeGeneration(Handle<Code> code) { |
| 78 IC::RegisterWeakMapDependency(code); | |
| 79 std::ostringstream os; | 78 std::ostringstream os; |
| 80 os << *this; | 79 os << *this; |
| 81 PROFILE(isolate(), | 80 PROFILE(isolate(), |
| 82 CodeCreateEvent(Logger::STUB_TAG, *code, os.str().c_str())); | 81 CodeCreateEvent(Logger::STUB_TAG, *code, os.str().c_str())); |
| 83 Counters* counters = isolate()->counters(); | 82 Counters* counters = isolate()->counters(); |
| 84 counters->total_stubs_code_size()->Increment(code->instruction_size()); | 83 counters->total_stubs_code_size()->Increment(code->instruction_size()); |
| 85 } | 84 } |
| 86 | 85 |
| 87 | 86 |
| 88 Code::Kind CodeStub::GetCodeKind() const { | 87 Code::Kind CodeStub::GetCodeKind() const { |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 } | 965 } |
| 967 | 966 |
| 968 | 967 |
| 969 InternalArrayConstructorStub::InternalArrayConstructorStub( | 968 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 970 Isolate* isolate) : PlatformCodeStub(isolate) { | 969 Isolate* isolate) : PlatformCodeStub(isolate) { |
| 971 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 970 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 972 } | 971 } |
| 973 | 972 |
| 974 | 973 |
| 975 } } // namespace v8::internal | 974 } } // namespace v8::internal |
| OLD | NEW |