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

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

Issue 2394193002: [stubs] Fix some CodeStubAssembler macros and adds a bitcast in the ToObjectStub. (Closed)
Patch Set: Update. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/code-assembler.cc » ('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 9d38079b645da2182713cd9a4dce95b2d9fc5dd9..72b27899358e23c36b4f213f8cb7ab1a6e1e39bb 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -38,7 +38,7 @@ void CodeStubAssembler::Assert(Node* condition) {
#endif
}
-Node* CodeStubAssembler::NoContextConstant() { return SmiConstant(Smi::kZero); }
+Node* CodeStubAssembler::NoContextConstant() { return NumberConstant(0); }
#define HEAP_CONSTANT_ACCESSOR(rootName, name) \
Node* CodeStubAssembler::name##Constant() { \
@@ -611,19 +611,17 @@ Node* CodeStubAssembler::AllocateRawUnaligned(Node* size_in_bytes,
&no_runtime_call);
Bind(&runtime_call);
- // AllocateInTargetSpace does not use the context.
- Node* context = SmiConstant(Smi::kZero);
-
Node* runtime_result;
if (flags & kPretenured) {
Node* runtime_flags = SmiConstant(
Smi::FromInt(AllocateDoubleAlignFlag::encode(false) |
AllocateTargetSpace::encode(AllocationSpace::OLD_SPACE)));
- runtime_result = CallRuntime(Runtime::kAllocateInTargetSpace, context,
- SmiTag(size_in_bytes), runtime_flags);
+ runtime_result =
+ CallRuntime(Runtime::kAllocateInTargetSpace, NoContextConstant(),
+ SmiTag(size_in_bytes), runtime_flags);
} else {
- runtime_result = CallRuntime(Runtime::kAllocateInNewSpace, context,
- SmiTag(size_in_bytes));
+ runtime_result = CallRuntime(Runtime::kAllocateInNewSpace,
+ NoContextConstant(), SmiTag(size_in_bytes));
}
result.Bind(runtime_result);
Goto(&merge_runtime);
« no previous file with comments | « no previous file | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698