| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // Generate the new code. | 105 // Generate the new code. |
| 106 MacroAssembler masm(isolate(), NULL, 256); | 106 MacroAssembler masm(isolate(), NULL, 256); |
| 107 | 107 |
| 108 { | 108 { |
| 109 // Update the static counter each time a new code stub is generated. | 109 // Update the static counter each time a new code stub is generated. |
| 110 isolate()->counters()->code_stubs()->Increment(); | 110 isolate()->counters()->code_stubs()->Increment(); |
| 111 | 111 |
| 112 // Generate the code for the stub. | 112 // Generate the code for the stub. |
| 113 masm.set_generating_stub(true); | 113 masm.set_generating_stub(true); |
| 114 // TODO(yangguo): remove this once we can serialize IC stubs. |
| 115 masm.enable_serializer(); |
| 114 NoCurrentFrameScope scope(&masm); | 116 NoCurrentFrameScope scope(&masm); |
| 115 Generate(&masm); | 117 Generate(&masm); |
| 116 } | 118 } |
| 117 | 119 |
| 118 // Create the code object. | 120 // Create the code object. |
| 119 CodeDesc desc; | 121 CodeDesc desc; |
| 120 masm.GetCode(&desc); | 122 masm.GetCode(&desc); |
| 121 | 123 |
| 122 // Copy the generated code into a heap object. | 124 // Copy the generated code into a heap object. |
| 123 Code::Flags flags = Code::ComputeFlags( | 125 Code::Flags flags = Code::ComputeFlags( |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 } | 962 } |
| 961 | 963 |
| 962 | 964 |
| 963 InternalArrayConstructorStub::InternalArrayConstructorStub( | 965 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 964 Isolate* isolate) : PlatformCodeStub(isolate) { | 966 Isolate* isolate) : PlatformCodeStub(isolate) { |
| 965 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 967 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 966 } | 968 } |
| 967 | 969 |
| 968 | 970 |
| 969 } } // namespace v8::internal | 971 } } // namespace v8::internal |
| OLD | NEW |