/external/v8/test/cctest/ |
D | test-macro-assembler-x64.cc | 51 using i::Smi; 110 TEST(Smi) { in TEST() argument 114 Smi::kMaxValue, static_cast<int64_t>(Smi::kMaxValue) + 1, in TEST() 115 Smi::kMinValue, static_cast<int64_t>(Smi::kMinValue) - 1 in TEST() 120 bool is_valid = Smi::IsValid(number); in TEST() 121 bool is_in_range = number >= Smi::kMinValue && number <= Smi::kMaxValue; in TEST() 124 Smi* smi_from_intptr = Smi::FromIntptr(number); in TEST() 126 Smi* smi_from_int = Smi::FromInt(static_cast<int32_t>(number)); in TEST() 136 static void TestMoveSmi(MacroAssembler* masm, Label* exit, int id, Smi* value) { in TestMoveSmi() 160 TestMoveSmi(masm, &exit, 1, Smi::FromInt(0)); in TEST() [all …]
|
D | test-array-list.cc | 24 array = ArrayList::Add(array, handle(Smi::FromInt(100), isolate)); in TEST() 26 CHECK_EQ(100, Smi::cast(array->Get(0))->value()); in TEST() 27 array = ArrayList::Add(array, handle(Smi::FromInt(200), isolate), in TEST() 28 handle(Smi::FromInt(300), isolate)); in TEST() 30 CHECK_EQ(100, Smi::cast(array->Get(0))->value()); in TEST() 31 CHECK_EQ(200, Smi::cast(array->Get(1))->value()); in TEST() 32 CHECK_EQ(300, Smi::cast(array->Get(2))->value()); in TEST() 33 array->Set(2, Smi::FromInt(400)); in TEST() 34 CHECK_EQ(400, Smi::cast(array->Get(2))->value()); in TEST() 38 CHECK_EQ(100, Smi::cast(array->Get(0))->value()); in TEST() [all …]
|
D | test-representation.cc | 54 TestPairPositive(Representation::Smi(), Representation::None()); in TEST() 65 TestPairPositive(Representation::Smi(), Representation::Integer8()); in TEST() 76 TestPairPositive(Representation::Smi(), Representation::UInteger8()); in TEST() 87 TestPairPositive(Representation::Smi(), Representation::Integer16()); in TEST() 98 TestPairPositive(Representation::Smi(), Representation::UInteger16()); in TEST() 104 TestPairNegative(Representation::None(), Representation::Smi()); in TEST() 105 TestPairNegative(Representation::Integer8(), Representation::Smi()); in TEST() 106 TestPairNegative(Representation::UInteger8(), Representation::Smi()); in TEST() 107 TestPairNegative(Representation::Integer16(), Representation::Smi()); in TEST() 108 TestPairNegative(Representation::UInteger16(), Representation::Smi()); in TEST() [all …]
|
D | test-elements-kind.cc | 77 Handle<Object> value(Smi::FromInt(42), isolate); in TEST() 108 Handle<Object> value(Smi::FromInt(42), isolate); in TEST() 151 Handle<Object> value(Smi::FromInt(42), isolate); in TEST() 202 Handle<Object> value(Smi::FromInt(42), isolate); in TEST() 210 CHECK_EQ(Smi::cast(array->length())->value(), 0); in TEST() 222 CHECK_EQ(Smi::cast(array->length())->value(), 0); in TEST() 234 Handle<Object> value(Smi::FromInt(42), isolate); in TEST() 242 CHECK_EQ(Smi::cast(array->length())->value(), 0); in TEST() 253 CHECK_EQ(1, Smi::cast(array->length())->value()); in TEST() 267 CHECK_EQ(non_dict_backing_store_limit, Smi::cast(array->length())->value()); in TEST() [all …]
|
D | test-dictionary.cc | 120 set(EntryToIndex(entry), Smi::FromInt(key)); in insert() 121 set(EntryToIndex(entry) + 1, Smi::FromInt(value)); in insert() 125 Handle<Object> key_obj(Smi::FromInt(key), GetIsolate()); in lookup() 126 return Smi::cast(Lookup(key_obj))->value(); in lookup() 147 t->Rehash(handle(Smi::FromInt(0), isolate)); in TEST() 160 t->Rehash(handle(Smi::FromInt(0), isolate)); in TEST() 239 Handle<Object> value = handle(Smi::FromInt(0), isolate); in TEST()
|
D | test-weaksets.cc | 92 Handle<Smi> smi(Smi::FromInt(23), isolate); in TEST() 148 Handle<Smi> smi(Smi::FromInt(i), isolate); in TEST() 238 Handle<Smi> smi(Smi::FromInt(i), isolate); in TEST()
|
/external/v8/test/cctest/interpreter/ |
D | test-interpreter.cc | 284 builder.LoadLiteral(Smi::FromInt(i)).Return(); in TEST() 290 CHECK_EQ(Smi::cast(*return_val), Smi::FromInt(i)); in TEST() 299 builder.LoadLiteral(Smi::FromInt(0x12345678)).Return(); in TEST() 305 CHECK_EQ(Smi::cast(*return_val), Smi::FromInt(0x12345678)); in TEST() 449 builder.LoadLiteral(Smi::FromInt(200)); in TEST() 452 builder.LoadLiteral(Smi::FromInt(100)); in TEST() 455 builder.LoadLiteral(Smi::FromInt(0)); in TEST() 549 builder.LoadLiteral(Smi::FromInt(lhs)) in TEST() 551 .LoadLiteral(Smi::FromInt(rhs)) in TEST() 584 builder.LoadLiteral(Smi::FromInt(lhs)) in TEST() [all …]
|
/external/v8/src/ |
D | dateparser.cc | 57 if (!Smi::IsValid(year) || !IsMonth(month) || !IsDay(day)) return false; in Write() 59 output->set(YEAR, Smi::FromInt(year)); in Write() 60 output->set(MONTH, Smi::FromInt(month - 1)); // 0-based in Write() 61 output->set(DAY, Smi::FromInt(day)); in Write() 91 output->set(HOUR, Smi::FromInt(hour)); in Write() 92 output->set(MINUTE, Smi::FromInt(minute)); in Write() 93 output->set(SECOND, Smi::FromInt(second)); in Write() 94 output->set(MILLISECOND, Smi::FromInt(millisecond)); in Write() 106 if (total_seconds_unsigned > Smi::kMaxValue) return false; in Write() 111 DCHECK(Smi::IsValid(total_seconds)); in Write() [all …]
|
D | futex-emulation.cc | 87 return Smi::FromInt(Result::kNotEqual); in Wait() 160 result = Smi::FromInt(Result::kOk); in Wait() 168 result = Smi::FromInt(Result::kTimedOut); in Wait() 212 return Smi::FromInt(waiters_woken); in Wake() 229 return Smi::FromInt(Result::kNotEqual); in WakeOrRequeue() 250 return Smi::FromInt(waiters_woken); in WakeOrRequeue() 273 return Smi::FromInt(waiters); in NumWaitersForTesting()
|
D | layout-descriptor-inl.h | 13 LayoutDescriptor* LayoutDescriptor::FromSmi(Smi* smi) { in FromSmi() 21 return handle(LayoutDescriptor::FromSmi(Smi::FromInt(0)), isolate); in New() 40 return LayoutDescriptor::FromSmi(Smi::FromInt(0)); in FastPointerLayout() 84 uint32_t value = static_cast<uint32_t>(Smi::cast(this)->value()); in SetTagged() 90 return LayoutDescriptor::FromSmi(Smi::FromInt(static_cast<int>(value))); in SetTagged() 111 uint32_t value = static_cast<uint32_t>(Smi::cast(this)->value()); in IsTagged()
|
D | string-builder.h | 38 int encoded_slice = Smi::cast(element)->value(); in StringBuilderConcatHelper() 49 pos = Smi::cast(obj)->value(); in StringBuilderConcatHelper() 76 int smi_value = Smi::cast(elt)->value(); in StringBuilderConcatLength() 91 pos = Smi::cast(next_smi)->value(); in StringBuilderConcatLength() 164 void Add(Smi* value) { in Add() 179 target_array->set_length(Smi::FromInt(length_)); in ToJSArray() 214 builder->Add(Smi::FromInt(encoded_slice)); in AddSubjectSlice() 217 builder->Add(Smi::FromInt(-length)); in AddSubjectSlice() 218 builder->Add(Smi::FromInt(from)); in AddSubjectSlice()
|
D | objects-inl.h | 37 PropertyDetails::PropertyDetails(Smi* smi) { in PropertyDetails() 42 Smi* PropertyDetails::AsSmi() const { in AsSmi() 46 return Smi::FromInt(value >> 1); in AsSmi() 93 return Smi::cast(value)->value(); \ 96 WRITE_FIELD(this, offset, Smi::FromInt(value)); \ 102 return Smi::cast(value)->value(); \ 105 RELEASE_WRITE_FIELD(this, offset, Smi::FromInt(value)); \ 111 return Smi::cast(value)->value(); \ 114 NOBARRIER_WRITE_FIELD(this, offset, Smi::FromInt(value)); \ 313 return handle(Smi::FromInt(0), isolate); in NewStorageFor() [all …]
|
/external/v8/src/runtime/ |
D | runtime-numbers.cc | 105 return isolate->heap()->ToBoolean(Smi::IsValid(number)); in RUNTIME_FUNCTION() 203 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) { in RUNTIME_FUNCTION() 204 return Smi::FromInt(int_value); in RUNTIME_FUNCTION() 233 if (x_value == y_value) return Smi::FromInt(EQUAL); in RUNTIME_FUNCTION() 238 return Smi::FromInt(x_value < y_value ? LESS : GREATER); in RUNTIME_FUNCTION() 249 if (y_value >= 0) return Smi::FromInt(LESS); in RUNTIME_FUNCTION() 250 if (x_value >= 0) return Smi::FromInt(GREATER); in RUNTIME_FUNCTION() 294 if (x_scaled < y_scaled) return Smi::FromInt(LESS); in RUNTIME_FUNCTION() 295 if (x_scaled > y_scaled) return Smi::FromInt(GREATER); in RUNTIME_FUNCTION() 296 return Smi::FromInt(tie); in RUNTIME_FUNCTION() [all …]
|
D | runtime-collections.cc | 43 Handle<Smi> hash = Object::GetOrCreateHash(isolate, object); in RUNTIME_FUNCTION() 98 holder->set_index(Smi::FromInt(0)); in RUNTIME_FUNCTION() 99 holder->set_kind(Smi::FromInt(kind)); in RUNTIME_FUNCTION() 111 result->set_index(Smi::FromInt(Smi::cast(holder->index())->value())); in RUNTIME_FUNCTION() 112 result->set_kind(Smi::FromInt(Smi::cast(holder->kind())->value())); in RUNTIME_FUNCTION() 194 holder->set_index(Smi::FromInt(0)); in RUNTIME_FUNCTION() 195 holder->set_kind(Smi::FromInt(kind)); in RUNTIME_FUNCTION() 207 result->set_index(Smi::FromInt(Smi::cast(holder->index())->value())); in RUNTIME_FUNCTION() 208 result->set_kind(Smi::FromInt(Smi::cast(holder->kind())->value())); in RUNTIME_FUNCTION()
|
D | runtime-strings.cc | 144 if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1); in RUNTIME_FUNCTION() 148 return Smi::FromInt(position); in RUNTIME_FUNCTION() 195 if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1); in RUNTIME_FUNCTION() 205 return Smi::FromInt(start_index); in RUNTIME_FUNCTION() 237 return Smi::FromInt(position); in RUNTIME_FUNCTION() 248 if (str1.is_identical_to(str2)) return Smi::FromInt(0); // Equal. in RUNTIME_FUNCTION() 254 if (str2_length == 0) return Smi::FromInt(0); // Equal. in RUNTIME_FUNCTION() 255 return Smi::FromInt(-str2_length); in RUNTIME_FUNCTION() 257 if (str2_length == 0) return Smi::FromInt(str1_length); in RUNTIME_FUNCTION() 266 if (d != 0) return Smi::FromInt(d); in RUNTIME_FUNCTION() [all …]
|
D | runtime-forin.cc | 51 if (receiver->map() == *cache_type || *cache_type == Smi::FromInt(0)) { in RUNTIME_FUNCTION() 71 DCHECK_LT(index, Smi::kMaxValue); in RUNTIME_FUNCTION() 72 return Smi::FromInt(index + 1); in RUNTIME_FUNCTION()
|
/external/v8/test/unittests/interpreter/ |
D | bytecode-array-iterator-unittest.cc | 33 Smi* zero = Smi::FromInt(0); in TEST_F() 34 Smi* smi_0 = Smi::FromInt(64); in TEST_F() 35 Smi* smi_1 = Smi::FromInt(-65536); in TEST_F() 71 CHECK_EQ(Smi::FromInt(iterator.GetImmediateOperand(0)), smi_0); in TEST_F()
|
D | bytecode-array-builder-unittest.cc | 34 builder.LoadLiteral(Smi::FromInt(0)) in TEST_F() 35 .LoadLiteral(Smi::FromInt(8)) in TEST_F() 36 .LoadLiteral(Smi::FromInt(10000000)) in TEST_F() 222 builder.LoadLiteral(Smi::FromInt(20000000)); in TEST_F() 398 Handle<Object> large_smi(Smi::FromInt(0x12345678), isolate()); in TEST_F() 493 Smi::FromInt(kFarJumpDistance)); in TEST_F() 501 Smi::FromInt(kFarJumpDistance - 4)); in TEST_F() 509 Smi::FromInt(kFarJumpDistance - 8)); in TEST_F() 517 Smi::FromInt(kFarJumpDistance - 12)); in TEST_F() 526 Smi::FromInt(kFarJumpDistance - 16)); in TEST_F() [all …]
|
/external/v8/src/ast/ |
D | scopeinfo.h | 127 int host_index() { return Smi::cast(get(HOST_OFFSET))->value(); } in host_index() 137 return static_cast<VariableMode>(Smi::cast(get(mode_offset(i)))->value()); in mode() 139 int index(int i) { return Smi::cast(get(index_offset(i)))->value(); } in index() 161 void set_host_index(int index) { set(HOST_OFFSET, Smi::FromInt(index)); } in set_host_index() 164 set(mode_offset(i), Smi::FromInt(mode)); in set_mode() 167 set(index_offset(i), Smi::FromInt(index)); in set_index()
|
D | scopeinfo.cc | 126 scope_info->set(index++, Smi::FromInt(first_slot_index)); in Create() 161 scope_info->set(index++, Smi::FromInt(value)); in Create() 173 scope_info->set(index++, Smi::FromInt(value)); in Create() 199 scope_info->set(index++, Smi::FromInt(var_index)); in Create() 209 scope_info->set(index++, Smi::FromInt(var_index)); in Create() 267 scope_info->set(index++, Smi::FromInt(first_slot_index)); in CreateGlobalThisBinding() 277 scope_info->set(index++, Smi::FromInt(value)); in CreateGlobalThisBinding() 285 scope_info->set(index++, Smi::FromInt(receiver_index)); in CreateGlobalThisBinding() 437 int first_slot_index = Smi::cast(get(StackLocalFirstSlotIndex()))->value(); in StackLocalIndex() 452 int value = Smi::cast(get(info_index))->value(); in ContextLocalMode() [all …]
|
/external/v8/src/crankshaft/ |
D | lithium-codegen.cc | 296 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); in PopulateDeoptimizationData() 297 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); in PopulateDeoptimizationData() 303 data->SetSharedFunctionInfo(Smi::FromInt(0)); in PopulateDeoptimizationData() 305 data->SetWeakCellCache(Smi::FromInt(0)); in PopulateDeoptimizationData() 317 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); in PopulateDeoptimizationData() 318 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); in PopulateDeoptimizationData() 324 data->SetTranslationIndex(i, Smi::FromInt(env->translation_index())); in PopulateDeoptimizationData() 326 Smi::FromInt(env->arguments_stack_height())); in PopulateDeoptimizationData() 327 data->SetPc(i, Smi::FromInt(env->pc_offset())); in PopulateDeoptimizationData()
|
/external/v8/test/cctest/compiler/ |
D | test-code-stub-assembler.cc | 36 CHECK_EQ(37, Handle<Smi>::cast(result.ToHandleChecked())->value()); in TEST() 76 CHECK_EQ(16, Handle<Smi>::cast(result.ToHandleChecked())->value()); in TEST() 90 CHECK_EQ(16, Handle<Smi>::cast(result.ToHandleChecked())->value()); in TEST() 105 CHECK_EQ(16, Handle<Smi>::cast(result.ToHandleChecked())->value()); in TEST() 120 CHECK_EQ(16, Handle<Smi>::cast(result.ToHandleChecked())->value()); in TEST()
|
D | test-simplified-lowering.cc | 72 if (expected <= Smi::kMinValue) return; in CheckNumberCall() 73 if (expected >= Smi::kMaxValue) return; in CheckNumberCall() 290 Smi* smis[] = {Smi::FromInt(1), Smi::FromInt(2), Smi::FromInt(3)}; in TEST() 293 int offset = static_cast<int>(i * sizeof(Smi*)); in TEST() 303 Smi* expected = Smi::FromInt(j); in TEST() 312 Smi* smis[] = {Smi::FromInt(1), Smi::FromInt(2), Smi::FromInt(3)}; in TEST() 315 int offset = static_cast<int>(i * sizeof(Smi*)); in TEST() 326 Smi* expected = Smi::FromInt(j); in TEST() 327 smis[i] = Smi::FromInt(-100); in TEST() 336 Smi* smis[] = {Smi::FromInt(1), Smi::FromInt(2), Smi::FromInt(3), in TEST() [all …]
|
/external/v8/src/heap/ |
D | heap-inl.h | 640 set_instanceof_cache_function(Smi::FromInt(0)); in ClearInstanceofCache() 650 set_instanceof_cache_map(Smi::FromInt(0)); in CompletelyClearInstanceofCache() 651 set_instanceof_cache_function(Smi::FromInt(0)); in CompletelyClearInstanceofCache() 664 if (last_id == Smi::kMaxValue) { in NextScriptId() 669 set_last_script_id(Smi::FromInt(last_id)); in NextScriptId() 675 DCHECK(arguments_adaptor_deopt_pc_offset() == Smi::FromInt(0)); in SetArgumentsAdaptorDeoptPCOffset() 676 set_arguments_adaptor_deopt_pc_offset(Smi::FromInt(pc_offset)); in SetArgumentsAdaptorDeoptPCOffset() 681 DCHECK(construct_stub_deopt_pc_offset() == Smi::FromInt(0)); in SetConstructStubDeoptPCOffset() 682 set_construct_stub_deopt_pc_offset(Smi::FromInt(pc_offset)); in SetConstructStubDeoptPCOffset() 687 DCHECK(getter_stub_deopt_pc_offset() == Smi::FromInt(0)); in SetGetterStubDeoptPCOffset() [all …]
|
/external/v8/src/debug/ |
D | liveedit.cc | 335 Handle<Object>(Smi::FromInt(char_pos1), isolate)); in WriteChunk() 338 Handle<Object>(Smi::FromInt(char_pos1 + char_len1), in WriteChunk() 342 Handle<Object>(Smi::FromInt(char_pos2 + char_len2), in WriteChunk() 439 return Smi::cast(ends_array_->get(index))->value() + 1; in GetPosAfterNewLine() 605 return Smi::cast(length)->value(); in GetArrayLength() 782 Handle<Smi>(Smi::FromInt(context_list[i]->index()), isolate())); in SerializeFunctionScope() 874 Handle<Smi> start_pos( in GatherCompileInfo() 875 Smi::FromInt(message_location.start_pos()), isolate); in GatherCompileInfo() 876 Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()), isolate); in GatherCompileInfo() 1191 int chunk_start = Handle<Smi>::cast(element)->value(); in TranslatePosition() [all …]
|