Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: src/code-stubs.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/setup-builtins-internal.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/builtins/setup-builtins-internal.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698