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/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/assembler-inl.h" | 10 #include "src/assembler-inl.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Generate the code for the stub. | 137 // Generate the code for the stub. |
138 masm.set_generating_stub(true); | 138 masm.set_generating_stub(true); |
139 // TODO(yangguo): remove this once we can serialize IC stubs. | 139 // TODO(yangguo): remove this once we can serialize IC stubs. |
140 masm.enable_serializer(); | 140 masm.enable_serializer(); |
141 NoCurrentFrameScope scope(&masm); | 141 NoCurrentFrameScope scope(&masm); |
142 Generate(&masm); | 142 Generate(&masm); |
143 } | 143 } |
144 | 144 |
145 // Create the code object. | 145 // Create the code object. |
146 CodeDesc desc; | 146 CodeDesc desc; |
147 masm.GetCode(&desc); | 147 masm.GetCode(isolate(), &desc); |
148 // Copy the generated code into a heap object. | 148 // Copy the generated code into a heap object. |
149 Code::Flags flags = Code::ComputeFlags(GetCodeKind(), GetExtraICState()); | 149 Code::Flags flags = Code::ComputeFlags(GetCodeKind(), GetExtraICState()); |
150 Handle<Code> new_object = factory->NewCode( | 150 Handle<Code> new_object = factory->NewCode( |
151 desc, flags, masm.CodeObject(), NeedsImmovableCode()); | 151 desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
152 return new_object; | 152 return new_object; |
153 } | 153 } |
154 | 154 |
155 | 155 |
156 Handle<Code> CodeStub::GetCode() { | 156 Handle<Code> CodeStub::GetCode() { |
157 Heap* heap = isolate()->heap(); | 157 Heap* heap = isolate()->heap(); |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 } | 1159 } |
1160 | 1160 |
1161 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 1161 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |
1162 : PlatformCodeStub(isolate) {} | 1162 : PlatformCodeStub(isolate) {} |
1163 | 1163 |
1164 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) | 1164 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) |
1165 : PlatformCodeStub(isolate) {} | 1165 : PlatformCodeStub(isolate) {} |
1166 | 1166 |
1167 } // namespace internal | 1167 } // namespace internal |
1168 } // namespace v8 | 1168 } // namespace v8 |
OLD | NEW |