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

Unified Diff: src/code-stub-assembler.cc

Issue 2645743002: [builtins] Port parameter and argument-related code stubs to CSA (Closed)
Patch Set: Review feedback Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/code-stubs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index bd0088a840b83d2eed5a786bb35a09ed00f38e59..6375a085d65a46d8c821fcc17d4d364c67a70401 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -1201,6 +1201,25 @@ Node* CodeStubAssembler::LoadMapConstructor(Node* map) {
return result.value();
}
+Node* CodeStubAssembler::LoadSharedFunctionInfoSpecialField(
+ Node* shared, int offset, ParameterMode mode) {
+ if (Is64()) {
+ Node* result = LoadObjectField(shared, offset, MachineType::Int32());
+ if (mode == SMI_PARAMETERS) {
+ result = SmiTag(result);
+ } else {
+ result = ChangeUint32ToWord(result);
+ }
+ return result;
+ } else {
+ Node* result = LoadObjectField(shared, offset);
+ if (mode != SMI_PARAMETERS) {
+ result = SmiUntag(result);
+ }
+ return result;
+ }
+}
+
Node* CodeStubAssembler::LoadNameHashField(Node* name) {
CSA_ASSERT(this, IsName(name));
return LoadObjectField(name, Name::kHashFieldOffset, MachineType::Uint32());
@@ -6289,6 +6308,16 @@ void CodeStubAssembler::BuildFastFixedArrayForEach(
: IndexAdvanceMode::kPost);
}
+void CodeStubAssembler::GotoIfFixedArraySizeDoesntFitInNewSpace(
+ Node* element_count, Label* doesnt_fit, int base_size, ParameterMode mode) {
+ int max_newspace_parameters =
+ (kMaxRegularHeapObjectSize - base_size) / kPointerSize;
+ GotoIf(IntPtrOrSmiGreaterThan(
+ element_count, IntPtrOrSmiConstant(max_newspace_parameters, mode),
+ mode),
+ doesnt_fit);
+}
+
void CodeStubAssembler::InitializeFieldsWithRoot(
Node* object, Node* start_offset, Node* end_offset,
Heap::RootListIndex root_index) {
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698