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

Side by Side Diff: src/builtins/builtins-internal.cc

Issue 2573573004: [stubs] Enable graph verification for builtins. (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-stub-assembler.h" 7 #include "src/code-stub-assembler.h"
8 #include "src/interface-descriptors.h" 8 #include "src/interface-descriptors.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 typedef compiler::Node Node; 60 typedef compiler::Node Node;
61 typedef CopyFastSmiOrObjectElementsDescriptor Descriptor; 61 typedef CopyFastSmiOrObjectElementsDescriptor Descriptor;
62 CodeStubAssembler assembler(state); 62 CodeStubAssembler assembler(state);
63 63
64 Node* object = assembler.Parameter(Descriptor::kObject); 64 Node* object = assembler.Parameter(Descriptor::kObject);
65 65
66 // Load the {object}s elements. 66 // Load the {object}s elements.
67 Node* source = assembler.LoadObjectField(object, JSObject::kElementsOffset); 67 Node* source = assembler.LoadObjectField(object, JSObject::kElementsOffset);
68 68
69 CodeStubAssembler::ParameterMode mode = assembler.OptimalParameterMode(); 69 CodeStubAssembler::ParameterMode mode = assembler.OptimalParameterMode();
70 Node* length = assembler.UntagParameter( 70 Node* length = assembler.TaggedToParameter(
71 assembler.LoadFixedArrayBaseLength(source), mode); 71 assembler.LoadFixedArrayBaseLength(source), mode);
72 72
73 // Check if we can allocate in new space. 73 // Check if we can allocate in new space.
74 ElementsKind kind = FAST_ELEMENTS; 74 ElementsKind kind = FAST_ELEMENTS;
75 int max_elements = FixedArrayBase::GetMaxLengthForNewSpaceAllocation(kind); 75 int max_elements = FixedArrayBase::GetMaxLengthForNewSpaceAllocation(kind);
76 Label if_newspace(&assembler), if_oldspace(&assembler); 76 Label if_newspace(&assembler), if_oldspace(&assembler);
77 assembler.Branch( 77 assembler.Branch(
78 assembler.UintPtrOrSmiLessThan( 78 assembler.UintPtrOrSmiLessThan(
79 length, assembler.IntPtrOrSmiConstant(max_elements, mode), mode), 79 length, assembler.IntPtrOrSmiConstant(max_elements, mode), mode),
80 &if_newspace, &if_oldspace); 80 &if_newspace, &if_oldspace);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // Allocate the actual FixedArray for the elements. 306 // Allocate the actual FixedArray for the elements.
307 Generate_NewArgumentsElements(&assembler, frame, length); 307 Generate_NewArgumentsElements(&assembler, frame, length);
308 308
309 // No rest parameters, return an empty FixedArray. 309 // No rest parameters, return an empty FixedArray.
310 assembler.Bind(&if_empty); 310 assembler.Bind(&if_empty);
311 assembler.Return(assembler.EmptyFixedArrayConstant()); 311 assembler.Return(assembler.EmptyFixedArrayConstant());
312 } 312 }
313 313
314 } // namespace internal 314 } // namespace internal
315 } // namespace v8 315 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698