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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 332673002: Introduce intrinsic to expose debug state to generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/runtime.h ('k') | test/mjsunit/debug-is-active.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 8de422608bd7bb8334351614a253b8fdd7662f7a..22c68edc1b0d1fc179bf55d5ec3f73f846ac737c 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -4022,6 +4022,17 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
}
+void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
+ ASSERT(expr->arguments()->length() == 0);
+ ExternalReference debug_is_active =
+ ExternalReference::debug_is_active_address(isolate());
+ __ Move(kScratchRegister, debug_is_active);
+ __ movzxbp(rax, Operand(kScratchRegister, 0));
+ __ Integer32ToSmi(rax, rax);
+ context()->Plug(rax);
+}
+
+
void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
if (expr->function() != NULL &&
expr->function()->intrinsic_type == Runtime::INLINE) {
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/debug-is-active.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698