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

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

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 years, 2 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/code-stubs.cc ('k') | src/compiler.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 <memory> 7 #include <memory>
8 8
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // Copy the generated code into a heap object. 243 // Copy the generated code into a heap object.
244 Handle<Code> new_object = factory->NewCode( 244 Handle<Code> new_object = factory->NewCode(
245 desc, GetCodeFlags(), masm.CodeObject(), NeedsImmovableCode()); 245 desc, GetCodeFlags(), masm.CodeObject(), NeedsImmovableCode());
246 return new_object; 246 return new_object;
247 } 247 }
248 248
249 Handle<Code> HydrogenCodeStub::GenerateRuntimeTailCall( 249 Handle<Code> HydrogenCodeStub::GenerateRuntimeTailCall(
250 CodeStubDescriptor* descriptor) { 250 CodeStubDescriptor* descriptor) {
251 const char* name = CodeStub::MajorName(MajorKey()); 251 const char* name = CodeStub::MajorName(MajorKey());
252 Zone zone(isolate()->allocator()); 252 Zone zone(isolate()->allocator(), ZONE_NAME);
253 CallInterfaceDescriptor interface_descriptor(GetCallInterfaceDescriptor()); 253 CallInterfaceDescriptor interface_descriptor(GetCallInterfaceDescriptor());
254 CodeStubAssembler assembler(isolate(), &zone, interface_descriptor, 254 CodeStubAssembler assembler(isolate(), &zone, interface_descriptor,
255 GetCodeFlags(), name); 255 GetCodeFlags(), name);
256 int total_params = interface_descriptor.GetStackParameterCount() + 256 int total_params = interface_descriptor.GetStackParameterCount() +
257 interface_descriptor.GetRegisterParameterCount(); 257 interface_descriptor.GetRegisterParameterCount();
258 switch (total_params) { 258 switch (total_params) {
259 case 0: 259 case 0:
260 assembler.TailCallRuntime(descriptor->miss_handler_id(), 260 assembler.TailCallRuntime(descriptor->miss_handler_id(),
261 assembler.Parameter(0)); 261 assembler.Parameter(0));
262 break; 262 break;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // the runtime that is significantly faster than using the standard 300 // the runtime that is significantly faster than using the standard
301 // stub-failure deopt mechanism. 301 // stub-failure deopt mechanism.
302 if (stub->IsUninitialized() && descriptor.has_miss_handler()) { 302 if (stub->IsUninitialized() && descriptor.has_miss_handler()) {
303 DCHECK(!descriptor.stack_parameter_count().is_valid()); 303 DCHECK(!descriptor.stack_parameter_count().is_valid());
304 return stub->GenerateLightweightMissCode(descriptor.miss_handler()); 304 return stub->GenerateLightweightMissCode(descriptor.miss_handler());
305 } 305 }
306 base::ElapsedTimer timer; 306 base::ElapsedTimer timer;
307 if (FLAG_profile_hydrogen_code_stub_compilation) { 307 if (FLAG_profile_hydrogen_code_stub_compilation) {
308 timer.Start(); 308 timer.Start();
309 } 309 }
310 Zone zone(isolate->allocator()); 310 Zone zone(isolate->allocator(), ZONE_NAME);
311 CompilationInfo info(CStrVector(CodeStub::MajorName(stub->MajorKey())), 311 CompilationInfo info(CStrVector(CodeStub::MajorName(stub->MajorKey())),
312 isolate, &zone, stub->GetCodeFlags()); 312 isolate, &zone, stub->GetCodeFlags());
313 // Parameter count is number of stack parameters. 313 // Parameter count is number of stack parameters.
314 int parameter_count = descriptor.GetStackParameterCount(); 314 int parameter_count = descriptor.GetStackParameterCount();
315 if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) { 315 if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) {
316 parameter_count--; 316 parameter_count--;
317 } 317 }
318 info.set_parameter_count(parameter_count); 318 info.set_parameter_count(parameter_count);
319 CodeStubGraphBuilder<Stub> builder(&info, stub); 319 CodeStubGraphBuilder<Stub> builder(&info, stub);
320 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); 320 LChunk* chunk = OptimizeGraph(builder.CreateGraph());
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 return BuildRegExpConstructResult(length, index, input); 1199 return BuildRegExpConstructResult(length, index, input);
1200 } 1200 }
1201 1201
1202 1202
1203 Handle<Code> RegExpConstructResultStub::GenerateCode() { 1203 Handle<Code> RegExpConstructResultStub::GenerateCode() {
1204 return DoGenerateCode(this); 1204 return DoGenerateCode(this);
1205 } 1205 }
1206 1206
1207 } // namespace internal 1207 } // namespace internal
1208 } // namespace v8 1208 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698