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

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

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break. Created 5 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/arm64/lithium-codegen-arm64.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 "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 #include "src/hydrogen.h" 9 #include "src/hydrogen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 template <> 435 template <>
436 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { 436 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() {
437 Factory* factory = isolate()->factory(); 437 Factory* factory = isolate()->factory();
438 HValue* undefined = graph()->GetConstantUndefined(); 438 HValue* undefined = graph()->GetConstantUndefined();
439 AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode(); 439 AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode();
440 440
441 // This stub is very performance sensitive, the generated code must be tuned 441 // This stub is very performance sensitive, the generated code must be tuned
442 // so that it doesn't build and eager frame. 442 // so that it doesn't build and eager frame.
443 info()->MarkMustNotHaveEagerFrame(); 443 info()->MarkMustNotHaveEagerFrame();
444 444
445 HInstruction* allocation_site = 445 HInstruction* allocation_site = Add<HLoadKeyed>(
446 Add<HLoadKeyed>(GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS); 446 GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS,
447 NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag);
447 IfBuilder checker(this); 448 IfBuilder checker(this);
448 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, 449 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site,
449 undefined); 450 undefined);
450 checker.Then(); 451 checker.Then();
451 452
452 HObjectAccess access = HObjectAccess::ForAllocationSiteOffset( 453 HObjectAccess access = HObjectAccess::ForAllocationSiteOffset(
453 AllocationSite::kTransitionInfoOffset); 454 AllocationSite::kTransitionInfoOffset);
454 HInstruction* boilerplate = 455 HInstruction* boilerplate =
455 Add<HLoadNamedField>(allocation_site, nullptr, access); 456 Add<HLoadNamedField>(allocation_site, nullptr, access);
456 HValue* elements = AddLoadElements(boilerplate); 457 HValue* elements = AddLoadElements(boilerplate);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 498
498 Handle<Code> FastCloneShallowArrayStub::GenerateCode() { 499 Handle<Code> FastCloneShallowArrayStub::GenerateCode() {
499 return DoGenerateCode(this); 500 return DoGenerateCode(this);
500 } 501 }
501 502
502 503
503 template <> 504 template <>
504 HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { 505 HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() {
505 HValue* undefined = graph()->GetConstantUndefined(); 506 HValue* undefined = graph()->GetConstantUndefined();
506 507
507 HInstruction* allocation_site = 508 HInstruction* allocation_site = Add<HLoadKeyed>(
508 Add<HLoadKeyed>(GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS); 509 GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS,
510 NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag);
509 511
510 IfBuilder checker(this); 512 IfBuilder checker(this);
511 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, 513 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site,
512 undefined); 514 undefined);
513 checker.And(); 515 checker.And();
514 516
515 HObjectAccess access = HObjectAccess::ForAllocationSiteOffset( 517 HObjectAccess access = HObjectAccess::ForAllocationSiteOffset(
516 AllocationSite::kTransitionInfoOffset); 518 AllocationSite::kTransitionInfoOffset);
517 HInstruction* boilerplate = 519 HInstruction* boilerplate =
518 Add<HLoadNamedField>(allocation_site, nullptr, access); 520 Add<HLoadNamedField>(allocation_site, nullptr, access);
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 return Pop(); 2352 return Pop();
2351 } 2353 }
2352 2354
2353 2355
2354 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2356 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2355 return DoGenerateCode(this); 2357 return DoGenerateCode(this);
2356 } 2358 }
2357 2359
2358 } // namespace internal 2360 } // namespace internal
2359 } // namespace v8 2361 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698