5 #ifndef V8_JSON_STRINGIFIER_H_
6 #define V8_JSON_STRINGIFIER_H_
27 static const int kInitialPartLength = 32;
28 static const int kMaxPartLength = 16 * 1024;
29 static const int kPartLengthGrowthFactor = 2;
31 enum Result { UNCHANGED, SUCCESS, EXCEPTION };
41 template <
bool is_one_
byte,
typename Char>
44 template <
bool is_one_
byte,
typename Char>
45 INLINE(
void Append_(
const Char* chars));
55 INLINE(
void AppendOneByte(
const char* chars)) {
57 Append_<true>(
reinterpret_cast<const uint8_t*
>(chars));
59 Append_<false>(
reinterpret_cast<const uint8_t*
>(chars));
72 template <
typename ResultType,
typename Char>
79 return Serialize_<false>(obj,
false, factory_->empty_string());
87 return Serialize_<false>(
object,
99 return Serialize_<true>(
object, deferred_comma, deferred_key);
102 template <
bool deferred_
string_key>
106 if (deferred_comma) Append(
',');
115 return SerializeDouble(object->value());
127 template <
typename SrcChar,
typename DestChar>
128 INLINE(
static int SerializeStringUnchecked_(
const SrcChar* src,
132 template <
bool is_one_
byte,
typename Char>
135 template <
typename Char>
138 template <
typename Char>
145 return Handle<String>(String::cast(accumulator_store_->value()), isolate_);
149 return accumulator_store_->set_value(*
string);
165 static const int kJsonEscapeTableEntrySize = 8;
172 const char*
const BasicJsonStringifier::JsonEscapeTable =
173 "\\u0000\0 \\u0001\0 \\u0002\0 \\u0003\0 "
174 "\\u0004\0 \\u0005\0 \\u0006\0 \\u0007\0 "
175 "\\b\0 \\t\0 \\n\0 \\u000b\0 "
176 "\\f\0 \\r\0 \\u000e\0 \\u000f\0 "
177 "\\u0010\0 \\u0011\0 \\u0012\0 \\u0013\0 "
178 "\\u0014\0 \\u0015\0 \\u0016\0 \\u0017\0 "
179 "\\u0018\0 \\u0019\0 \\u001a\0 \\u001b\0 "
180 "\\u001c\0 \\u001d\0 \\u001e\0 \\u001f\0 "
181 " \0 !\0 \\\"\0 #\0 "
196 "\\\\\0 ]\0 ^\0 _\0 "
204 "|\0 }\0 ~\0 \177\0 "
205 "\200\0 \201\0 \202\0 \203\0 "
206 "\204\0 \205\0 \206\0 \207\0 "
207 "\210\0 \211\0 \212\0 \213\0 "
208 "\214\0 \215\0 \216\0 \217\0 "
209 "\220\0 \221\0 \222\0 \223\0 "
210 "\224\0 \225\0 \226\0 \227\0 "
211 "\230\0 \231\0 \232\0 \233\0 "
212 "\234\0 \235\0 \236\0 \237\0 "
213 "\240\0 \241\0 \242\0 \243\0 "
214 "\244\0 \245\0 \246\0 \247\0 "
215 "\250\0 \251\0 \252\0 \253\0 "
216 "\254\0 \255\0 \256\0 \257\0 "
217 "\260\0 \261\0 \262\0 \263\0 "
218 "\264\0 \265\0 \266\0 \267\0 "
219 "\270\0 \271\0 \272\0 \273\0 "
220 "\274\0 \275\0 \276\0 \277\0 "
221 "\300\0 \301\0 \302\0 \303\0 "
222 "\304\0 \305\0 \306\0 \307\0 "
223 "\310\0 \311\0 \312\0 \313\0 "
224 "\314\0 \315\0 \316\0 \317\0 "
225 "\320\0 \321\0 \322\0 \323\0 "
226 "\324\0 \325\0 \326\0 \327\0 "
227 "\330\0 \331\0 \332\0 \333\0 "
228 "\334\0 \335\0 \336\0 \337\0 "
229 "\340\0 \341\0 \342\0 \343\0 "
230 "\344\0 \345\0 \346\0 \347\0 "
231 "\350\0 \351\0 \352\0 \353\0 "
232 "\354\0 \355\0 \356\0 \357\0 "
233 "\360\0 \361\0 \362\0 \363\0 "
234 "\364\0 \365\0 \366\0 \367\0 "
235 "\370\0 \371\0 \372\0 \373\0 "
236 "\374\0 \375\0 \376\0 \377\0 ";
239 BasicJsonStringifier::BasicJsonStringifier(
Isolate* isolate)
254 MaybeHandle<Object> BasicJsonStringifier::Stringify(
Handle<Object> object) {
255 Result result = SerializeObject(
object);
256 if (result == UNCHANGED)
return isolate_->factory()->undefined_value();
257 if (result == SUCCESS) {
263 return accumulator();
265 DCHECK(result == EXCEPTION);
266 return MaybeHandle<Object>();
270 MaybeHandle<Object> BasicJsonStringifier::StringifyString(
271 Isolate* isolate, Handle<String>
object) {
272 static const int kJsonQuoteWorstCaseBlowup = 6;
273 static const int kSpaceForQuotes = 2;
274 int worst_case_length =
275 object->length() * kJsonQuoteWorstCaseBlowup + kSpaceForQuotes;
277 if (worst_case_length > 32 *
KB) {
278 BasicJsonStringifier stringifier(isolate);
279 return stringifier.Stringify(
object);
284 if (object->IsOneByteRepresentationUnderneath()) {
285 Handle<String> result = isolate->factory()->NewRawOneByteString(
286 worst_case_length).ToHandleChecked();
288 return StringifyString_<SeqOneByteString>(
290 object->GetFlatContent().ToOneByteVector(),
293 Handle<String> result = isolate->factory()->NewRawTwoByteString(
294 worst_case_length).ToHandleChecked();
296 return StringifyString_<SeqTwoByteString>(
298 object->GetFlatContent().ToUC16Vector(),
304 template <
typename ResultType,
typename Char>
305 Handle<String> BasicJsonStringifier::StringifyString_(Isolate* isolate,
307 Handle<String> result) {
310 ResultType* dest = ResultType::cast(*result);
311 dest->Set(final_size++,
'\"');
312 final_size += SerializeStringUnchecked_(vector.start(),
313 dest->GetChars() + 1,
315 dest->Set(final_size++,
'\"');
320 template <
bool is_one_
byte,
typename Char>
321 void BasicJsonStringifier::Append_(Char c) {
323 SeqOneByteString::cast(*current_part_)->SeqOneByteStringSet(
324 current_index_++, c);
326 SeqTwoByteString::cast(*current_part_)->SeqTwoByteStringSet(
327 current_index_++, c);
329 if (current_index_ == part_length_)
Extend();
333 template <
bool is_one_
byte,
typename Char>
334 void BasicJsonStringifier::Append_(
const Char* chars) {
335 for (; *chars !=
'\0'; chars++) Append_<is_one_byte, Char>(*chars);
339 MaybeHandle<Object> BasicJsonStringifier::ApplyToJsonFunction(
340 Handle<Object>
object, Handle<Object> key) {
341 LookupIterator it(
object, tojson_string_,
342 LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
345 if (!fun->IsJSFunction())
return object;
348 if (key->IsSmi()) key = factory_->NumberToString(key);
349 Handle<Object> argv[] = { key };
350 HandleScope scope(isolate_);
353 Execution::Call(isolate_, fun,
object, 1, argv),
355 return scope.CloseAndEscape(
object);
359 BasicJsonStringifier::Result BasicJsonStringifier::StackPush(
360 Handle<Object>
object) {
361 StackLimitCheck check(isolate_);
362 if (check.HasOverflowed()) {
363 isolate_->StackOverflow();
367 int length = Smi::cast(stack_->length())->value();
370 FixedArray* elements = FixedArray::cast(stack_->elements());
371 for (
int i = 0;
i < length;
i++) {
372 if (elements->get(
i) == *
object) {
374 Handle<Object> error;
375 MaybeHandle<Object> maybe_error = factory_->NewTypeError(
376 "circular_structure", HandleVector<Object>(
NULL, 0));
377 if (maybe_error.ToHandle(&error)) isolate_->Throw(*error);
383 FixedArray::cast(stack_->elements())->set(length, *
object);
389 void BasicJsonStringifier::StackPop() {
390 int length = Smi::cast(stack_->length())->value();
395 template <
bool deferred_
string_key>
396 BasicJsonStringifier::Result BasicJsonStringifier::Serialize_(
397 Handle<Object>
object,
bool comma, Handle<Object> key) {
398 if (object->IsJSObject()) {
401 ApplyToJsonFunction(
object, key),
405 if (object->IsSmi()) {
406 if (deferred_string_key) SerializeDeferredKey(comma, key);
407 return SerializeSmi(Smi::cast(*
object));
410 switch (HeapObject::cast(*object)->map()->instance_type()) {
413 if (deferred_string_key) SerializeDeferredKey(comma, key);
416 switch (Oddball::cast(*object)->kind()) {
418 if (deferred_string_key) SerializeDeferredKey(comma, key);
419 AppendOneByte(
"false");
422 if (deferred_string_key) SerializeDeferredKey(comma, key);
423 AppendOneByte(
"true");
426 if (deferred_string_key) SerializeDeferredKey(comma, key);
427 AppendOneByte(
"null");
433 if (object->IsAccessCheckNeeded())
break;
434 if (deferred_string_key) SerializeDeferredKey(comma, key);
437 if (deferred_string_key) SerializeDeferredKey(comma, key);
442 if (object->IsString()) {
443 if (deferred_string_key) SerializeDeferredKey(comma, key);
446 }
else if (object->IsJSObject()) {
448 if (object->IsAccessCheckNeeded() || object->IsJSGlobalProxy())
break;
449 if (deferred_string_key) SerializeDeferredKey(comma, key);
454 return SerializeGeneric(
object, key, comma, deferred_string_key);
458 BasicJsonStringifier::Result BasicJsonStringifier::SerializeGeneric(
459 Handle<Object>
object,
463 Handle<JSObject> builtins(isolate_->native_context()->builtins(), isolate_);
465 isolate_, builtins,
"JSONSerializeAdapter").ToHandleChecked());
467 Handle<Object> argv[] = { key,
object };
468 Handle<Object> result;
471 Execution::Call(isolate_, builtin,
object, 2, argv),
473 if (result->IsUndefined())
return UNCHANGED;
475 if (key->IsSmi()) key = factory_->NumberToString(key);
476 SerializeDeferredKey(deferred_comma, key);
483 part_length_ = kInitialPartLength;
489 factory_->NewConsString(accumulator(), result_string),
491 set_accumulator(cons);
496 BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSValue(
497 Handle<JSValue>
object) {
498 String* class_name =
object->class_name();
499 if (class_name == isolate_->heap()->String_string()) {
500 Handle<Object> value;
502 isolate_, value, Execution::ToString(isolate_,
object), EXCEPTION);
504 }
else if (class_name == isolate_->heap()->Number_string()) {
505 Handle<Object> value;
508 if (value->IsSmi())
return SerializeSmi(Smi::cast(*value));
511 DCHECK(class_name == isolate_->heap()->Boolean_string());
512 Object* value = JSValue::cast(*object)->value();
513 DCHECK(value->IsBoolean());
514 AppendOneByte(value->IsTrue() ?
"true" :
"false");
520 BasicJsonStringifier::Result BasicJsonStringifier::SerializeSmi(Smi*
object) {
529 BasicJsonStringifier::Result BasicJsonStringifier::SerializeDouble(
531 if (std::isinf(number) || std::isnan(number)) {
532 AppendOneByte(
"null");
543 BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSArray(
544 Handle<JSArray>
object) {
545 HandleScope handle_scope(isolate_);
546 Result stack_push = StackPush(
object);
547 if (stack_push != SUCCESS)
return stack_push;
549 CHECK(object->length()->ToArrayIndex(&length));
551 switch (object->GetElementsKind()) {
553 Handle<FixedArray> elements(
554 FixedArray::cast(object->elements()), isolate_);
556 if (
i > 0) Append(
',');
557 SerializeSmi(Smi::cast(elements->get(
i)));
563 if (length == 0)
break;
564 Handle<FixedDoubleArray> elements(
565 FixedDoubleArray::cast(object->elements()), isolate_);
567 if (
i > 0) Append(
',');
568 SerializeDouble(elements->get_scalar(
i));
573 Handle<FixedArray> elements(
574 FixedArray::cast(object->elements()), isolate_);
576 if (
i > 0) Append(
',');
578 SerializeElement(isolate_,
579 Handle<Object>(elements->get(
i), isolate_),
581 if (result == SUCCESS)
continue;
582 if (result == UNCHANGED) {
583 AppendOneByte(
"null");
594 Result result = SerializeJSArraySlow(
object, length);
595 if (result != SUCCESS)
return result;
601 current_part_ = handle_scope.CloseAndEscape(current_part_);
606 BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSArraySlow(
607 Handle<JSArray>
object,
uint32_t length) {
609 if (
i > 0) Append(
',');
610 Handle<Object> element;
615 if (element->IsUndefined()) {
616 AppendOneByte(
"null");
618 Result result = SerializeElement(isolate_, element,
i);
619 if (result == SUCCESS)
continue;
620 if (result == UNCHANGED) {
621 AppendOneByte(
"null");
631 BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
632 Handle<JSObject>
object) {
633 HandleScope handle_scope(isolate_);
634 Result stack_push = StackPush(
object);
635 if (stack_push != SUCCESS)
return stack_push;
636 DCHECK(!object->IsJSGlobalProxy() && !object->IsGlobalObject());
641 if (object->HasFastProperties() &&
642 !object->HasIndexedInterceptor() &&
643 !object->HasNamedInterceptor() &&
644 object->elements()->length() == 0) {
645 Handle<Map>
map(object->map());
646 for (
int i = 0;
i <
map->NumberOfOwnDescriptors();
i++) {
647 Handle<Name>
name(
map->instance_descriptors()->GetKey(
i), isolate_);
649 if (!
name->IsString())
continue;
651 PropertyDetails details =
map->instance_descriptors()->GetDetails(
i);
652 if (details.IsDontEnum())
continue;
653 Handle<Object> property;
654 if (details.type() ==
FIELD && *
map == object->map()) {
655 property = Handle<Object>(object->RawFastPropertyAt(
656 FieldIndex::ForDescriptor(*
map,
i)), isolate_);
663 Result result = SerializeProperty(property, comma, key);
664 if (!comma && result == SUCCESS) comma =
true;
665 if (result == EXCEPTION)
return result;
668 Handle<FixedArray> contents;
674 for (
int i = 0;
i < contents->length();
i++) {
675 Object* key = contents->get(
i);
676 Handle<String> key_handle;
677 MaybeHandle<Object> maybe_property;
678 if (key->IsString()) {
679 key_handle = Handle<String>(String::cast(key), isolate_);
683 key_handle = factory_->NumberToString(Handle<Object>(key, isolate_));
687 isolate_,
object, Smi::cast(key)->value());
688 }
else if (key_handle->AsArrayIndex(&index)) {
694 Handle<Object> property;
696 isolate_, property, maybe_property, EXCEPTION);
697 Result result = SerializeProperty(property, comma, key_handle);
698 if (!comma && result == SUCCESS) comma =
true;
699 if (result == EXCEPTION)
return result;
705 current_part_ = handle_scope.CloseAndEscape(current_part_);
710 void BasicJsonStringifier::ShrinkCurrentPart() {
711 DCHECK(current_index_ < part_length_);
717 void BasicJsonStringifier::Accumulate() {
720 set_accumulator(factory_->empty_string());
723 set_accumulator(factory_->NewConsString(accumulator(),
724 current_part_).ToHandleChecked());
731 if (part_length_ <= kMaxPartLength / kPartLengthGrowthFactor) {
732 part_length_ *= kPartLengthGrowthFactor;
736 factory_->NewRawOneByteString(part_length_).ToHandleChecked();
739 factory_->NewRawTwoByteString(part_length_).ToHandleChecked();
741 DCHECK(!current_part_.is_null());
746 void BasicJsonStringifier::ChangeEncoding() {
750 factory_->NewRawTwoByteString(part_length_).ToHandleChecked();
751 DCHECK(!current_part_.is_null());
753 is_one_byte_ =
false;
757 template <
typename SrcChar,
typename DestChar>
758 int BasicJsonStringifier::SerializeStringUnchecked_(
const SrcChar* src,
761 DestChar* dest_start = dest;
765 DCHECK(
sizeof(*dest) >=
sizeof(*src));
767 for (
int i = 0;
i < length;
i++) {
769 if (DoNotEscape(c)) {
770 *(dest++) =
static_cast<DestChar
>(c);
772 const uint8_t* chars =
reinterpret_cast<const uint8_t*
>(
773 &JsonEscapeTable[c * kJsonEscapeTableEntrySize]);
774 while (*chars !=
'\0') *(dest++) = *(chars++);
778 return static_cast<int>(dest - dest_start);
782 template <
bool is_one_
byte,
typename Char>
783 void BasicJsonStringifier::SerializeString_(Handle<String>
string) {
784 int length =
string->length();
785 Append_<is_one_byte, char>(
'"');
791 if (((part_length_ - current_index_) >> 3) > length) {
793 Vector<const Char> vector = GetCharVector<Char>(
string);
795 current_index_ += SerializeStringUnchecked_(
797 SeqOneByteString::cast(*current_part_)->GetChars() + current_index_,
800 current_index_ += SerializeStringUnchecked_(
802 SeqTwoByteString::cast(*current_part_)->GetChars() + current_index_,
806 String* string_location =
NULL;
807 Vector<const Char> vector(
NULL, 0);
808 for (
int i = 0;
i < length;
i++) {
810 if (*
string != string_location) {
813 vector = GetCharVector<Char>(
string);
814 string_location = *string;
817 if (DoNotEscape(c)) {
818 Append_<is_one_byte, Char>(c);
820 Append_<is_one_byte, uint8_t>(
reinterpret_cast<const uint8_t*
>(
821 &JsonEscapeTable[c * kJsonEscapeTableEntrySize]));
826 Append_<is_one_byte, uint8_t>(
'"');
831 bool BasicJsonStringifier::DoNotEscape(uint8_t c) {
832 return c >=
'#' && c <=
'~' && c !=
'\\';
837 bool BasicJsonStringifier::DoNotEscape(
uint16_t c) {
838 return c >=
'#' && c !=
'\\' && c != 0x7f;
844 Handle<String>
string) {
845 String::FlatContent flat =
string->GetFlatContent();
847 return flat.ToOneByteVector();
853 String::FlatContent flat =
string->GetFlatContent();
855 return flat.ToUC16Vector();
859 void BasicJsonStringifier::SerializeString(Handle<String>
object) {
862 if (object->IsOneByteRepresentationUnderneath()) {
863 SerializeString_<true, uint8_t>(
object);
866 SerializeString(
object);
869 if (object->IsOneByteRepresentationUnderneath()) {
870 SerializeString_<false, uint8_t>(
object);
872 SerializeString_<false, uc16>(
object);
An object reference managed by the v8 garbage collector.
A JavaScript object (ECMA-262, 4.3.3)
Result SerializeGeneric(Handle< Object > object, Handle< Object > key, bool deferred_comma, bool deferred_key)
void SerializeString(Handle< String > object)
Isolate * isolate() const
INLINE(static Vector< const Char > GetCharVector(Handle< String > string))
Handle< String > current_part_
INLINE(Result SerializeObject(Handle< Object > obj))
INLINE(Result SerializeJSArray(Handle< JSArray > object))
void SerializeDeferredKey(bool deferred_comma, Handle< Object > deferred_key)
INLINE(Handle< String > accumulator())
INLINE(void Append_(const Char *chars))
INLINE(void Append_(Char c))
MUST_USE_RESULT MaybeHandle< Object > ApplyToJsonFunction(Handle< Object > object, Handle< Object > key)
INLINE(void set_accumulator(Handle< String > string))
Handle< JSValue > accumulator_store_
MUST_USE_RESULT MaybeHandle< Object > Stringify(Handle< Object > object)
INLINE(static int SerializeStringUnchecked_(const SrcChar *src, DestChar *dest, int length))
INLINE(Result SerializeHeapNumber(Handle< HeapNumber > object))
INLINE(void Append(uint8_t c))
INLINE(void SerializeString_(Handle< String > string))
Result SerializeDouble(double number)
INLINE(Result SerializeElement(Isolate *isolate, Handle< Object > object, int i))
INLINE(static Handle< String > StringifyString_(Isolate *isolate, Vector< Char > vector, Handle< String > result))
Handle< String > tojson_string_
Result SerializeJSArraySlow(Handle< JSArray > object, uint32_t length)
static const int kInitialPartLength
static const char *const JsonEscapeTable
Result SerializeSmi(Smi *object)
INLINE(static bool DoNotEscape(Char c))
Result SerializeJSValue(Handle< JSValue > object)
Result Serialize_(Handle< Object > object, bool comma, Handle< Object > key)
INLINE(Result SerializeJSObject(Handle< JSObject > object))
INLINE(Result SerializeProperty(Handle< Object > object, bool deferred_comma, Handle< String > deferred_key))
INLINE(void ShrinkCurrentPart())
INLINE(void AppendOneByte(const char *chars))
MUST_USE_RESULT INLINE(static MaybeHandle< Object > StringifyString(Isolate *isolate, Handle< String > object))
BasicJsonStringifier(Isolate *isolate)
Result StackPush(Handle< Object > object)
static Handle< T > cast(Handle< S > that)
static void EnsureSize(Handle< JSArray > array, int minimum_size_of_backing_fixed_array)
static MUST_USE_RESULT MaybeHandle< FixedArray > GetKeys(Handle< JSReceiver > object, KeyCollectionType type)
static MUST_USE_RESULT MaybeHandle< Object > GetPropertyOrElement(Handle< Object > object, Handle< Name > key)
static MaybeHandle< JSReceiver > ToObject(Isolate *isolate, Handle< Object > object)
static MUST_USE_RESULT MaybeHandle< Object > GetElement(Isolate *isolate, Handle< Object > object, uint32_t index)
static MUST_USE_RESULT MaybeHandle< Object > GetProperty(LookupIterator *it)
static MUST_USE_RESULT Handle< String > Truncate(Handle< SeqString > string, int new_length)
static Smi * FromInt(int value)
static const int kMaxLength
static Handle< String > Flatten(Handle< String > string, PretenureFlag pretenure=NOT_TENURED)
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 map
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 enable harmony object literal extensions true
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 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value)
#define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call, T)
#define THROW_NEW_ERROR(isolate, call, T)
#define DCHECK(condition)
static const size_t kBufferSize
Vector< const uint8_t > GetCharVector(Handle< String > string)
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, true > AllowHeapAllocation
int ToNumber(Register reg)
kSerializedDataOffset Object
@ MUTABLE_HEAP_NUMBER_TYPE
const char * DoubleToCString(double v, Vector< char > buffer)
const char * IntToCString(int n, Vector< char > buffer)
Debugger support for the V8 JavaScript engine.