26 #define DECL_ACCEPT(type) \
27 void type::Accept(AstVisitor* v) { v->Visit##type(this); }
37 return IsLiteral() && AsLiteral()->value()->IsSmi();
42 return IsLiteral() && AsLiteral()->value()->IsString();
47 return IsLiteral() && AsLiteral()->value()->IsNull();
52 const VariableProxy* var_proxy = AsVariableProxy();
53 if (var_proxy ==
NULL)
return false;
58 var_proxy->raw_name()->IsOneByteEqualTo(
"undefined");
62 VariableProxy::VariableProxy(
Zone* zone,
Variable* var,
int position,
65 name_(var->raw_name()),
67 is_this_(var->is_this()),
69 interface_(var->interface()),
70 variable_feedback_slot_(kInvalidFeedbackSlot) {
75 VariableProxy::VariableProxy(Zone* zone,
const AstRawString*
name,
bool is_this,
76 Interface* interface,
int position, IdGen* id_gen)
77 : Expression(zone, position, id_gen),
82 interface_(interface),
83 variable_feedback_slot_(kInvalidFeedbackSlot) {}
86 void VariableProxy::BindTo(Variable* var) {
89 DCHECK(!FLAG_harmony_modules || interface_->IsUnified(var->interface()));
90 DCHECK((is_this() && var->is_this()) || name_ == var->raw_name());
101 Assignment::Assignment(Zone* zone,
Token::Value op, Expression* target,
102 Expression* value,
int pos, IdGen* id_gen)
103 : Expression(zone, pos, id_gen),
107 binary_operation_(
NULL),
108 assignment_id_(id_gen->GetNextId()),
109 is_uninitialized_(
false),
115 case Token::ASSIGN_BIT_OR:
return Token::BIT_OR;
116 case Token::ASSIGN_BIT_XOR:
return Token::BIT_XOR;
117 case Token::ASSIGN_BIT_AND:
return Token::BIT_AND;
118 case Token::ASSIGN_SHL:
return Token::SHL;
119 case Token::ASSIGN_SAR:
return Token::SAR;
120 case Token::ASSIGN_SHR:
return Token::SHR;
125 case Token::ASSIGN_MOD:
return Token::MOD;
128 return Token::ILLEGAL;
132 bool FunctionLiteral::AllowsLazyCompilation() {
133 return scope()->AllowsLazyCompilation();
137 bool FunctionLiteral::AllowsLazyCompilationWithoutContext() {
138 return scope()->AllowsLazyCompilationWithoutContext();
142 int FunctionLiteral::start_position()
const {
143 return scope()->start_position();
147 int FunctionLiteral::end_position()
const {
148 return scope()->end_position();
152 StrictMode FunctionLiteral::strict_mode()
const {
153 return scope()->strict_mode();
157 void FunctionLiteral::InitializeSharedInfo(
158 Handle<Code> unoptimized_code) {
159 for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) {
160 RelocInfo* rinfo = it.rinfo();
162 Object* obj = rinfo->target_object();
163 if (obj->IsSharedFunctionInfo()) {
164 SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
165 if (shared->start_position() == start_position()) {
166 shared_info_ = Handle<SharedFunctionInfo>(shared);
174 ObjectLiteralProperty::ObjectLiteralProperty(Zone* zone,
175 AstValueFactory* ast_value_factory,
176 Literal* key, Expression* value,
181 is_static_ = is_static;
182 if (key->raw_value()->EqualsString(ast_value_factory->proto_string())) {
184 }
else if (value_->AsMaterializedLiteral() !=
NULL) {
185 kind_ = MATERIALIZED_LITERAL;
186 }
else if (value_->IsLiteral()) {
194 ObjectLiteralProperty::ObjectLiteralProperty(Zone* zone,
bool is_getter,
195 FunctionLiteral* value,
199 kind_ = is_getter ? GETTER : SETTER;
200 is_static_ = is_static;
204 bool ObjectLiteral::Property::IsCompileTimeValue() {
206 (kind_ == MATERIALIZED_LITERAL &&
211 void ObjectLiteral::Property::set_emit_store(
bool emit_store) {
212 emit_store_ = emit_store;
216 bool ObjectLiteral::Property::emit_store() {
221 void ObjectLiteral::CalculateEmitStore(Zone* zone) {
222 ZoneAllocationPolicy allocator(zone);
226 for (
int i = properties()->length() - 1;
i >= 0;
i--) {
227 ObjectLiteral::Property*
property = properties()->at(
i);
228 Literal* literal =
property->key();
229 if (literal->value()->IsNull())
continue;
233 if ((property->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL ||
234 property->kind() == ObjectLiteral::Property::COMPUTED) &&
235 table.Lookup(literal, hash,
false, allocator) !=
NULL) {
236 property->set_emit_store(
false);
239 table.Lookup(literal, hash,
true, allocator);
245 bool ObjectLiteral::IsBoilerplateProperty(ObjectLiteral::Property* property) {
246 return property !=
NULL &&
247 property->kind() != ObjectLiteral::Property::PROTOTYPE;
251 void ObjectLiteral::BuildConstantProperties(Isolate* isolate) {
252 if (!constant_properties_.is_null())
return;
255 Handle<FixedArray> constant_properties = isolate->factory()->NewFixedArray(
256 boilerplate_properties_ * 2,
TENURED);
260 bool is_simple =
true;
264 for (
int i = 0;
i < properties()->length();
i++) {
265 ObjectLiteral::Property*
property = properties()->at(
i);
266 if (!IsBoilerplateProperty(property)) {
270 MaterializedLiteral* m_literal =
property->value()->AsMaterializedLiteral();
271 if (m_literal !=
NULL) {
272 m_literal->BuildConstants(isolate);
273 if (m_literal->depth() >= depth_acc) depth_acc = m_literal->depth() + 1;
279 Handle<Object> key =
property->key()->value();
280 Handle<Object> value = GetBoilerplateValue(property->value(), isolate);
287 if (FLAG_track_double_fields &&
288 (value->IsNumber() || value->IsUninitialized())) {
289 may_store_doubles_ =
true;
292 is_simple = is_simple && !value->IsUninitialized();
301 && element_index > max_element_index) {
302 max_element_index = element_index;
304 }
else if (key->IsSmi()) {
305 int key_value = Smi::cast(*key)->value();
307 &&
static_cast<uint32_t>(key_value) > max_element_index) {
308 max_element_index = key_value;
314 constant_properties->set(position++, *key);
315 constant_properties->set(position++, *value);
318 constant_properties_ = constant_properties;
320 (max_element_index <= 32) || ((2 * elements) >= max_element_index);
321 set_is_simple(is_simple);
322 set_depth(depth_acc);
326 void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
327 if (!constant_elements_.is_null())
return;
330 Handle<JSArray> array =
335 bool is_simple =
true;
337 bool is_holey =
false;
338 for (
int i = 0, n = values()->length();
i < n;
i++) {
339 Expression* element = values()->at(
i);
340 MaterializedLiteral* m_literal = element->AsMaterializedLiteral();
341 if (m_literal !=
NULL) {
342 m_literal->BuildConstants(isolate);
343 if (m_literal->depth() + 1 > depth_acc) {
344 depth_acc = m_literal->depth() + 1;
347 Handle<Object> boilerplate_value = GetBoilerplateValue(element, isolate);
348 if (boilerplate_value->IsTheHole()) {
350 }
else if (boilerplate_value->IsUninitialized()) {
359 Handle<FixedArrayBase> element_values(array->elements());
363 if (is_simple && depth_acc == 1 && values()->length() > 0 &&
364 array->HasFastSmiOrObjectElements()) {
365 element_values->set_map(isolate->heap()->fixed_cow_array_map());
370 Handle<FixedArray>
literals = isolate->factory()->NewFixedArray(2,
TENURED);
379 set_is_simple(is_simple);
380 set_depth(depth_acc);
386 if (expression->IsLiteral()) {
387 return expression->AsLiteral()->value();
392 return isolate->
factory()->uninitialized_value();
397 if (IsArrayLiteral()) {
398 return AsArrayLiteral()->BuildConstantElements(isolate);
400 if (IsObjectLiteral()) {
401 return AsObjectLiteral()->BuildConstantProperties(isolate);
403 DCHECK(IsRegExpLiteral());
408 void TargetCollector::AddTarget(Label* target,
Zone* zone) {
410 int length = targets_.length();
411 for (
int i = 0;
i < length;
i++) {
412 if (targets_[
i] == target)
return;
414 targets_.Add(target, zone);
418 void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
424 set_to_boolean_types(oracle->ToBooleanTypes(expression()->test_id()));
428 void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
434 set_to_boolean_types(oracle->ToBooleanTypes(right()->test_id()));
438 bool BinaryOperation::ResultOverwriteAllowed()
const {
464 UnaryOperation* maybe_unary = expr->AsUnaryOperation();
465 return maybe_unary !=
NULL && maybe_unary->op() == Token::TYPEOF;
476 *expr = left->AsUnaryOperation()->expression();
484 bool CompareOperation::IsLiteralCompareTypeof(Expression** expr,
492 UnaryOperation* maybe_unary = expr->AsUnaryOperation();
493 return maybe_unary !=
NULL &&
495 maybe_unary->expression()->IsLiteral();
518 bool CompareOperation::IsLiteralCompareUndefined(
519 Expression** expr,
Isolate* isolate) {
538 bool CompareOperation::IsLiteralCompareNull(Expression** expr) {
548 return proxy()->var()->IsStackAllocated();
551 bool FunctionDeclaration::IsInlineable()
const {
567 bool Call::IsUsingCallFeedbackSlot(
Isolate* isolate)
const {
568 CallType call_type = GetCallType(isolate);
569 return (call_type != POSSIBLY_EVAL_CALL);
573 Call::CallType Call::GetCallType(
Isolate* isolate)
const {
574 VariableProxy* proxy = expression()->AsVariableProxy();
576 if (proxy->var()->is_possibly_eval(isolate)) {
577 return POSSIBLY_EVAL_CALL;
578 }
else if (proxy->var()->IsUnallocated()) {
580 }
else if (proxy->var()->IsLookupSlot()) {
581 return LOOKUP_SLOT_CALL;
585 Property*
property = expression()->AsProperty();
586 return property !=
NULL ? PROPERTY_CALL : OTHER_CALL;
590 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
591 LookupIterator* it) {
594 DCHECK(it->IsFound() && it->GetHolder<JSObject>().is_identical_to(global));
595 cell_ = it->GetPropertyCell();
596 if (cell_->value()->IsJSFunction()) {
597 Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
600 if (!it->isolate()->heap()->InNewSpace(*candidate)) {
609 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
610 int allocation_site_feedback_slot = FLAG_pretenuring_call_new
611 ? AllocationSiteFeedbackSlot()
612 : CallNewFeedbackSlot();
614 oracle->GetCallNewAllocationSite(allocation_site_feedback_slot);
615 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackSlot());
616 if (is_monomorphic_) {
617 target_ = oracle->GetCallNewTarget(CallNewFeedbackSlot());
622 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
623 TypeFeedbackId
id = key()->LiteralFeedbackId();
625 oracle->CollectReceiverTypes(
id, &maps);
626 receiver_type_ = maps.length() == 1 ? maps.at(0)
634 void AstVisitor::VisitDeclarations(ZoneList<Declaration*>* declarations) {
635 for (
int i = 0;
i < declarations->length();
i++) {
636 Visit(declarations->at(
i));
641 void AstVisitor::VisitStatements(ZoneList<Statement*>* statements) {
642 for (
int i = 0;
i < statements->length();
i++) {
643 Statement* stmt = statements->at(
i);
645 if (stmt->IsJump())
break;
650 void AstVisitor::VisitExpressions(ZoneList<Expression*>* expressions) {
651 for (
int i = 0;
i < expressions->length();
i++) {
656 Expression* expression = expressions->at(
i);
657 if (expression !=
NULL) Visit(expression);
665 #define MAKE_ACCEPT(Name) \
666 void* RegExp##Name::Accept(RegExpVisitor* visitor, void* data) { \
667 return visitor->Visit##Name(this, data); \
672 #define MAKE_TYPE_CASE(Name) \
673 RegExp##Name* RegExpTree::As##Name() { \
676 bool RegExpTree::Is##Name() { return false; }
678 #undef MAKE_TYPE_CASE
680 #define MAKE_TYPE_CASE(Name) \
681 RegExp##Name* RegExp##Name::As##Name() { \
684 bool RegExp##Name::Is##Name() { return true; }
686 #undef MAKE_TYPE_CASE
691 for (
int i = 0;
i < children->length();
i++)
692 result = result.
Union(children->
at(
i)->CaptureRegisters());
697 Interval RegExpAlternative::CaptureRegisters() {
702 Interval RegExpDisjunction::CaptureRegisters() {
707 Interval RegExpLookahead::CaptureRegisters() {
708 return body()->CaptureRegisters();
712 Interval RegExpCapture::CaptureRegisters() {
713 Interval
self(StartRegister(index()), EndRegister(index()));
714 return self.Union(body()->CaptureRegisters());
718 Interval RegExpQuantifier::CaptureRegisters() {
719 return body()->CaptureRegisters();
723 bool RegExpAssertion::IsAnchoredAtStart() {
724 return assertion_type() == RegExpAssertion::START_OF_INPUT;
728 bool RegExpAssertion::IsAnchoredAtEnd() {
729 return assertion_type() == RegExpAssertion::END_OF_INPUT;
733 bool RegExpAlternative::IsAnchoredAtStart() {
734 ZoneList<RegExpTree*>* nodes = this->nodes();
735 for (
int i = 0;
i < nodes->length();
i++) {
736 RegExpTree* node = nodes->at(
i);
737 if (node->IsAnchoredAtStart()) {
return true; }
738 if (node->max_match() > 0) {
return false; }
744 bool RegExpAlternative::IsAnchoredAtEnd() {
745 ZoneList<RegExpTree*>* nodes = this->nodes();
746 for (
int i = nodes->length() - 1;
i >= 0;
i--) {
747 RegExpTree* node = nodes->at(
i);
748 if (node->IsAnchoredAtEnd()) {
return true; }
749 if (node->max_match() > 0) {
return false; }
755 bool RegExpDisjunction::IsAnchoredAtStart() {
756 ZoneList<RegExpTree*>* alternatives = this->alternatives();
757 for (
int i = 0;
i < alternatives->length();
i++) {
758 if (!alternatives->at(
i)->IsAnchoredAtStart())
765 bool RegExpDisjunction::IsAnchoredAtEnd() {
766 ZoneList<RegExpTree*>* alternatives = this->alternatives();
767 for (
int i = 0;
i < alternatives->length();
i++) {
768 if (!alternatives->at(
i)->IsAnchoredAtEnd())
775 bool RegExpLookahead::IsAnchoredAtStart() {
776 return is_positive() && body()->IsAnchoredAtStart();
780 bool RegExpCapture::IsAnchoredAtStart() {
781 return body()->IsAnchoredAtStart();
785 bool RegExpCapture::IsAnchoredAtEnd() {
786 return body()->IsAnchoredAtEnd();
799 #define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, \
800 void* data) OVERRIDE;
809 void* RegExpUnparser::VisitDisjunction(RegExpDisjunction* that,
void* data) {
811 for (
int i = 0;
i < that->alternatives()->length();
i++) {
813 that->alternatives()->at(
i)->Accept(
this, data);
820 void* RegExpUnparser::VisitAlternative(RegExpAlternative* that,
void* data) {
822 for (
int i = 0;
i < that->nodes()->length();
i++) {
824 that->nodes()->at(
i)->Accept(
this, data);
831 void RegExpUnparser::VisitCharacterRange(CharacterRange that) {
832 os_ << AsUC16(that.from());
833 if (!that.IsSingleton()) {
834 os_ <<
"-" << AsUC16(that.to());
840 void* RegExpUnparser::VisitCharacterClass(RegExpCharacterClass* that,
842 if (that->is_negated()) os_ <<
"^";
844 for (
int i = 0;
i < that->ranges(zone_)->length();
i++) {
845 if (
i > 0) os_ <<
" ";
846 VisitCharacterRange(that->ranges(zone_)->at(
i));
853 void* RegExpUnparser::VisitAssertion(RegExpAssertion* that,
void* data) {
854 switch (that->assertion_type()) {
855 case RegExpAssertion::START_OF_INPUT:
858 case RegExpAssertion::END_OF_INPUT:
861 case RegExpAssertion::START_OF_LINE:
864 case RegExpAssertion::END_OF_LINE:
867 case RegExpAssertion::BOUNDARY:
870 case RegExpAssertion::NON_BOUNDARY:
878 void* RegExpUnparser::VisitAtom(RegExpAtom* that,
void* data) {
880 Vector<const uc16> chardata = that->data();
881 for (
int i = 0;
i < chardata.length();
i++) {
882 os_ << AsUC16(chardata[
i]);
889 void* RegExpUnparser::VisitText(RegExpText* that,
void* data) {
890 if (that->elements()->length() == 1) {
891 that->elements()->at(0).tree()->Accept(
this, data);
894 for (
int i = 0;
i < that->elements()->length();
i++) {
896 that->elements()->at(
i).tree()->Accept(
this, data);
904 void* RegExpUnparser::VisitQuantifier(RegExpQuantifier* that,
void* data) {
905 os_ <<
"(# " << that->min() <<
" ";
909 os_ << that->max() <<
" ";
911 os_ << (that->is_greedy() ?
"g " : that->is_possessive() ?
"p " :
"n ");
912 that->body()->Accept(
this, data);
918 void* RegExpUnparser::VisitCapture(RegExpCapture* that,
void* data) {
920 that->body()->Accept(
this, data);
926 void* RegExpUnparser::VisitLookahead(RegExpLookahead* that,
void* data) {
927 os_ <<
"(-> " << (that->is_positive() ?
"+ " :
"- ");
928 that->body()->Accept(
this, data);
934 void* RegExpUnparser::VisitBackReference(RegExpBackReference* that,
936 os_ <<
"(<- " << that->index() <<
")";
941 void* RegExpUnparser::VisitEmpty(RegExpEmpty* that,
void* data) {
948 RegExpUnparser unparser(os, zone);
955 : alternatives_(alternatives) {
956 DCHECK(alternatives->length() > 1);
958 min_match_ = first_alternative->
min_match();
959 max_match_ = first_alternative->
max_match();
960 for (
int i = 1;
i < alternatives->length();
i++) {
972 return previous + increase;
976 RegExpAlternative::RegExpAlternative(ZoneList<RegExpTree*>* nodes)
978 DCHECK(nodes->length() > 1);
981 for (
int i = 0;
i < nodes->length();
i++) {
982 RegExpTree* node = nodes->at(
i);
983 int node_min_match = node->min_match();
984 min_match_ =
IncreaseBy(min_match_, node_min_match);
985 int node_max_match = node->max_match();
986 max_match_ =
IncreaseBy(max_match_, node_max_match);
991 CaseClause::CaseClause(Zone* zone, Expression* label,
992 ZoneList<Statement*>* statements,
int pos, IdGen* id_gen)
993 : Expression(zone, pos, id_gen),
995 statements_(statements),
997 compare_id_(id_gen->GetNextId()),
998 entry_id_(id_gen->GetNextId()) {}
1001 #define REGULAR_NODE(NodeType) \
1002 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1003 increase_node_count(); \
1005 #define REGULAR_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
1006 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1007 increase_node_count(); \
1008 add_slot_node(node); \
1010 #define DONT_OPTIMIZE_NODE(NodeType) \
1011 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1012 increase_node_count(); \
1013 set_dont_crankshaft_reason(k##NodeType); \
1014 add_flag(kDontSelfOptimize); \
1016 #define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
1017 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1018 increase_node_count(); \
1019 add_slot_node(node); \
1020 set_dont_crankshaft_reason(k##NodeType); \
1021 add_flag(kDontSelfOptimize); \
1023 #define DONT_TURBOFAN_NODE(NodeType) \
1024 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1025 increase_node_count(); \
1026 set_dont_crankshaft_reason(k##NodeType); \
1027 set_dont_turbofan_reason(k##NodeType); \
1028 add_flag(kDontSelfOptimize); \
1030 #define DONT_SELFOPTIMIZE_NODE(NodeType) \
1031 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1032 increase_node_count(); \
1033 add_flag(kDontSelfOptimize); \
1035 #define DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
1036 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1037 increase_node_count(); \
1038 add_slot_node(node); \
1039 add_flag(kDontSelfOptimize); \
1041 #define DONT_CACHE_NODE(NodeType) \
1042 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1043 increase_node_count(); \
1044 set_dont_crankshaft_reason(k##NodeType); \
1045 add_flag(kDontSelfOptimize); \
1046 add_flag(kDontCache); \
1114 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
1115 increase_node_count();
1116 add_slot_node(node);
1117 if (node->is_jsruntime()) {
1119 set_dont_crankshaft_reason(kCallToAJavaScriptRuntimeFunction);
1124 #undef DONT_OPTIMIZE_NODE
1125 #undef DONT_SELFOPTIMIZE_NODE
1126 #undef DONT_CACHE_NODE
1129 Handle<String> Literal::ToString() {
1130 if (value_->IsString())
return value_->AsString()->string();
1131 DCHECK(value_->IsNumber());
1133 Vector<char> buffer(arr,
arraysize(arr));
1135 if (value()->IsSmi()) {
1137 SNPrintF(buffer,
"%d", Smi::cast(*value())->value());
1142 return isolate_->factory()->NewStringFromAsciiChecked(str);
#define DECL_ACCEPT(type)
#define MAKE_ACCEPT(Name)
#define DONT_TURBOFAN_NODE(NodeType)
#define DONT_CACHE_NODE(NodeType)
#define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType)
#define DONT_SELFOPTIMIZE_NODE(NodeType)
#define DONT_OPTIMIZE_NODE(NodeType)
#define REGULAR_NODE_WITH_FEEDBACK_SLOTS(NodeType)
#define DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType)
#define REGULAR_NODE(NodeType)
#define MAKE_TYPE_CASE(Name)
An object reference managed by the v8 garbage collector.
Isolate represents an isolated instance of the V8 engine.
static bool IsCompileTimeValue(Expression *expression)
static Handle< FixedArray > GetValue(Isolate *isolate, Expression *expression)
VariableProxy * proxy() const
virtual bool IsInlineable() const
bool IsUndefinedLiteral(Isolate *isolate) const
virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle *oracle)
TypeFeedbackId test_id() const
bool IsStringLiteral() const
bool IsNullLiteral() const
bool IsSmiLiteral() const
RegExpUnparser(OStream &os, Zone *zone)
void VisitCharacterRange(CharacterRange that)
static Handle< T > cast(Handle< S > that)
static Handle< T > null()
Interval Union(Interval that)
static void Expand(Handle< JSArray > array, int minimum_size_of_backing_fixed_array)
static MUST_USE_RESULT MaybeHandle< Object > SetOwnElement(Handle< JSObject > object, uint32_t index, Handle< Object > value, StrictMode strict_mode)
Handle< Object > GetBoilerplateValue(Expression *expression, Isolate *isolate)
void BuildConstants(Isolate *isolate)
OStream & Print(OStream &os, Zone *zone)
virtual void * Accept(RegExpVisitor *visitor, void *data)=0
virtual int min_match()=0
static const int kInfinity
virtual int max_match()=0
static Smi * FromInt(int value)
static const uint32_t kDefaultHashMapCapacity
static bool IsEqualityOp(Value op)
byte ToBooleanTypes(TypeFeedbackId id)
Location location() const
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric literals(0o77, 0b11)") DEFINE_BOOL(harmony_object_literals
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
#define FOR_EACH_REG_EXP_TREE_TYPE(VISIT)
#define DCHECK(condition)
static bool MatchLiteralCompareNull(Expression *left, Token::Value op, Expression *right, Expression **expr)
TypeImpl< ZoneTypeConfig > Type
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
static Interval ListCaptureRegisters(ZoneList< RegExpTree * > *children)
ElementsKind GetPackedElementsKind(ElementsKind holey_kind)
int SNPrintF(Vector< char > str, const char *format,...)
TemplateHashMapImpl< ZoneAllocationPolicy > ZoneHashMap
kSerializedDataOffset Object
@ FAST_HOLEY_SMI_ELEMENTS
Handle< T > handle(T *t, Isolate *isolate)
static int IncreaseBy(int previous, int increase)
ElementsKind GetHoleyElementsKind(ElementsKind packed_kind)
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
static bool IsVoidOfLiteral(Expression *expr)
static bool IsTypeof(Expression *expr)
const char * DoubleToCString(double v, Vector< char > buffer)
static bool MatchLiteralCompareUndefined(Expression *left, Token::Value op, Expression *right, Expression **expr, Isolate *isolate)
static bool MatchLiteralCompareTypeof(Expression *left, Token::Value op, Expression *right, Expression **expr, Handle< String > *check)
Debugger support for the V8 JavaScript engine.
static Handle< Value > Throw(Isolate *isolate, const char *message)