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

Unified Diff: src/compiler/instruction.cc

Issue 1926023002: [turbofan] Run everything after representation selection concurrently. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some dead code. Created 4 years, 8 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/compiler/instruction.h ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 994ade6a3f7e90879e4192fe9f8859d4012e994d..818d9cc98f19c3b97ee46053711e858fd041f963 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -513,6 +513,16 @@ Constant::Constant(RelocatablePtrConstantInfo info)
}
#endif
+Handle<HeapObject> Constant::ToHeapObject() const {
+ DCHECK_EQ(kHeapObject, type());
+ Handle<HeapObject> value(
+ bit_cast<HeapObject**>(static_cast<intptr_t>(value_)));
+ if (value->IsConsString()) {
+ value = String::Flatten(Handle<String>::cast(value), TENURED);
+ }
+ return value;
+}
+
std::ostream& operator<<(std::ostream& os, const Constant& constant) {
switch (constant.type()) {
case Constant::kInt32:
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698