V8 Project
v8::internal::Analysis Class Reference

#include <jsregexp.h>

+ Inheritance diagram for v8::internal::Analysis:
+ Collaboration diagram for v8::internal::Analysis:

Public Member Functions

 Analysis (bool ignore_case, bool is_one_byte)
 
void EnsureAnalyzed (RegExpNode *node)
 
virtual void VisitLoopChoice (LoopChoiceNode *that)
 
bool has_failed ()
 
const char * error_message ()
 
void fail (const char *error_message)
 
- Public Member Functions inherited from v8::internal::NodeVisitor
virtual ~NodeVisitor ()
 

Private Member Functions

 DISALLOW_IMPLICIT_CONSTRUCTORS (Analysis)
 

Private Attributes

bool ignore_case_
 
bool is_one_byte_
 
const char * error_message_
 

Detailed Description

Definition at line 1599 of file jsregexp.h.

Constructor & Destructor Documentation

◆ Analysis()

v8::internal::Analysis::Analysis ( bool  ignore_case,
bool  is_one_byte 
)
inline

Definition at line 1601 of file jsregexp.h.

1602  : ignore_case_(ignore_case),
1603  is_one_byte_(is_one_byte),
1604  error_message_(NULL) {}
const char * error_message_
Definition: jsregexp.h:1625
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

Member Function Documentation

◆ DISALLOW_IMPLICIT_CONSTRUCTORS()

v8::internal::Analysis::DISALLOW_IMPLICIT_CONSTRUCTORS ( Analysis  )
private

◆ EnsureAnalyzed()

void v8::internal::Analysis::EnsureAnalyzed ( RegExpNode node)

Definition at line 5724 of file jsregexp.cc.

5724  {
5725  StackLimitCheck check(that->zone()->isolate());
5726  if (check.HasOverflowed()) {
5727  fail("Stack overflow");
5728  return;
5729  }
5730  if (that->info()->been_analyzed || that->info()->being_analyzed)
5731  return;
5732  that->info()->being_analyzed = true;
5733  that->Accept(this);
5734  that->info()->being_analyzed = false;
5735  that->info()->been_analyzed = true;
5736 }
void fail(const char *error_message)
Definition: jsregexp.h:1618

References v8::internal::RegExpNode::Accept(), v8::internal::NodeInfo::been_analyzed, v8::internal::NodeInfo::being_analyzed, fail(), v8::internal::RegExpNode::info(), v8::internal::Zone::isolate(), and v8::internal::RegExpNode::zone().

Referenced by v8::internal::RegExpEngine::Compile(), and VisitLoopChoice().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error_message()

const char* v8::internal::Analysis::error_message ( )
inline

Definition at line 1614 of file jsregexp.h.

1614  {
1616  return error_message_;
1617  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, error_message_, and NULL.

Referenced by v8::internal::RegExpEngine::Compile(), and fail().

+ Here is the caller graph for this function:

◆ fail()

void v8::internal::Analysis::fail ( const char *  error_message)
inline

Definition at line 1618 of file jsregexp.h.

1618  {
1620  }
const char * error_message()
Definition: jsregexp.h:1614

References error_message(), and error_message_.

Referenced by EnsureAnalyzed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has_failed()

bool v8::internal::Analysis::has_failed ( )
inline

Definition at line 1613 of file jsregexp.h.

1613 { return error_message_ != NULL; }

References error_message_, and NULL.

Referenced by v8::internal::RegExpEngine::Compile(), and VisitLoopChoice().

+ Here is the caller graph for this function:

◆ VisitLoopChoice()

void v8::internal::Analysis::VisitLoopChoice ( LoopChoiceNode that)
virtual

Reimplemented from v8::internal::NodeVisitor.

Definition at line 5792 of file jsregexp.cc.

5792  {
5793  NodeInfo* info = that->info();
5794  for (int i = 0; i < that->alternatives()->length(); i++) {
5795  RegExpNode* node = that->alternatives()->at(i).node();
5796  if (node != that->loop_node()) {
5797  EnsureAnalyzed(node);
5798  if (has_failed()) return;
5799  info->AddFromFollowing(node->info());
5800  }
5801  }
5802  // Check the loop last since it may need the value of this node
5803  // to get a correct result.
5804  EnsureAnalyzed(that->loop_node());
5805  if (!has_failed()) {
5806  info->AddFromFollowing(that->loop_node()->info());
5807  }
5808 }
void EnsureAnalyzed(RegExpNode *node)
Definition: jsregexp.cc:5724

References v8::internal::NodeInfo::AddFromFollowing(), v8::internal::ChoiceNode::alternatives(), EnsureAnalyzed(), has_failed(), v8::internal::RegExpNode::info(), and v8::internal::LoopChoiceNode::loop_node().

+ Here is the call graph for this function:

Member Data Documentation

◆ error_message_

const char* v8::internal::Analysis::error_message_
private

Definition at line 1625 of file jsregexp.h.

Referenced by error_message(), fail(), and has_failed().

◆ ignore_case_

bool v8::internal::Analysis::ignore_case_
private

Definition at line 1623 of file jsregexp.h.

◆ is_one_byte_

bool v8::internal::Analysis::is_one_byte_
private

Definition at line 1624 of file jsregexp.h.


The documentation for this class was generated from the following files: