aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/torque/csa-generator.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-08-16 11:32:46 +0200
committerMichaël Zasso <targos@protonmail.com>2019-08-19 09:25:23 +0200
commite31f0a7d25668d3c1531294d2ef44a9f3bde4ef4 (patch)
tree6c6bed9804be9df6162b2483f0a56f371f66464d /deps/v8/src/torque/csa-generator.cc
parentec16fdae540adaf710b1a86c620170b2880088f0 (diff)
downloadandroid-node-v8-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.tar.gz
android-node-v8-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.tar.bz2
android-node-v8-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.zip
deps: update V8 to 7.7.299.4
PR-URL: https://github.com/nodejs/node/pull/28918 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/src/torque/csa-generator.cc')
-rw-r--r--deps/v8/src/torque/csa-generator.cc31
1 files changed, 10 insertions, 21 deletions
diff --git a/deps/v8/src/torque/csa-generator.cc b/deps/v8/src/torque/csa-generator.cc
index a29f832e7d..6a798a2707 100644
--- a/deps/v8/src/torque/csa-generator.cc
+++ b/deps/v8/src/torque/csa-generator.cc
@@ -56,14 +56,10 @@ Stack<std::string> CSAGenerator::EmitBlock(const Block* block) {
}
void CSAGenerator::EmitSourcePosition(SourcePosition pos, bool always_emit) {
- std::string file = SourceFileMap::GetSource(pos.source);
+ const std::string& file = SourceFileMap::AbsolutePath(pos.source);
if (always_emit || !previous_position_.CompareStartIgnoreColumn(pos)) {
// Lines in Torque SourcePositions are zero-based, while the
// CodeStubAssembler and downwind systems are one-based.
- for (auto& c : file) {
- if (c == '\\')
- c = '/';
- }
out_ << " ca_.SetSourcePosition(\"" << file << "\", "
<< (pos.start.line + 1) << ");\n";
previous_position_ = pos;
@@ -260,9 +256,8 @@ void CSAGenerator::EmitInstruction(const CallIntrinsicInstruction& instruction,
} else if (instruction.intrinsic->ExternalName() == "%Allocate") {
out_ << "ca_.UncheckedCast<" << return_type->GetGeneratedTNodeTypeName()
<< ">(CodeStubAssembler(state_).Allocate";
- } else if (instruction.intrinsic->ExternalName() ==
- "%AllocateInternalClass") {
- out_ << "CodeStubAssembler(state_).AllocateUninitializedFixedArray";
+ } else if (instruction.intrinsic->ExternalName() == "%GetStructMap") {
+ out_ << "CodeStubAssembler(state_).GetStructMap";
} else {
ReportError("no built in intrinsic with name " +
instruction.intrinsic->ExternalName());
@@ -318,8 +313,7 @@ void CSAGenerator::EmitInstruction(const CallCsaMacroInstruction& instruction,
out_ << ") = ";
} else {
if (results.size() == 1) {
- out_ << results[0] << " = ca_.UncheckedCast<"
- << return_type->GetGeneratedTNodeTypeName() << ">(";
+ out_ << results[0] << " = ";
} else {
DCHECK_EQ(0, results.size());
}
@@ -334,7 +328,6 @@ void CSAGenerator::EmitInstruction(const CallCsaMacroInstruction& instruction,
if (needs_flattening) {
out_ << ").Flatten();\n";
} else {
- if (results.size() == 1) out_ << ")";
out_ << ");\n";
}
PostCallableExceptionPreparation(catch_name, return_type,
@@ -528,9 +521,9 @@ std::string CSAGenerator::PreCallableExceptionPreparation(
if (catch_block) {
catch_name = FreshCatchName();
out_ << " compiler::CodeAssemblerExceptionHandlerLabel " << catch_name
- << "_label(&ca_, compiler::CodeAssemblerLabel::kDeferred);\n";
+ << "__label(&ca_, compiler::CodeAssemblerLabel::kDeferred);\n";
out_ << " { compiler::CodeAssemblerScopedExceptionHandler s(&ca_, &"
- << catch_name << "_label);\n";
+ << catch_name << "__label);\n";
}
return catch_name;
}
@@ -541,7 +534,7 @@ void CSAGenerator::PostCallableExceptionPreparation(
if (catch_block) {
std::string block_name = BlockName(*catch_block);
out_ << " }\n";
- out_ << " if (" << catch_name << "_label.is_used()) {\n";
+ out_ << " if (" << catch_name << "__label.is_used()) {\n";
out_ << " compiler::CodeAssemblerLabel " << catch_name
<< "_skip(&ca_);\n";
if (!return_type->IsNever()) {
@@ -549,7 +542,7 @@ void CSAGenerator::PostCallableExceptionPreparation(
}
out_ << " compiler::TNode<Object> " << catch_name
<< "_exception_object;\n";
- out_ << " ca_.Bind(&" << catch_name << "_label, &" << catch_name
+ out_ << " ca_.Bind(&" << catch_name << "__label, &" << catch_name
<< "_exception_object);\n";
out_ << " ca_.Goto(&" << block_name;
for (size_t i = 0; i < stack->Size(); ++i) {
@@ -695,8 +688,8 @@ void CSAGenerator::EmitInstruction(const AbortInstruction& instruction,
out_ << " CodeStubAssembler(state_).DebugBreak();\n";
break;
case AbortInstruction::Kind::kAssertionFailure: {
- std::string file =
- StringLiteralQuote(SourceFileMap::GetSource(instruction.pos.source));
+ std::string file = StringLiteralQuote(
+ SourceFileMap::PathFromV8Root(instruction.pos.source));
out_ << " CodeStubAssembler(state_).FailAssert("
<< StringLiteralQuote(instruction.message) << ", " << file << ", "
<< instruction.pos.start.line + 1 << ");\n";
@@ -723,12 +716,8 @@ void CSAGenerator::EmitInstruction(
out_ << " compiler::TNode<IntPtrT> " << offset_name
<< " = ca_.IntPtrConstant(";
- if (instruction.class_type->IsExtern()) {
out_ << field.aggregate->GetGeneratedTNodeTypeName() << "::k"
<< CamelifyString(field.name_and_type.name) << "Offset";
- } else {
- out_ << "FixedArray::kHeaderSize + " << field.offset;
- }
out_ << ");\n"
<< " USE(" << stack->Top() << ");\n";
}