Home | History | Annotate | Download | only in src

Lines Matching defs:isolate

62   if (!(value)) return isolate->ThrowIllegalOperation();
104 MUST_USE_RESULT static MaybeObject* DeepCopyBoilerplate(Isolate* isolate,
106 StackLimitCheck check(isolate);
107 if (check.HasOverflowed()) return isolate->StackOverflow();
109 Heap* heap = isolate->heap();
123 { MaybeObject* maybe_result = DeepCopyBoilerplate(isolate, js_object);
134 { MaybeObject* maybe_result = DeepCopyBoilerplate(isolate, js_object);
160 { MaybeObject* maybe_result = DeepCopyBoilerplate(isolate, js_object);
179 isolate->counters()->cow_arrays_created_runtime()->Increment();
190 { MaybeObject* maybe_result = DeepCopyBoilerplate(isolate,
209 { MaybeObject* maybe_result = DeepCopyBoilerplate(isolate,
229 return DeepCopyBoilerplate(isolate, boilerplate);
235 return isolate->heap()->CopyJSObject(boilerplate);
243 Isolate* isolate = context->GetIsolate();
271 isolate->factory()->NewFixedArray(number_of_symbol_keys);
283 return isolate->factory()->ObjectLiteralMapFromCache(context, keys);
287 return isolate->factory()->CopyMap(
294 Isolate* isolate,
300 Isolate* isolate,
325 Handle<JSObject> boilerplate = isolate->factory()->NewJSObjectFromMap(map);
342 Handle<Object> key(constant_properties->get(index+0), isolate);
343 Handle<Object> value(constant_properties->get(index+1), isolate);
348 value = CreateLiteralBoilerplate(isolate, literals, array);
380 isolate->factory()->NewStringFromAscii(CStrVector(str));
405 Isolate* isolate,
411 Handle<Object> object = isolate->factory()->NewJSObject(constructor);
414 (elements->map() == isolate->heap()->fixed_cow_array_map());
416 is_cow ? elements : isolate->factory()->CopyFixedArray(elements);
433 CreateLiteralBoilerplate(isolate, literals, fa);
447 Isolate* isolate,
454 return CreateObjectLiteralBoilerplate(isolate,
460 return CreateObjectLiteralBoilerplate(isolate,
466 return CreateArrayLiteralBoilerplate(isolate, literals, elements);
480 HandleScope scope(isolate);
487 CreateArrayLiteralBoilerplate(isolate, literals, elements);
497 HandleScope scope(isolate);
507 Handle<Object> boilerplate(literals->get(literals_index), isolate);
508 if (*boilerplate == isolate->heap()->undefined_value()) {
509 boilerplate = CreateObjectLiteralBoilerplate(isolate,
518 return DeepCopyBoilerplate(isolate, JSObject::cast(*boilerplate));
523 HandleScope scope(isolate);
533 Handle<Object> boilerplate(literals->get(literals_index), isolate);
534 if (*boilerplate == isolate->heap()->undefined_value()) {
535 boilerplate = CreateObjectLiteralBoilerplate(isolate,
544 return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate));
549 HandleScope scope(isolate);
556 Handle<Object> boilerplate(literals->get(literals_index), isolate);
557 if (*boilerplate == isolate->heap()->undefined_value()) {
558 boilerplate = CreateArrayLiteralBoilerplate(isolate, literals, elements);
563 return DeepCopyBoilerplate(isolate, JSObject::cast(*boilerplate));
568 HandleScope scope(isolate);
575 Handle<Object> boilerplate(literals->get(literals_index), isolate);
576 if (*boilerplate == isolate->heap()->undefined_value()) {
577 boilerplate = CreateArrayLiteralBoilerplate(isolate, literals, elements);
583 isolate->heap()->fixed_cow_array_map()) {
584 isolate->counters()->cow_arrays_created_runtime()->Increment();
586 return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate));
596 isolate->context()->global_context()->
599 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor);
618 if (!obj->IsJSObject()) return isolate->heap()->null_value();
631 if (prototype->IsNull()) return isolate->heap()->false_value();
632 if (O == prototype) return isolate->heap()->true_value();
677 return isolate->heap()->undefined_value();
684 JavaScriptFrameIterator it(isolate);
685 return isolate->heap()->ToBoolean(it.frame()->IsConstructor());
732 Isolate* isolate = obj->GetIsolate();
735 !isolate->MayNamedAccess(current, name, access_type)) {
772 isolate->ReportFailedAccessCheck(current, access_type);
811 Heap* heap = isolate->heap();
812 HandleScope scope(isolate);
813 Handle<FixedArray> elms = isolate->factory()->NewFixedArray(DESCRIPTOR_SIZE);
814 Handle<JSArray> desc = isolate->factory()->NewJSArrayWithElements(elms);
847 RETURN_IF_EMPTY_HANDLE(isolate, value);
958 if (proto->IsNull()) return isolate->heap()->false_value();
962 return obj->map()->is_extensible() ? isolate->heap()->true_value()
963 : isolate->heap()->false_value();
968 HandleScope scope(isolate);
980 HandleScope scope(isolate);
983 return *isolate->factory()->CreateApiFunction(data);
991 return isolate->heap()->ToBoolean(result);
1029 return needs_access_checks ? isolate->heap()->true_value()
1030 : isolate->heap()->false_value();
1048 return isolate->heap()->undefined_value();
1052 static Failure* ThrowRedeclarationError(Isolate* isolate,
1055 HandleScope scope(isolate);
1057 isolate->factory()->NewStringFromAscii(CStrVector(type));
1060 isolate->factory()->NewTypeError("redeclaration", HandleVector(args, 2));
1061 return isolate->Throw(*error);
1067 HandleScope scope(isolate);
1069 isolate->context()->global());
1087 HandleScope scope(isolate);
1089 Handle<Object> value(pairs->get(i + 1), isolate);
1119 return ThrowRedeclarationError(isolate, type, name);
1131 return ThrowRedeclarationError(isolate, "const", name);
1136 return ThrowRedeclarationError(isolate, type, name);
1148 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
1172 return ThrowRedeclarationError(isolate, type, name);
1188 RETURN_IF_EMPTY_HANDLE(isolate,
1194 RETURN_IF_EMPTY_HANDLE(isolate,
1203 ASSERT(!isolate->has_pending_exception());
1204 return isolate->heap()->undefined_value();
1209 HandleScope scope(isolate);
1217 Handle<Object> initial_value(args[3], isolate);
1236 return ThrowRedeclarationError(isolate, type, name);
1261 isolate,
1278 context_ext = isolate->factory()->NewJSObject(
1279 isolate->context_extension_function());
1289 Handle<Object> value(isolate->heap()->undefined_value(), isolate);
1302 return ThrowRedeclarationError(isolate, "const", name);
1305 RETURN_IF_EMPTY_HANDLE(isolate,
1310 return isolate->heap()->undefined_value();
1326 GlobalObject* global = isolate->context()->global();
1352 if (real_holder != isolate->context()->global()) break;
1353 return ThrowRedeclarationError(isolate, "const", name);
1361 HandleScope handle_scope(isolate);
1374 if (real_holder != isolate->context()->global()) break;
1375 return ThrowRedeclarationError(isolate, "const", name);
1382 return isolate->heap()->undefined_value();
1386 Object* value = (assign) ? args[2] : isolate->heap()->undefined_value();
1401 global = isolate->context()->global();
1405 return isolate->heap()->undefined_value();
1418 GlobalObject* global = isolate->context()->global();
1443 return ThrowRedeclarationError(isolate, "var", name);
1451 return ThrowRedeclarationError(isolate, "var", name);
1457 HandleScope handle_scope(isolate);
1458 Handle<GlobalObject> global(isolate->context()->global());
1464 RETURN_IF_EMPTY_HANDLE(isolate,
1500 HandleScope scope(isolate);
1503 Handle<Object> value(args[0], isolate);
1544 isolate,
1554 isolate->context()->global());
1557 isolate,
1597 isolate,
1608 HandleScope scope(isolate);
1620 HandleScope scope(isolate);
1631 isolate->counters()->regexp_entry_runtime()->Increment();
1645 return isolate->ThrowIllegalOperation();
1649 isolate->heap()->AllocateFixedArrayWithHoles(elements_count);
1653 { MaybeObject* maybe_new_object = isolate->heap()->AllocateRaw(
1659 HandleScope scope(isolate);
1661 set_map(isolate->global_context()->regexp_result_map());
1664 array->set_properties(isolate->heap()->empty_fixed_array());
1681 if (!global->IsTrue()) global = isolate->heap()->false_value();
1684 if (!ignoreCase->IsTrue()) ignoreCase = isolate->heap()->false_value();
1687 if (!multiline->IsTrue()) multiline = isolate->heap()->false_value();
1711 Heap* heap = isolate->heap();
1741 HandleScope scope(isolate);
1746 prototype->set_elements(isolate->heap()->empty_fixed_array());
1751 static Handle<JSFunction> InstallBuiltin(Isolate* isolate,
1755 Handle<String> key = isolate->factory()->LookupAsciiSymbol(name);
1756 Handle<Code> code(isolate->builtins()->builtin(builtin_name));
1758 isolate->factory()->NewFunction(key,
1770 HandleScope scope(isolate);
1774 InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop);
1775 InstallBuiltin(isolate, holder, "push", Builtins::kArrayPush);
1776 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift);
1777 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift);
1778 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice);
1779 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice);
1780 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat);
1789 isolate->context()->global()->global_context();
1795 HandleScope scope(isolate);
1816 ASSERT(isolate->has_pending_exception());
1840 return isolate->heap()->undefined_value();
1852 return isolate->heap()->undefined_value();
1857 HandleScope scope(isolate);
1861 Handle<Object> script = Handle<Object>(fun->shared()->script(), isolate);
1862 if (!script->IsScript()) return isolate->heap()->undefined_value();
1907 return isolate->heap()->undefined_value();
1942 return f->shared()->IsApiFunction() ? isolate->heap()->true_value()
1943 : isolate->heap()->false_value();
1952 return f->IsBuiltin() ? isolate->heap()->true_value() :
1953 isolate->heap()->false_value();
1958 HandleScope scope(isolate);
1990 target->shared()->set_script(isolate->heap()->undefined_value());
2001 isolate->factory()->NewFixedArray(number_of_literals, TENURED);
2012 target->set_next_function_link(isolate->heap()->undefined_value());
2021 HandleScope scope(isolate);
2027 return isolate->heap()->undefined_value();
2031 MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate,
2036 return isolate->heap()->LookupSingleCharacterStringFromCode(code);
2039 return isolate->heap()->empty_string();
2054 if (value < 0) return isolate->heap()->nan_value();
2072 return isolate->heap()->nan_value();
2082 return CharFromCode(isolate, args[0]);
2088 explicit FixedArrayBuilder(Isolate* isolate, int initial_capacity)
2089 : array_(isolate->factory()->NewFixedArrayWithHoles(initial_capacity)),
2191 array_builder_(heap->isolate(), estimated_part_count),
2243 return heap_->isolate()->factory()->empty_string();
2284 CALL_HEAP_FUNCTION(heap_->isolate(),
2290 CALL_HEAP_FUNCTION(heap_->isolate(),
2512 Isolate* isolate = replacement->GetIsolate();
2521 isolate->factory()->NewSubString(replacement, from, to));
2574 Isolate* isolate,
2582 HandleScope handles(isolate);
2616 ReplacementStringBuilder builder(isolate->heap(),
2634 HandleScope loop_scope(isolate);
2686 Isolate* isolate,
2692 HandleScope handles(isolate);
2719 return isolate->heap()->empty_string();
2724 isolate->factory()->NewRawAsciiString(new_length));
2727 isolate->factory()->NewRawTwoByteString(new_length));
2775 HandleScope loop_scope(isolate);
2795 return isolate->heap()->empty_string();
2807 isolate->heap()->CreateFillerObjectAt(end_of_string, delta);
2846 isolate, subject, regexp, last_match_info);
2849 isolate, subject, regexp, last_match_info);
2853 return StringReplaceRegExpWithString(isolate,
2864 int Runtime::StringMatch(Isolate* isolate,
2891 return SearchString(isolate,
2896 return SearchString(isolate,
2903 return SearchString(isolate,
2908 return SearchString(isolate,
2916 HandleScope scope(isolate); // create a new handle scope
2928 Runtime::StringMatch(isolate, sub, pat, start_index);
2968 HandleScope scope(isolate); // create a new handle scope
3055 *isolate->runtime_state()->string_locale_compare_buf1();
3057 *isolate->runtime_state()->string_locale_compare_buf2();
3094 isolate->counters()->sub_string_runtime()->Increment();
3113 return isolate->heap()->null_value();
3138 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(matches);
3142 Handle<String> match = isolate->factory()->NewSubString(subject, from, to);
3145 Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(elements);
3172 static bool SearchStringMultiple(Isolate* isolate,
3182 StringSearch<PatternChar, SubjectChar> search(isolate, pattern);
3215 static bool SearchStringMultiple(Isolate* isolate,
3232 if (SearchStringMultiple(isolate,
3239 if (SearchStringMultiple(isolate,
3249 if (SearchStringMultiple(isolate,
3256 if (SearchStringMultiple(isolate,
3278 Isolate* isolate,
3309 HandleScope loop_scope(isolate);
3310 builder->Add(*isolate->factory()->NewSubString(subject,
3345 Isolate* isolate,
3389 HandleScope temp_scope(isolate);
3393 isolate->factory()->NewFixedArray(3 + capture_count);
3394 Handle<String> match = isolate->factory()->NewSubString(subject,
3403 Handle<String> substring = isolate->factory()->NewSubString(subject,
3409 elements->set(i, isolate->heap()->undefined_value());
3414 builder->Add(*isolate->factory()->NewJSArrayWithElements(elements));
3467 HandleScope handles(isolate);
3482 result_elements = isolate->factory()->NewFixedArrayWithHoles(16);
3490 if (SearchStringMultiple(isolate, subject, pattern,
3494 return isolate->heap()->null_value();
3501 result = SearchRegExpNoCaptureMultiple(isolate,
3507 result = SearchRegExpMultiple(isolate,
3514 if (result == RegExpImpl::RE_FAILURE) return isolate->heap()->null_value();
3532 return isolate->heap()->
3540 return isolate->heap()->AllocateStringFromAscii(CStrVector("NaN"));
3544 return isolate->heap()->AllocateStringFromAscii(CStrVector("-Infinity"));
3546 return isolate->heap()->AllocateStringFromAscii(CStrVector("Infinity"));
3553 isolate->heap()->AllocateStringFromAscii(CStrVector(str));
3565 return isolate->heap()->AllocateStringFromAscii(CStrVector("NaN"));
3569 return isolate->heap()->AllocateStringFromAscii(CStrVector("-Infinity"));
3571 return isolate->heap()->AllocateStringFromAscii(CStrVector("Infinity"));
3578 isolate->heap()->AllocateStringFromAscii(CStrVector(str));
3590 return isolate->heap()->AllocateStringFromAscii(CStrVector("NaN"));
3594 return isolate->heap()->AllocateStringFromAscii(CStrVector("-Infinity"));
3596 return isolate->heap()->AllocateStringFromAscii(CStrVector("Infinity"));
3603 isolate->heap()->AllocateStringFromAscii(CStrVector(str));
3615 return isolate->heap()->AllocateStringFromAscii(CStrVector("NaN"));
3619 return isolate->heap()->AllocateStringFromAscii(CStrVector("-Infinity"));
3621 return isolate->heap()->AllocateStringFromAscii(CStrVector("Infinity"));
3628 isolate->heap()->AllocateStringFromAscii(CStrVector(str));
3646 MaybeObject* Runtime::GetElementOrCharAt(Isolate* isolate,
3677 MaybeObject* Runtime::GetObjectProperty(Isolate* isolate,
3680 HandleScope scope(isolate);
3685 isolate->factory()->NewTypeError("non_object_property_load",
3687 return isolate->Throw(*error);
3693 return GetElementOrCharAt(isolate, object, index);
3711 return GetElementOrCharAt(isolate, object, index);
3726 return Runtime::GetObjectProperty(isolate, object, key);
3755 KeyedLookupCache* keyed_lookup_cache = isolate->keyed_lookup_cache();
3759 return value->IsTheHole() ? isolate->heap()->undefined_value() : value;
3784 HandleScope scope(isolate);
3794 return Runtime::GetObjectProperty(isolate,
3807 HandleScope scope(isolate);
3844 HandleScope scope(isolate);
3891 return isolate->heap()->undefined_value();
3916 return Runtime::ForceSetObjectProperty(isolate,
3924 MaybeObject* Runtime::SetObjectProperty(Isolate* isolate,
3930 HandleScope scope(isolate);
3935 isolate->factory()->NewTypeError("non_object_property_store",
3937 return isolate->Throw(*error);
3991 MaybeObject* Runtime::ForceSetObjectProperty(Isolate* isolate,
3996 HandleScope scope(isolate);
4041 MaybeObject* Runtime::ForceDeleteObjectProperty(Isolate* isolate,
4044 HandleScope scope(isolate);
4056 return isolate->heap()->true_value();
4100 return Runtime::SetObjectProperty(isolate,
4145 static Object* HasLocalPropertyImplementation(Isolate* isolate,
4148 if (object->HasLocalProperty(*key)) return isolate->heap()->true_value();
4155 return HasLocalPropertyImplementation(isolate,
4159 return isolate->heap()->false_value();
4173 if (object->HasRealNamedProperty(key)) return isolate->heap()->true_value();
4176 HandleScope scope(isolate);
4177 return HasLocalPropertyImplementation(isolate,
4186 return isolate->heap()->true_value();
4189 return isolate->heap()->false_value();
4201 if (object->HasProperty(key)) return isolate->heap()->true_value();
4203 return isolate->heap()->false_value();
4216 if (object->HasElement(index)) return isolate->heap()->true_value();
4218 return isolate->heap()->false_value();
4231 return isolate->heap()->ToBoolean(object->HasElement(index));
4235 return isolate->heap()->ToBoolean(att != ABSENT && (att & DONT_ENUM) == 0);
4240 HandleScope scope(isolate);
4259 HandleScope scope(isolate);
4289 HandleScope scope(isolate);
4292 return isolate->heap()->undefined_value();
4301 !isolate->MayNamedAccess(*obj,
4302 isolate->heap()->undefined_value(),
4304 isolate->ReportFailedAccessCheck(*obj, v8::ACCESS_KEYS);
4305 return *isolate->factory()->NewJSArray(0);
4320 !isolate->MayNamedAccess(*jsproto,
4321 isolate->heap()->undefined_value(),
4323 isolate->ReportFailedAccessCheck(*jsproto, v8::ACCESS_KEYS);
4324 return *isolate->factory()->NewJSArray(0);
4337 isolate->factory()->NewFixedArray(total_property_count);
4357 names = isolate->factory()->NewFixedArray(
4362 if (name == isolate->heap()->hidden_symbol()) {
4369 return *isolate->factory()->NewJSArrayWithElements(names);
4376 HandleScope scope(isolate);
4379 return isolate->heap()->undefined_value();
4384 Handle<FixedArray> names = isolate->factory()->NewFixedArray(n);
4386 return *isolate->factory()->NewJSArrayWithElements(names);
4393 HandleScope scope(isolate);
4411 HandleScope scope(isolate);
4419 return isolate->heap()->undefined_value();
4426 HandleScope scope(isolate);
4434 return isolate->heap()->undefined_value();
4441 HandleScope scope(isolate);
4447 !isolate->MayNamedAccess(*object, isolate->heap()->undefined_value(),
4449 isolate->ReportFailedAccessCheck(*object, v8::ACCESS_KEYS);
4450 return *isolate->factory()->NewJSArray(0);
4455 if (proto->IsNull()) return *isolate->factory()->NewJSArray(0);
4465 Handle<FixedArray> copy = isolate->factory()->NewFixedArray(length);
4472 HandleScope scope(isolate);
4473 Handle<Object> entry_handle(entry, isolate);
4475 isolate->factory()->NumberToString(entry_handle);
4479 return *isolate->factory()->NewJSArrayWithElements(copy);
4488 JavaScriptFrameIterator it(isolate);
4503 HandleScope scope(isolate);
4515 return isolate->initial_object_prototype()->GetElement(index);
4520 if (key->Equals(isolate->heap()->length_symbol())) return Smi::FromInt(n);
4521 if (key->Equals(isolate->heap()->callee_symbol())) {
4525 return isolate->Throw(*isolate->factory()->NewTypeError(
4532 return isolate->initial_object_prototype()->GetProperty(*key);
4537 HandleScope scope(isolate);
4553 HandleScope scope(isolate);
4579 if (obj->IsNumber()) return isolate
4584 return isolate->heap()->undefined_symbol();
4589 return isolate->heap()->string_symbol();
4595 return isolate->heap()->boolean_symbol();
4598 return isolate->heap()->object_symbol();
4601 return isolate->heap()->undefined_symbol();
4603 return isolate->heap()->function_symbol();
4607 return isolate->heap()->object_symbol();
4650 return isolate->heap()->nan_value();
4657 return isolate->heap()->nan_value();
4664 if (d == 0) return isolate->heap()->minus_zero_value();
4684 return isolate->heap()->NumberFromDouble(
4685 StringToDouble(isolate->unicode_cache(), subject, ALLOW_HEX));
4712 maybe_object = isolate->heap()->AllocateRawAsciiString(length);
4714 maybe_object = isolate->heap()->AllocateRawTwoByteString(length);
4781 isolate->runtime_state()->string_input_buffer());
4795 isolate->context()->mark_out_of_memory();
4806 isolate->heap()->AllocateRawAsciiString(escaped_length);
4813 isolate->runtime_state()->string_input_buffer());
4914 isolate->heap()->AllocateRawAsciiString(unescaped_length) :
4915 isolate->heap()->AllocateRawTwoByteString(unescaped_length);
5000 MaybeObject* AllocateRawString(Isolate* isolate, int length);
5004 MaybeObject* AllocateRawString<SeqTwoByteString>(Isolate* isolate, int length) {
5005 return isolate->heap()->AllocateRawTwoByteString(length);
5010 MaybeObject* AllocateRawString<SeqAsciiString>(Isolate* isolate, int length) {
5011 return isolate->heap()->AllocateRawAsciiString(length);
5016 static MaybeObject* SlowQuoteJsonString(Isolate* isolate,
5031 MaybeObject* new_alloc = AllocateRawString<StringType>(isolate,
5064 static MaybeObject* QuoteJsonString(Isolate* isolate,
5067 isolate->counters()->quote_json_char_count()->Increment(length);
5071 return SlowQuoteJsonString<Char, StringType, comma>(isolate, characters);
5074 MaybeObject* new_alloc = AllocateRawString<StringType>(isolate,
5080 isolate->heap()->new_space()->Contains(new_object)) {
5085 return SlowQuoteJsonString<Char, StringType, comma>(isolate, characters);
5088 ASSERT(isolate->heap()->new_space()->Contains(new_string));
5125 isolate->heap()->new_space()->
5145 return QuoteJsonString<uc16, SeqTwoByteString, false>(isolate,
5148 return QuoteJsonString<char, SeqAsciiString, false>(isolate,
5167 return QuoteJsonString<uc16, SeqTwoByteString, true>(isolate,
5170 return QuoteJsonString<char, SeqAsciiString, true>(isolate,
5184 double value = StringToInt(isolate->unicode_cache(), s, radix);
5185 return isolate->heap()->NumberFromDouble(value);
5194 double value = StringToDouble(isolate->unicode_cache(),
5198 return isolate->heap()->NumberFromDouble(value);
5204 Isolate* isolate,
5222 ? isolate->heap()->AllocateRawAsciiString(length)
5223 : isolate->heap()->AllocateRawTwoByteString(length);
5232 isolate->runtime_state()->string_input_buffer());
5279 isolate->context()->mark_out_of_memory();
5437 Isolate* isolate,
5455 { MaybeObject* maybe_o = isolate->heap()->AllocateRawAsciiString(length);
5466 ConvertCaseHelper(isolate, s, length, length, mapping);
5472 ConvertCaseHelper(isolate,
5483 args, isolate, isolate->runtime_state()->to_lower_mapping());
5489 args, isolate, isolate->runtime_state()->to_upper_mapping());
5527 void FindStringIndices(Isolate* isolate,
5535 StringSearch<PatternChar, SubjectChar> search(isolate, pattern);
5550 HandleScope handle_scope(isolate);
5580 FindStringIndices(isolate,
5586 FindStringIndices(isolate,
5595 FindStringIndices(isolate,
5601 FindStringIndices(isolate,
5619 Handle<JSArray> result = isolate->factory()->NewJSArray(part_count);
5635 isolate->factory()->NewSubString(subject, part_start, part_end);
5680 HandleScope scope(isolate);
5692 isolate->heap()->AllocateUninitializedFixedArray(length);
5695 elements = Handle<FixedArray>(FixedArray::cast(obj), isolate);
5700 int num_copied_from_cache = CopyCachedAsciiCharsToArray(isolate->heap(),
5710 elements = isolate->factory()->NewFixedArray(length);
5723 return *isolate->factory()->NewJSArrayWithElements(elements);
5749 return isolate->heap()->NumberToString(number);
5760 return isolate->heap()->NumberToString(number, false);
5774 return isolate->heap()->NumberFromDouble(DoubleToInteger(number));
5793 return isolate->heap()->NumberFromDouble(double_value);
5802 return isolate->heap()->NumberFromUint32(number);
5816 return isolate->heap()->NumberFromInt32(DoubleToInt32(number));
5837 return isolate->heap()->nan_value();
5844 return isolate->heap()->AllocateHeapNumber(0);
5854 return isolate->heap()->NumberFromDouble(x + y);
5864 return isolate->heap()->NumberFromDouble(x - y);
5874 return isolate->heap()->NumberFromDouble(x * y);
5883 return isolate->heap()->NumberFromDouble(-x);
5891 return isolate->heap()->NumberFromDouble(9876543210.0);
5901 return isolate->heap()->NumberFromDouble(x / y);
5914 return isolate->heap()->NumberFromDouble(x);
5923 isolate->counters()->string_add_runtime()->Increment();
5924 return isolate->heap()->AllocateConsString(str1, str2);
5972 isolate->context()->mark_out_of_memory();
5983 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
5991 return isolate->heap()->empty_string();
6017 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6021 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6025 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6031 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6042 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6045 isolate->context()->mark_out_of_memory();
6056 isolate->heap()->AllocateRawAsciiString(length);
6067 isolate->heap()->AllocateRawTwoByteString(length);
6085 isolate->context()->mark_out_of_memory();
6092 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6100 return isolate->heap()->empty_string();
6110 isolate->context()->mark_out_of_memory();
6118 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
6123 isolate->context()->mark_out_of_memory();
6131 isolate->heap()->AllocateRawTwoByteString(length);
6170 return isolate->heap()->NumberFromInt32(x | y);
6180 return isolate->heap()->NumberFromInt32(x & y);
6190 return isolate->heap()->NumberFromInt32(x ^ y);
6199 return isolate->heap()->NumberFromInt32(~x);
6209 return isolate->heap()->NumberFromInt32(x << (y & 0x1f));
6219 return isolate->heap()->NumberFromUint32(x >> (y & 0x1f));
6229 return isolate->heap()->NumberFromInt32(ArithmeticShiftRight(x, y & 0x1f));
6315 int* x_elms = isolate->runtime_state()->smi_lexicographic_compare_x_elms();
6316 int* y_elms = isolate->runtime_state()->smi_lexicographic_compare_y_elms();
6403 StringInputBufferCompare(Isolate::Current()->runtime_state(), x, y));
6415 isolate->counters()->string_compare_runtime()->Increment();
6431 { MaybeObject* maybe_obj = isolate->heap()->PrepareForCompare(x);
6434 { MaybeObject* maybe_obj = isolate->heap()->PrepareForCompare(y);
6439 : StringInputBufferCompare(isolate->runtime_state(), x, y);
6446 isolate->counters()->math_acos()->Increment();
6449 return isolate->transcendental_cache()->Get(TranscendentalCache::ACOS, x);
6456 isolate->counters()->math_asin()->Increment();
6459 return isolate->transcendental_cache()->Get(TranscendentalCache::ASIN, x);
6466 isolate->counters()->math_atan()->Increment();
6469 return isolate->transcendental_cache()->Get(TranscendentalCache::ATAN, x);
6479 isolate->counters()->math_atan2()->Increment();
6495 return isolate->heap()->AllocateHeapNumber(result);
6502 isolate->counters()->math_ceil()->Increment();
6505 return isolate->heap()->NumberFromDouble(ceiling(x));
6512 isolate->counters()->math_cos()->Increment();
6515 return isolate->transcendental_cache()->Get(TranscendentalCache::COS, x);
6522 isolate->counters()->math_exp()->Increment();
6525 return isolate->transcendental_cache()->Get(TranscendentalCache::EXP, x);
6532 isolate->counters()->math_floor()->Increment();
6535 return isolate->heap()->NumberFromDouble(floor(x));
6542 isolate->counters()->math_log()->Increment();
6545 return isolate->transcendental_cache()->Get(TranscendentalCache::LOG, x);
6552 isolate->counters()->math_pow()->Increment();
6560 return isolate->heap()->NumberFromDouble(power_double_int(x, y));
6564 return isolate->heap()->AllocateHeapNumber(power_double_double(x, y));
6577 return isolate->heap()->nan_value();
6579 return isolate->heap()->AllocateHeapNumber(pow(x, y));
6587 isolate->counters()->math_round()->Increment();
6613 if (sign && value >= -0.5) return isolate->heap()->minus_zero_value();
6616 return isolate->heap()->AllocateHeapNumber(floor(value + 0.5));
6623 isolate->counters()->math_sin()->Increment();
6626 return isolate->transcendental_cache()->Get(TranscendentalCache::SIN, x);
6633 isolate->counters()->math_sqrt()->Increment();
6636 return isolate->heap()->AllocateHeapNumber(sqrt(x));
6643 isolate->counters()->math_tan()->Increment();
6646 return isolate->transcendental_cache()->Get(TranscendentalCache::TAN, x);
7005 isolate->heap()->fixed_array_map());
7013 return isolate
7027 isolate->heap()->AllocateArgumentsObject(callee, length);
7034 { MaybeObject* maybe_obj = isolate->heap()->AllocateRawFixedArray(length);
7040 array->set_map(isolate->heap()->fixed_array_map());
7054 HandleScope scope(isolate);
7066 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
7113 HandleScope scope(isolate);
7148 static void TrySettingInlineConstructStub(Isolate* isolate,
7150 Handle<Object> prototype = isolate->factory()->null_value();
7152 prototype = Handle<Object>(function->instance_prototype(), isolate);
7166 HandleScope scope(isolate);
7175 isolate->factory()->NewTypeError("not_constructor", arguments);
7176 return isolate->Throw(*type_error);
7186 isolate->factory()->NewTypeError("not_constructor", arguments);
7187 return isolate->Throw(*type_error);
7191 Debug* debug = isolate->debug();
7211 return isolate->context()->global();
7219 Handle<SharedFunctionInfo> shared(function->shared(), isolate);
7231 Handle<JSObject> result = isolate->factory()->NewJSObject(function);
7232 RETURN_IF_EMPTY_HANDLE(isolate, result);
7235 TrySettingInlineConstructStub(isolate, function);
7238 isolate->counters()->constructed_objects()->Increment();
7239 isolate->counters()->constructed_objects_runtime()->Increment();
7246 HandleScope scope(isolate);
7251 TrySettingInlineConstructStub(isolate, function);
7253 return isolate->heap()->undefined_value();
7258 HandleScope scope(isolate);
7289 HandleScope scope(isolate);
7295 isolate->debug()->has_break_points()) {
7301 isolate->debug()->has_break_points() ? "T" : "F");
7320 HandleScope scope(isolate);
7325 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
7326 ASSERT(isolate->heap()->IsAllocationAllowed());
7332 JavaScriptFrameIterator it(isolate);
7338 Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate);
7341 if (frame->GetExpression(i) == isolate->heap()->arguments_marker()) {
7348 ASSERT(*arguments != isolate->heap()->null_value());
7349 ASSERT(*arguments != isolate->heap()->undefined_value());
7355 isolate->compilation_cache()->MarkForLazyOptimizing(function);
7365 return isolate->heap()->undefined_value();
7388 return isolate->heap()->undefined_value();
7393 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
7395 return isolate->heap()->undefined_value();
7400 HandleScope scope(isolate);
7403 if (!function->IsOptimized()) return isolate->heap()->undefined_value();
7407 return isolate->heap()->undefined_value();
7412 HandleScope scope(isolate);
7415 if (!function->IsOptimizable()) return isolate->heap()->undefined_value();
7417 return isolate->heap()->undefined_value();
7422 HandleScope scope(isolate);
7431 Handle<Code> unoptimized(function->shared()->code(), isolate);
7440 JavaScriptFrameIterator it(isolate);
7452 JavaScriptFrameIterator it(isolate);
7512 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement();
7536 HandleScope scope(isolate);
7544 HandleScope scope(isolate);
7559 isolate->heap()->AllocateFunctionContext(length, function);
7563 isolate->set_context(Context::cast(result));
7569 MUST_USE_RESULT static MaybeObject* PushContextHelper(Isolate* isolate,
7580 HandleScope scope(isolate);
7581 Handle<Object> handle(object, isolate);
7583 isolate->factory()->NewTypeError("with_expression",
7585 return isolate->Throw(*result);
7590 { MaybeObject* maybe_result = isolate->heap()->AllocateWithContext(
7591 isolate->context(), JSObject::cast(js_object), is_catch_context);
7596 isolate->set_context(context);
7605 return PushContextHelper(isolate, args[0], false);
7612 return PushContextHelper(isolate, args[0], true);
7617 HandleScope scope(isolate);
7630 return isolate->heap()->true_value();
7635 return isolate->heap()->false_value();
7692 static JSObject* ComputeReceiverForNonGlobal(Isolate* isolate,
7695 Context* top = isolate->context();
7713 Isolate* isolate,
7715 HandleScope scope(isolate);
7719 return MakePair(isolate->ThrowIllegalOperation(), NULL);
7737 isolate->context()->global()->global_receiver();
7741 return MakePair(Unhole(isolate->heap(), value, attributes), receiver);
7752 receiver = isolate->context()->global()->global_receiver();
7754 receiver = ComputeReceiverForNonGlobal(isolate, object);
7765 isolate->factory()->NewReferenceError("not_defined",
7767 return MakePair(isolate->Throw(*reference_error), NULL);
7770 return MakePair(isolate->heap()->undefined_value(),
7771 isolate->heap()->undefined_value());
7777 return LoadContextSlotHelper(args, isolate, true);
7782 return LoadContextSlotHelper(args, isolate, false);
7787 HandleScope scope(isolate);
7790 Handle<Object> value(args[0], isolate);
7812 isolate->factory()->NewTypeError("strict_cannot_assign",
7814 return isolate->Throw(*error);
7821 ASSERT(isolate->has_pending_exception());
7842 isolate->factory()->NewReferenceError(
7844 return isolate->Throw(*error);
7848 context_ext = Handle<JSObject>(isolate->context()->global());
7856 isolate,
7861 isolate->factory()->NewTypeError(
7863 return isolate->Throw(*error);
7870 HandleScope scope(isolate);
7873 return isolate->Throw(args[0]);
7878 HandleScope scope(isolate);
7881 return isolate->ReThrow(args[0]);
7887 return isolate->PromoteScheduledException();
7892 HandleScope scope(isolate);
7895 Handle<Object> name(args[0], isolate);
7897 isolate->factory()->NewReferenceError("not_defined",
7899 return isolate->Throw(*reference_error);
7907 if (isolate->stack_guard()->IsStackOverflow()) {
7909 return isolate->StackOverflow();
8006 return isolate->heap()->undefined_value();
8025 JavaScriptFrameIterator it(isolate);
8051 isolate->PrintStack();
8052 return isolate->heap()->undefined_value();
8065 return isolate->heap()->NumberFromDouble(millis);
8070 HandleScope scope(isolate);
8087 isolate->unicode_cache());
8092 isolate->unicode_cache());
8098 return isolate->heap()->null_value();
8109 return isolate->heap()->AllocateStringFromUtf8(CStrVector(zone));
8117 return isolate->heap()->NumberFromDouble(OS::LocalTimeOffset());
8126 return isolate->heap()->NumberFromDouble(OS::DaylightSavingsOffset(x));
8133 if (!global->IsJSGlobalObject()) return isolate->heap()->null_value();
8139 HandleScope scope(isolate);
8146 ASSERT(isolate->has_pending_exception());
8154 HandleScope scope(isolate);
8159 Handle<Context> context(isolate->context()->global_context());
8166 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
8173 static ObjectPair CompileGlobalEval(Isolate* isolate,
8181 Handle<Context>(isolate->context()),
8182 isolate->context()->IsGlobalContext(),
8186 isolate->factory()->NewFunctionFromSharedFunctionInfo(
8187 shared, Handle<Context>(isolate->context()), NOT_TENURED);
8195 HandleScope scope(isolate);
8200 Handle<Context> context = Handle<Context>(isolate->context(), isolate);
8202 // Make sure Isolate::context() agrees with the old code that traversed
8214 receiver = context->Lookup(isolate->factory()->eval_symbol(),
8222 isolate);
8224 context = Handle<Context>(context->previous(), isolate);
8231 Handle<Object> name = isolate->factory()->eval_symbol();
8233 isolate->factory()->NewReferenceError("not_defined",
8235 return MakePair(isolate->Throw(*reference_error), NULL);
8243 receiver = Handle<Object>(context->get(index), isolate);
8246 isolate->context()->global()->global_receiver(), isolate);
8253 if (*callee != isolate->global_context()->global_eval_fun() ||
8256 isolate->context()->global()->global_receiver());
8260 return CompileGlobalEval(isolate,
8271 HandleScope scope(isolate);
8276 if (*callee != isolate->global_context()->global_eval_fun() ||
8279 isolate->context()->global()->global_receiver());
8283 return CompileGlobalEval(isolate,
8296 HandleScope scope(isolate);
8301 ? isolate->strict_mode_function_instance_map()
8302 : isolate->function_instance_map();
8320 Heap* heap = isolate->heap();
8344 if (elements->get(i) == element) return isolate->heap()->false_value();
8352 return isolate->heap()->true_value();
8369 ArrayConcatVisitor(Isolate* isolate,
8372 isolate_(isolate),
8374 isolate->global_handles()->Create(*storage))),
8467 Isolate* isolate_;
8515 static void IterateExternalArrayElements(Isolate* isolate,
8541 isolate->factory()->NewNumber(static_cast<ElementType>(val));
8548 HandleScope loop_scope(isolate);
8549 Handle<Object> e = isolate->factory()->NewNumber(array->get(j));
8678 static bool IterateElements(Isolate* isolate,
8690 HandleScope loop_scope(isolate);
8691 Handle<Object> element_value(elements->get(j), isolate);
8737 isolate, receiver, true, true, visitor);
8742 isolate, receiver, true, true, visitor);
8747 isolate, receiver, true, true, visitor);
8752 isolate, receiver, true, true, visitor);
8757 isolate, receiver, true, false, visitor);
8762 isolate, receiver, true, false, visitor);
8767 isolate, receiver, false, false, visitor);
8787 HandleScope handle_scope(isolate);
8842 storage = isolate->factory()->NewFixedArrayWithHoles(
8849 isolate->factory()->NewNumberDictionary(at_least_space_for));
8852 ArrayConcatVisitor visitor(isolate, storage, fast_case);
8858 if (!IterateElements(isolate, array, &visitor)) {
8906 if (new_elements->map() == isolate->heap()->fixed_array_map() ||
8907 new_elements->map() == isolate->heap()->fixed_cow_array_map()) {
8942 HandleScope handle_scope(isolate);
8953 return isolate->ThrowIllegalOperation();
8958 RETURN_IF_EMPTY_HANDLE(isolate, tmp1);
8960 RETURN_IF_EMPTY_HANDLE(isolate, tmp2);
8962 RETURN_IF_EMPTY_HANDLE(isolate,
8964 RETURN_IF_EMPTY_HANDLE(isolate,
8967 return isolate->heap()->undefined_value();
8978 HandleScope scope(isolate);
8994 return *isolate->factory()->NewJSArrayWithElements(keys);
8997 Handle<FixedArray> single_interval = isolate->factory()->NewFixedArray(2);
9004 isolate->factory()->NewNumber(static_cast<double>(min_length));
9006 return *isolate->factory()->NewJSArrayWithElements(single_interval);
9075 isolate->debugger()->SetEventListener(callback, data);
9077 return isolate->heap()->undefined_value();
9083 isolate->stack_guard()->DebugBreak();
9084 return isolate->heap()->undefined_value();
9119 maybe_value = heap->isolate()->pending_exception();
9120 heap->isolate()->clear_pending_exception();
9158 HandleScope scope(isolate);
9171 SaveContext save(isolate);
9172 if (isolate->debug()->InDebugger()) {
9173 isolate->set_context(*isolate->debug()->debugger_entry()->GetContext());
9187 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2);
9190 Runtime::GetElementOrCharAt(isolate, obj, index);
9197 return *isolate->factory()->NewJSArrayWithElements(details);
9216 isolate);
9224 DebugLookupResultValue(isolate->heap(), *obj, *name,
9228 Handle<Object> value(raw_value, isolate);
9235 isolate->factory()->NewFixedArray(hasJavaScriptAccessors ? 5 : 2);
9240 caught_exception ? isolate->heap()->true_value()
9241 : isolate->heap()->false_value());
9246 return *isolate->factory()->NewJSArrayWithElements(details);
9253 return isolate->heap()->undefined_value();
9258 HandleScope scope(isolate);
9268 return DebugLookupResultValue(isolate->heap(), *obj, *name, &result, NULL);
9270 return isolate->heap()->undefined_value();
9308 HandleScope scope(isolate);
9323 HandleScope scope(isolate);
9337 if (isolate->debug()->break_id() == 0 ||
9338 break_id != isolate->debug()->break_id()) {
9339 return isolate->Throw(
9340 isolate->heap()->illegal_execution_state_symbol());
9343 return isolate->heap()->true_value();
9348 HandleScope scope(isolate);
9354 RUNTIME_ARGUMENTS(isolate, args));
9360 StackFrame::Id id = isolate->debug()->break_frame_id();
9365 for (JavaScriptFrameIterator it(isolate, id); !it.done(); it.Advance()) n++;
9399 HandleScope scope(isolate);
9405 RUNTIME_ARGUMENTS(isolate, args));
9409 Heap* heap = isolate->heap();
9412 StackFrame::Id id = isolate->debug()->break_frame_id();
9418 JavaScriptFrameIterator it(isolate, id);
9430 SaveContext* save = isolate->save_context();
9437 Handle<Object> frame_id(WrapFrameId(it.frame()->id()), isolate);
9460 isolate->factory()->NewFixedArray(info.NumberOfLocals() * 2);
9475 locals->set(i * 2 + 1, isolate->heap()->undefined_value());
9496 at_return = isolate->debug()->IsBreakAtReturn(it.frame());
9501 Handle<Object> return_value = isolate->factory()->undefined_value();
9503 StackFrameIterator it2(isolate);
9518 isolate);
9548 Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size);
9579 *isolate->debug()->debug_context()));
9619 Handle<Object> receiver(it.frame()->receiver(), isolate);
9630 isolate->factory()->ToObject(receiver, calling_frames_global_context);
9635 return *isolate->factory()->NewJSArrayWithElements(details);
9641 Isolate* isolate,
9655 isolate->heap()->arguments_shadow_symbol()) {
9657 isolate,
9660 Handle<Object>(context->get(context_index), isolate),
9673 static Handle<JSObject> MaterializeLocalScope(Isolate* isolate,
9683 isolate->factory()->NewJSObject(isolate->object_function());
9688 isolate,
9691 Handle<Object>(frame->GetParameter(i), isolate),
9700 isolate,
9703 Handle<Object>(frame->GetExpression(i), isolate),
9712 if (!CopyContextLocalsToScopeObject(isolate,
9730 isolate,
9746 static Handle<JSObject> MaterializeClosure(Isolate* isolate,
9757 isolate->factory()->NewJSObject(isolate->object_function());
9762 isolate->heap()->arguments_shadow_symbol(), NULL);
9772 isolate,
9775 Handle<Object>(element, isolate),
9783 if (!CopyContextLocalsToScopeObject(isolate,
9799 isolate,
9830 ScopeIterator(Isolate* isolate, JavaScriptFrame* frame)
9831 : isolate_(isolate),
10015 Isolate* isolate_;
10027 HandleScope scope(isolate);
10033 RUNTIME_ARGUMENTS(isolate, args));
10040 JavaScriptFrameIterator it(isolate, id);
10045 for (ScopeIterator it(isolate, frame); !it.Done(); it.Next()) {
10066 HandleScope scope(isolate);
10072 RUNTIME_ARGUMENTS(isolate, args));
10080 JavaScriptFrameIterator frame_it(isolate, id);
10085 ScopeIterator it(isolate, frame);
10090 return isolate->heap()->undefined_value();
10095 Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size);
10100 RETURN_IF_EMPTY_HANDLE(isolate, scope_object);
10103 return *isolate->factory()->NewJSArrayWithElements(details);
10108 HandleScope scope(isolate);
10115 for (ScopeIterator it(isolate, frame); !it.Done(); it.Next()) {
10119 return isolate->heap()->undefined_value();
10124 HandleScope scope(isolate);
10130 RUNTIME_ARGUMENTS(isolate, args));
10137 isolate->thread_manager()->FirstThreadStateInUse();
10160 HandleScope scope(isolate);
10166 RUNTIME_ARGUMENTS(isolate, args));
10173 isolate->factory()->NewFixedArray(kThreadDetailsSize);
10179 isolate->heap()->true_value());
10186 isolate->thread_manager()->FirstThreadStateInUse();
10192 return isolate->heap()->undefined_value();
10197 isolate->heap()->false_value());
10203 return *isolate->factory()->NewJSArrayWithElements(details);
10210 HandleScope scope(isolate);
10213 isolate->debug()->set_disable_break(disable_break);
10214 return isolate->heap()->undefined_value();
10219 HandleScope scope(isolate);
10226 if (break_locations->IsUndefined()) return isolate->heap()->undefined_value();
10228 return *isolate->factory()->NewJSArrayWithElements(
10238 HandleScope scope(isolate);
10247 isolate->debug()->SetBreakPoint(shared, break_point_object_arg,
10254 Object* Runtime::FindSharedFunctionInfoInScript(Isolate* isolate,
10314 return isolate->heap()->undefined_value();
10339 HandleScope scope(isolate);
10351 isolate, script, source_position);
10362 isolate->debug()->SetBreakPoint(shared, break_point_object_arg, &position);
10366 return isolate->heap()->undefined_value();
10373 HandleScope scope(isolate);
10378 isolate->debug()->ClearBreakPoint(break_point_object_arg);
10380 return isolate->heap()->undefined_value();
10388 HandleScope scope(isolate);
10398 isolate->debug()->ChangeBreakOnException(type, enable);
10399 return isolate->heap()->undefined_value();
10406 HandleScope scope(isolate);
10412 bool result = isolate->debug()->IsBreakOnException(type);
10423 HandleScope scope(isolate);
10428 RUNTIME_ARGUMENTS(isolate, args));
10432 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
10442 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
10448 return isolate->Throw(isolate->heap()->illegal_argument_symbol());
10452 isolate->debug()->ClearStepping();
10455 isolate->debug()->PrepareStep(static_cast<StepAction>(step_action),
10457 return isolate->heap()->undefined_value();
10463 HandleScope scope(isolate);
10465 isolate->debug()->ClearStepping();
10466 return isolate->heap()->undefined_value();
10490 static Handle<Object> GetArgumentsObject(Isolate* isolate,
10501 index = scope_info->StackSlotIndex(isolate->heap()->arguments_symbol());
10503 return Handle<Object>(frame->GetExpression(index), isolate);
10508 index = scope_info->ContextSlotIndex(isolate->heap()->arguments_symbol(),
10511 return Handle<Object>(function_context->get(index), isolate);
10517 isolate->factory()->NewArgumentsObject(function, length);
10518 Handle<FixedArray> array = isolate->factory()->NewFixedArray(length);
10546 HandleScope scope(isolate);
10553 RUNTIME_ARGUMENTS(isolate, args));
10568 JavaScriptFrameIterator it(isolate, id);
10576 SaveContext* save = isolate->save_context();
10581 SaveContext savex(isolate);
10582 isolate->set_context(*(save->context()));
10591 isolate->factory()->NewFunction(isolate->factory()->empty_string(),
10592 isolate->factory()->undefined_value());
10601 Handle<JSObject> local_scope = MaterializeLocalScope(isolate, frame);
10602 RETURN_IF_EMPTY_HANDLE(isolate, local_scope);
10607 isolate->factory()->NewFunctionContext(Context::MIN_CONTEXT_SLOTS,
10616 context = isolate->factory()->NewWithContext(context,
10627 isolate->factory()->NewStringFromAscii(
10639 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context);
10643 Handle<Object> receiver(frame->receiver(), isolate);
10649 Handle<Object> arguments = GetArgumentsObject(isolate, frame,
10673 HandleScope scope(isolate);
10680 RUNTIME_ARGUMENTS(isolate, args));
10693 SaveContext save(isolate);
10695 while (top != NULL && *top->context() == *isolate->debug()->debug_context()) {
10699 isolate->set_context(*top->context());
10704 Handle<Context> context = isolate->global_context();
10710 Handle<JSFunction> go_between = isolate->factory()->NewFunction(
10711 isolate->factory()->empty_string(),
10712 isolate->factory()->undefined_value());
10715 isolate->factory()->NewFunctionContext(
10729 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
10734 Handle<Object> receiver = isolate->global();
10744 HandleScope scope(isolate);
10748 Handle<FixedArray> instances = isolate->debug()->GetLoadedScripts();
10764 isolate->factory()->NewJSObject(isolate->array_function());
10848 isolate->heap()->CollectAllGarbage(false);
10860 isolate->context()->global_context()->arguments_boilerplate();
10871 { MaybeObject* maybe_object = isolate->heap()->AllocateFixedArray(count);
10882 { MaybeObject* maybe_result = isolate->heap()->AllocateJSObject(
10883 isolate->context()->global_context()->array_function());
10928 isolate->heap()->CollectAllGarbage(false);
10941 { MaybeObject* maybe_object = isolate->heap()->AllocateFixedArray(count);
10951 { MaybeObject* maybe_result = isolate->heap()->AllocateJSObject(
10952 isolate->context()->global_context()->array_function());
10975 return isolate->heap()->undefined_value();
10981 HandleScope scope(isolate);
10991 return isolate->heap()->undefined_value();
10997 HandleScope scope(isolate);
11007 return isolate->heap()->undefined_value();
11050 HandleScope scope(isolate);
11058 array = isolate->factory()->NewFixedArray(kBufferSize);
11061 array = isolate->factory()->NewFixedArray(number);
11065 Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(array);
11082 HandleScope scope(isolate);
11089 if (isolate->has_pending_exception()) {
11101 HandleScope scope(isolate);
11104 Handle<Object> old_script_name(args[2], isolate);
11118 return isolate->heap()->null_value();
11125 HandleScope scope(isolate);
11134 HandleScope scope(isolate);
11144 HandleScope scope(isolate);
11145 Handle<Object> function_object(args[0], isolate);
11146 Handle<Object> script_object(args[1], isolate);
11152 script_object = Handle<Object>(script, isolate);
11161 return isolate->heap()->undefined_value();
11169 HandleScope scope(isolate);
11178 return isolate->heap()->undefined_value();
11189 HandleScope scope(isolate);
11203 HandleScope scope(isolate);
11215 HandleScope scope(isolate);
11227 HandleScope scope(isolate);
11231 Handle<Code> code(function->code(), isolate);
11235 return isolate->heap()->undefined_value();
11264 HandleScope scope(isolate);
11272 result = Execution::Call(function, isolate->global(), 0, NULL,
11276 result = Execution::Call(function, isolate->global(), 0, NULL,
11294 return isolate->heap()->undefined_value();
11301 isolate->heap()->CollectAllGarbage(true);
11302 return isolate->heap()->undefined_value();
11308 int usage = static_cast<int>(isolate->heap()->SizeOfObjects());
11310 return *isolate->factory()->NewNumberFromInt(usage);
11319 return isolate->heap()->true_value();
11321 return isolate->heap()->false_value();
11331 return isolate->heap()->undefined_value();
11341 return success ? isolate->heap()->true_value() :
11342 isolate->heap()->false_value();
11344 return isolate->heap()->undefined_value();
11365 return isolate->heap()->undefined_value();
11378 return isolate->heap()->undefined_value();
11392 return isolate->heap()->undefined_value();
11432 return isolate->heap()->undefined_value();
11454 return isolate->heap()->undefined_value();
11467 return isolate->heap()->undefined_value();
11481 return isolate->heap()->undefined_value();
11490 return isolate->heap()->undefined_value();
11492 return isolate->heap()->undefined_value();
11512 return isolate->heap()->undefined_value();
11527 return isolate->heap()->undefined_value();
11538 return isolate->heap()->undefined_value();
11579 HandleScope scope(isolate);
11628 HandleScope scope(isolate);
11629 Factory* factory = isolate->factory();
11636 StackFrameIterator iter(isolate);
11689 return isolate->heap()->AllocateStringFromAscii(CStrVector(version_string),
11698 isolate->PrintStack();
11739 HandleScope scope(isolate);
11748 Handle<Object> receiver(isolate->global_context()->global());
11798 HandleScope scope(isolate);
11801 return *isolate->factory()->NewJSMessageObject(
11806 isolate->factory()->undefined_value(),
11807 isolate->factory()->undefined_value(),
11808 isolate->factory()->undefined_value());
11848 Factory* factory = isolate->factory();
11889 return isolate->heap()->undefined_value();
11920 ASSERT(Isolate::Current()->heap() == heap);
11963 Isolate* isolate = Isolate::Current();
11968 isolate->heap()->CollectGarbage(failure->allocation_space());
11972 isolate->counters()->gc_last_resort_from_js()->Increment();
11973 isolate->heap()->CollectAllGarbage(false);